Skip to content

Commit

Permalink
chore(ci): minor readability updates
Browse files Browse the repository at this point in the history
Also, widen the type of the helper resource, because of a mis-match
between the types used for the helper in ember-resources and the test
app
  • Loading branch information
NullVoxPopuli committed May 28, 2022
1 parent cc88ad6 commit 5e78893
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 35 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
path: ${{ env.dist }}
- run: pnpm --filter ember-app run ember:test
try-scenarios:
name: "Compat: ${{ matrix.ember-try-scenario }}"
name: ${{ matrix.ember-try-scenario }}
timeout-minutes: 10
runs-on: ubuntu-latest
needs: tests
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }}
--skip-cleanup
typescript-compatibility:
name: Type checking - ${{ matrix.typescript-scenario }}
name: ${{ matrix.typescript-scenario }}
timeout-minutes: 5
runs-on: ubuntu-latest
continue-on-error: true
Expand Down Expand Up @@ -265,7 +265,9 @@ jobs:
run: pnpm add --save-dev ${{ matrix.typescript-scenario }}
working-directory: testing/ember-app
- name: Type checking
run: pnpm --filter ember-app exec tsc --build
run: |
pnpm --filter ember-app exec tsc -v
pnpm --filter ember-app exec tsc --build
publish:
name: Release
timeout-minutes: 5
Expand Down
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
public-hoist-pattern[]=*@types*

# Required because broccoli has hard-coded paths to *all* packages
# not just relevant ones..........
public-hoist-pattern[]=eslint-plugin*
Expand Down
10 changes: 6 additions & 4 deletions build/github-workflows/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
- run: pnpm --filter ember-app run ember:test

try-scenarios:
name: "Compat: ${{ matrix.ember-try-scenario }}"
name: "${{ matrix.ember-try-scenario }}"
<<: *ubuntu
timeout-minutes: 10
needs: tests
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
typescript-compatibility:
name: Type checking - ${{ matrix.typescript-scenario }}
name: ${{ matrix.typescript-scenario }}
<<: *ubuntu
continue-on-error: true
needs: build_test
Expand All @@ -193,6 +193,7 @@ jobs:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- typescript@next

steps:
Expand All @@ -209,8 +210,9 @@ jobs:
run: pnpm add --save-dev ${{ matrix.typescript-scenario }}
working-directory: testing/ember-app
- name: Type checking
run: pnpm --filter ember-app exec tsc --build

run: |
pnpm --filter ember-app exec tsc -v
pnpm --filter ember-app exec tsc --build
publish:
Expand Down
3 changes: 3 additions & 0 deletions ember-resources/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
# output
dist/
declarations/
src/**/*.d.ts
src/**/*.d.ts.map
src/**/*.js
3 changes: 3 additions & 0 deletions ember-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@
"@nullvoxpopuli/eslint-configs": "^2.1.1",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/ember__application": "^4.0.0",
"@types/ember__component": "^4.0.0",
"@types/ember__debug": "^4.0.0",
"@types/ember__destroyable": "^4.0.0",
"@types/ember__helper": "^4.0.0",
"@types/ember__object": "^4.0.0",
"@types/ember__runloop": "^4.0.0",
"@types/ember__test-helpers": "^2.0.0",
"babel-eslint": "10.1.0",
"ember-async-data": "^0.6.0",
Expand Down
3 changes: 1 addition & 2 deletions ember-resources/src/util/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { DEFAULT_THUNK, normalizeThunk } from '../core/utils';
import type { Cache, Thunk } from '../core/types';
// @ts-ignore
import type { helper as emberHelper } from '@ember/component/helper';
import type EmberHelper from '@ember/component/helper';

/**
* @utility implemented with raw `invokeHelper` API, no classes from `ember-resources` used.
Expand Down Expand Up @@ -53,7 +52,7 @@ import type EmberHelper from '@ember/component/helper';
*/
export function helper(
context: object,
helper: EmberHelper | ReturnType<typeof emberHelper>,
helper: unknown,
thunk: Thunk = DEFAULT_THUNK
): { value: unknown } {
let resource: Cache<unknown>;
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
"pnpm": {
"overrides": {
"@embroider/addon-shim": "1.6.0",
"@types/eslint": "7.29.0"
"@types/eslint": "7.29.0",
"mustache": "^4.2.0"
},
"overrides-notes": {
"@embroider/addon-shim": "some addons from the test-app are not using ^1.0.0",
"@types/eslint": "webpack brings in @types/eslint@8, which breaks our type checking",
"mustache": "ember-cli -> testem -> consolidate -> mustache is ancient"
},
"peerDependencyRules": {
"ignoreMissing": ["msw"],
Expand Down
50 changes: 29 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions testing/ember-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"@nullvoxpopuli/eslint-configs": "^2.1.1",
"@types/ember": "^4.0.0",
"@types/ember-qunit": "^5.0.0",
"@types/ember-resolver": "^5.0.10",
"@types/ember__application": "^4.0.0",
"@types/ember__array": "^4.0.1",
"@types/ember__component": "^4.0.5",
"@types/ember__controller": "^4.0.0",
"@types/ember__debug": "^4.0.1",
"@types/ember__destroyable": "^4.0.0",
"@types/ember__engine": "^4.0.0",
"@types/ember__error": "^4.0.0",
"@types/ember__helper": "^4.0.0",
Expand Down Expand Up @@ -81,7 +83,6 @@
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-cli-typescript": "^4.2.1",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^8.1.1",
"ember-load-initializers": "^2.1.2",
Expand All @@ -106,7 +107,7 @@
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^2.0.0",
"typescript": "^4.4.4",
"typescript": "4.2",
"webpack": "^5.72.1"
},
"engines": {
Expand Down

0 comments on commit 5e78893

Please sign in to comment.