Skip to content

Commit 1b46576

Browse files
committed
v2.6.0...v4.0.0
1 parent df1be4e commit 1b46576

File tree

19 files changed

+347
-177
lines changed

19 files changed

+347
-177
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ on:
88
pull_request: {}
99

1010
concurrency:
11-
group: ci-${{ github.head_ref || github.ref }}
12-
cancel-in-progress: true
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
1313

1414
jobs:
1515
test:
16-
name: "Tests"
16+
name: 'Tests'
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 10
1819

1920
steps:
20-
- uses: actions/checkout@v3
21-
- uses: actions/setup-node@v3
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
2223
with:
2324
node-version: 18
2425
cache: npm
@@ -30,30 +31,31 @@ jobs:
3031
run: npm run test
3132

3233
floating:
33-
name: "Floating Dependencies"
34+
name: 'Floating Dependencies'
3435
runs-on: ubuntu-latest
36+
timeout-minutes: 10
3537

3638
steps:
37-
- uses: actions/checkout@v3
38-
- uses: actions/setup-node@v3
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-node@v4
3941
with:
4042
node-version: 18
4143
cache: npm
4244
- name: Install Dependencies
43-
run: npm ci
45+
run: npm install --no-package-lock
4446
- name: Run Tests
4547
run: npm run test
4648

4749
try-scenarios:
4850
name: ${{ matrix.try-scenario }}
4951
runs-on: ubuntu-latest
5052
needs: 'test'
53+
timeout-minutes: 10
5154

5255
strategy:
5356
fail-fast: false
5457
matrix:
5558
try-scenario:
56-
- ember-lts-4.8
5759
- ember-lts-4.12
5860
- ember-lts-5.4
5961
- ember-lts-5.8
@@ -65,8 +67,8 @@ jobs:
6567
- embroider-optimized
6668

6769
steps:
68-
- uses: actions/checkout@v3
69-
- uses: actions/setup-node@v3
70+
- uses: actions/checkout@v4
71+
- uses: actions/setup-node@v4
7072
with:
7173
node-version: 18
7274
cache: npm
@@ -76,5 +78,5 @@ jobs:
7678
- name: Install Dependencies
7779
run: npm ci
7880
- name: Run Tests
79-
run: npx ember try:one ${{ matrix.try-scenario }}
81+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
8082
working-directory: test-app

.github/workflows/push-dist.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ jobs:
1515
push-dist:
1616
name: Push dist
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
1820
steps:
19-
- uses: actions/checkout@v3
20-
- name: Install Node
21-
uses: actions/setup-node@v3
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
2223
with:
23-
cache: 'npm'
24+
node-version: 18
25+
cache: npm
2426
- name: Install Dependencies
2527
run: npm ci
2628
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
2729
with:
2830
branch: dist
2931
token: ${{ secrets.GITHUB_TOKEN }}
30-
working-directory: ember-provide-consume-context
32+
working-directory: 'ember-provide-consume-context'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ having to pass arguments at each level (i.e. no prop drilling).
55

66
## Compatibility
77

8-
- Ember.js v4.8 or above
8+
- Ember.js v4.12 or above
99
- Embroider or ember-auto-import v2
1010

1111
## Installation

