Skip to content

Commit

Permalink
Merge pull request #1 from NullVoxPopuli/get-everything-workin7g
Browse files Browse the repository at this point in the history
Get everything working
  • Loading branch information
NullVoxPopuli authored Apr 26, 2024
2 parents 8d5224e + 7d6ed05 commit f2c6d40
Show file tree
Hide file tree
Showing 243 changed files with 24,617 additions and 2,911 deletions.
143 changes: 59 additions & 84 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,91 +12,66 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'pnpm'
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: |
node_modules
*/node_modules
key: node_modules-${{runner.os}}-${{hashFiles('**/pnpm-lock.yaml')}}-v2
- name: Install dependencies
run: CI=true pnpm i --frozen-lockfile
build:
name: ${{matrix.task}} ${{matrix.app}}
runs-on: ubuntu-20.04
needs: [ cache-dependencies ]
strategy:
matrix:
app: [ ember-composable-helpers ]
fail-fast: false
- uses: wyvox/action-setup-pnpm@v3

test-default:
name: Test
env:
CI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'pnpm'
- name: Cache node_modules
uses: actions/cache@v4
id: cache
with:
path: |
node_modules
*/node_modules
key: node_modules-${{runner.os}}-${{hashFiles('**/pnpm-lock.yaml')}}-v2
- name: Fail if not cached
if: steps.cache.outputs.cache-hit != 'true'
run: 'false'
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm build
- run: pnpm run test
working-directory: ./test-app

# - name: ${{matrix.app}} Test (includes build)
# working-directory: ${{matrix.app}}
# run: pnpm run test
# test:
# name: Test
# env:
# CI: true
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install node
# uses: actions/setup-node@v2
# with:
# node-version: 16.x
# cache: npm
# - run: npm install
# - run: npm run test
# working-directory: ./test-app
test-min-supported:
name: Test min supported
env:
CI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm build
- run: pnpm run test
working-directory: ./test-app-min-supported

# ember-try:
# name: "Ember Try"
# env:
# CI: true
# runs-on: ubuntu-latest
# strategy:
# matrix:
# try-scenario:
# [
# ember-lts-3.28,
# ember-release,
# ember-beta,
# ember-canary,
# embroider-safe,
# # embroider-optimized, ember-data is currently failing. https://github.com/embroider-build/embroider/issues/396#issuecomment-611885598
# ]
# steps:
# - uses: actions/checkout@v2
# - name: Install node
# uses: actions/setup-node@v2
# with:
# node-version: 16.x
# cache: npm
# - run: npm install
# - run: node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
# timeout-minutes: 10
test-min-supported-classic:
name: Test min supported classic (non-embroider)
env:
CI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm build
- run: pnpm run test
working-directory: ./test-app-min-supported-classic

ember-try:
name: "Ember Try"
env:
CI: true
runs-on: ubuntu-latest
strategy:
matrix:
try-scenario:
[
ember-lts-4.4,
ember-lts-4.8,
ember-lts-4.12,
ember-lts-5.4,
ember-lts-5.8,
ember-release,
ember-beta,
ember-canary,
]
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm build
- run: node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: ./test-app
timeout-minutes: 10
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,30 @@ To install:
**Ember 3.28+:**

```no-highlight
ember install ember-composable-helpers
npm add @nullvoxpopuli/ember-composable-helpers
```