config/ember-cli-update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"packages": [
44
{
55
"name": "@embroider/addon-blueprint",
6-
"version": "2.6.0",
6+
"version": "4.0.0",
77
"blueprints": [
88
{
99
"name": "@embroider/addon-blueprint",

ember-provide-consume-context/.eslintignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

ember-provide-consume-context/.eslintrc.cjs

Lines changed: 0 additions & 51 deletions
This file was deleted.

ember-provide-consume-context/.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
/LICENSE.md
66

77
# compiled output
8-
/dist
9-
/declarations
8+
dist/
9+
declarations/
1010

1111
# npm/pnpm/yarn pack output
1212
*.tgz
13+
14+
# deps & caches
15+
node_modules/
16+
.eslintcache
17+
.prettiercache

ember-provide-consume-context/.prettierrc.cjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@
22

33
module.exports = {
44
plugins: ['prettier-plugin-ember-template-tag'],
5-
singleQuote: true,
5+
overrides: [
6+
{
7+
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
8+
options: {
9+
singleQuote: true,
10+
templateSingleQuote: false,
11+
},
12+
},
13+
],
614
};

ember-provide-consume-context/babel.config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
]
77
],
88
"plugins": [
9+
[
10+
"@babel/plugin-transform-typescript",
11+
{
12+
"allExtensions": true,
13+
"onlyRemoveTypeImports": true,
14+
"allowDeclareFields": true
15+
}
16+
],
917
"@embroider/addon-dev/template-colocation-plugin",
1018
"@babel/plugin-transform-class-static-block",
1119
[
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
/**
2+
* Debugging:
3+
* https://eslint.org/docs/latest/use/configure/debug
4+
* ----------------------------------------------------
5+
*
6+
* Print a file's calculated configuration
7+
*
8+
* npx eslint --print-config path/to/file.js
9+
*
10+
* Inspecting the config
11+
*
12+
* npx eslint --inspect-config
13+
*
14+
*/
15+
import babelParser from '@babel/eslint-parser';
16+
import js from '@eslint/js';
17+
import prettier from 'eslint-config-prettier';
18+
import ember from 'eslint-plugin-ember/recommended';
19+
import importPlugin from 'eslint-plugin-import';
20+
import n from 'eslint-plugin-n';
21+
import globals from 'globals';
22+
import ts from 'typescript-eslint';
23+
24+
const parserOptions = {
25+
esm: {
26+
js: {
27+
ecmaFeatures: { modules: true },
28+
ecmaVersion: 'latest',
29+
},
30+
ts: {
31+
projectService: true,
32+
project: true,
33+
tsconfigRootDir: import.meta.dirname,
34+
},
35+
},
36+
};
37+
38+
export default ts.config(
39+
js.configs.recommended,
40+
ember.configs.base,
41+
ember.configs.gjs,
42+
ember.configs.gts,
43+
prettier,
44+
/**
45+
* Ignores must be in their own object
46+
* https://eslint.org/docs/latest/use/configure/ignore
47+
*/
48+
{
49+
ignores: ['dist/', 'declarations/', 'node_modules/', 'coverage/', '!**/.*'],
50+
},
51+
/**
52+
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
53+
*/
54+
{
55+
linterOptions: {
56+
reportUnusedDisableDirectives: 'error',
57+
},
58+
},
59+
{
60+
files: ['**/*.js'],
61+
languageOptions: {
62+
parser: babelParser,
63+
},
64+
},
65+
{
66+
files: ['**/*.{js,gjs}'],
67+
languageOptions: {
68+
parserOptions: parserOptions.esm.js,
69+
globals: {
70+
...globals.browser,
71+
},
72+
},
73+
},
74+
{
75+
files: ['**/*.{ts,gts}'],
76+
languageOptions: {
77+
parser: ember.parser,
78+
parserOptions: parserOptions.esm.ts,
79+
},
80+
extends: [...ts.configs.recommendedTypeChecked, ember.configs.gts],
81+
},
82+
{
83+
files: ['src/**/*'],
84+
plugins: {
85+
import: importPlugin,
86+
},
87+
rules: {
88+
// require relative imports use full extensions
89+
'import/extensions': ['error', 'always', { ignorePackages: true }],
90+
},
91+
},
92+
/**
93+
* CJS node files
94+
*/
95+
{
96+
files: [
97+
'**/*.cjs',
98+
'.prettierrc.js',
99+
'.stylelintrc.js',
100+
'.template-lintrc.js',
101+
'addon-main.cjs',
102+
],
103+
plugins: {
104+
n,
105+
},
106+
107+
languageOptions: {
108+
sourceType: 'script',
109+
ecmaVersion: 'latest',
110+
globals: {
111+
...globals.node,
112+
},
113+
},
114+
},
115+
/**
116+
* ESM node files
117+
*/
118+
{
119+
files: ['**/*.mjs'],
120+
plugins: {
121+
n,
122+
},
123+
124+
languageOptions: {
125+
sourceType: 'module',
126+
ecmaVersion: 'latest',
127+
parserOptions: parserOptions.esm.js,
128+
globals: {
129+
...globals.node,
130+
},
131+
},
132+
},
133+
);

0 commit comments

Comments
 (0)