Watch a free video overview presented by EmberMap:
To use in an existing project, to replace the original [ember-composable-helpers](https://github.com/DockYard/ember-composable-helpers):

<a href='https://embermap.com/topics/refactorings/ember-composable-helpers'>
<img height="20" src="https://frontend.embermap.com/assets/images/logo-7333e9d5f48c9cd4a0ee6476a5af1083.png">
</a>
under webpack, configure an alias:
```js
resolve: {
alias: {
"ember-composable-helpers": "@nullvoxpopuli/ember-composable-helpers",
},
},
```

under classic builds, using ember-auto-import, the alias would be configured this way:

```js
// ember-cli-build.js
autoImport: {
alias: {
"ember-composable-helpers": "@nullvoxpopuli/ember-composable-helpers",
},
},
```

## Table of Contents
- [Compatability](#compatibility)
Expand Down
File renamed without changes.
42 changes: 12 additions & 30 deletions ember-composable-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-composable-helpers",
"version": "5.0.0",
"name": "@nullvoxpopuli/ember-composable-helpers",
"version": "5.0.5",
"description": "Composable helpers for Ember",
"scripts": {
"build": "rollup --config",
Expand All @@ -13,11 +13,6 @@
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"test:all": "ember try:each"
},
"bugs": "https://github.com/DockYard/ember-composable-helpers/issues",
"homepage": "https://github.com/DockYard/ember-composable-helpers",
"engines": {
"node": ">= 16"
},
"contributors": [
"Lauren Tan <arr@sugarpirate.com>",
"Marten Schilstra <mail@martenschilstra.nl>"
Expand Down Expand Up @@ -45,33 +40,26 @@
"drop",
"compute"
],
"repository": "https://github.com/DockYard/ember-composable-helpers",
"repository": "https://github.com/NullVoxPopuli/ember-composable-helpers",
"license": "MIT",
"author": "Dockyard <oss@dockyard.com>",
"directories": {
"doc": "doc",
"test": "tests"
},
"author": "The Ember Community",
"dependencies": {
"@babel/core": "^7.0.0",
"@embroider/addon-shim": "^1.8.6",
"broccoli-funnel": "2.0.1",
"resolve": "^1.10.0"
},
"ember": {
"edition": "octane"
"@embroider/addon-shim": "^1.8.7"
},
"exports": {
".": "./dist/index.js",
"./*": "./dist/*.js",
"./addon-main.js": "./addon-main.js"
"./addon-main.js": "./addon-main.cjs",
"./addon-main.cjs": "./addon-main.cjs",
"./addon-main": "./addon-main.cjs"
},
"files": [
"addon-main.cjs",
"dist"
"dist",
"src"
],
"ember-addon": {
"main": "addon-main.js",
"main": "addon-main.cjs",
"type": "addon",
"version": 2,
"app-js": {
Expand Down Expand Up @@ -121,13 +109,7 @@
"./helpers/toggle.js": "./dist/_app_/helpers/toggle.js",
"./helpers/union.js": "./dist/_app_/helpers/union.js",
"./helpers/values.js": "./dist/_app_/helpers/values.js",
"./helpers/without.js": "./dist/_app_/helpers/without.js",
"./utils/as-array.js": "./dist/_app_/utils/as-array.js",
"./utils/comparison.js": "./dist/_app_/utils/comparison.js",
"./utils/get-index.js": "./dist/_app_/utils/get-index.js",
"./utils/is-equal.js": "./dist/_app_/utils/is-equal.js",
"./utils/is-object.js": "./dist/_app_/utils/is-object.js",
"./utils/is-promise.js": "./dist/_app_/utils/is-promise.js"
"./helpers/without.js": "./dist/_app_/helpers/without.js"
}
}
}
7 changes: 3 additions & 4 deletions ember-composable-helpers/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export default {
// 'app' tree. Things in here should also be in publicEntrypoints above, but
// not everything in publicEntrypoints necessarily needs to go here.
addon.appReexports([
'helpers/**/*.js',
'utils/**/*.js',
'helpers/**/*.js'
]),

// Follow the V2 Addon rules about dependencies. Your code can import from
Expand All @@ -48,11 +47,11 @@ export default {
}),

// Ensure that standalone .hbs files are properly integrated as Javascript.
addon.hbs(),
// addon.hbs(),

// addons are allowed to contain imports of .css files, which we want rollup
// to leave alone and keep in the published output.
addon.keepAssets(['**/*.css']),
// addon.keepAssets(['**/*.css']),

// Remove leftover build artifacts when starting a new build.
addon.clean(),
Expand Down
6 changes: 3 additions & 3 deletions ember-composable-helpers/src/helpers/pipe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { helper } from '@ember/component/helper';
import isPromise from '../utils/is-promise';
import { helper } from "@ember/component/helper";
import isPromise from "../utils/is-promise";

export function invokeFunction(acc, curr) {
if (isPromise(acc)) {
Expand All @@ -10,7 +10,7 @@ export function invokeFunction(acc, curr) {
}

export function pipe(actions = []) {
return function(...args) {
return function (...args) {
return actions.reduce((acc, curr, idx) => {
if (idx === 0) {
return curr(...args);
Expand Down
32 changes: 0 additions & 32 deletions lib/difference.js

This file was deleted.

38 changes: 0 additions & 38 deletions lib/intersection.js

This file was deleted.

Loading

0 comments on commit f2c6d40

Please sign in to comment.