Skip to content

Commit 507cbe2

Browse files
authored
Update dependencies & remove ember-source as peerDep (#168)
* Fix update config * Update addon blueprint v2.16.0...v4.1.2 * Update dep * Run format * Fix * More fixes * More fixes
1 parent dad9616 commit 507cbe2

31 files changed

+11841
-10110
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,51 +12,79 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15-
test:
16-
name: "Tests"
15+
lint:
16+
name: Lint
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 10
1919

2020
steps:
2121
- uses: actions/checkout@v4
22-
- uses: pnpm/action-setup@v3
23-
with:
24-
version: 8
22+
- uses: pnpm/action-setup@v4
2523
- uses: actions/setup-node@v4
2624
with:
27-
node-version: 18
25+
node-version: 20.x
2826
cache: pnpm
29-
- name: Install Dependencies
27+
28+
- name: 'Install dependencies'
3029
run: pnpm install --frozen-lockfile
30+
31+
- run: pnpm build
32+
- run: pnpm i -f # re-sync injected deps
33+
3134
- name: Lint
32-
run: pnpm lint
35+
run: pnpm --filter ember-power-select-with-create lint
36+
37+
test:
38+
name: "Tests"
39+
runs-on: ubuntu-latest
40+
needs: lint
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: pnpm/action-setup@v4
45+
46+
- name: Install Node
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: 20.x
50+
cache: pnpm
51+
52+
- name: Install Dependencies
53+
run: pnpm install --frozen-lockfile
54+
55+
- run: pnpm build
56+
- run: pnpm i -f # re-sync injected deps
57+
3358
- name: Run Tests
34-
run: pnpm test
59+
run: pnpm --filter test-app test:ember
3560

3661
floating:
3762
name: "Floating Dependencies"
3863
runs-on: ubuntu-latest
39-
timeout-minutes: 10
64+
needs: lint
4065

4166
steps:
4267
- uses: actions/checkout@v4
43-
- uses: pnpm/action-setup@v3
44-
with:
45-
version: 8
68+
- uses: pnpm/action-setup@v4
4669
- uses: actions/setup-node@v4
4770
with:
48-
node-version: 18
71+
node-version: 20.x
4972
cache: pnpm
73+
5074
- name: Install Dependencies
51-
run: pnpm install --no-lockfile
75+
run: pnpm install --frozen-lockfile
76+
77+
- run: pnpm build
78+
- run: pnpm i -f # re-sync injected deps
79+
5280
- name: Run Tests
53-
run: pnpm test
81+
run: pnpm --filter test-app test:ember
5482

5583
try-scenarios:
5684
name: ${{ matrix.try-scenario }}
5785
runs-on: ubuntu-latest
58-
needs: 'test'
59-
timeout-minutes: 10
86+
continue-on-error: true
87+
needs: test
6088

6189
strategy:
6290
fail-fast: false
@@ -68,6 +96,9 @@ jobs:
6896
- ember-lts-4.12
6997
- ember-lts-5.4
7098
- ember-lts-5.8
99+
- ember-lts-5.12
100+
- ember-lts-6.4
101+
- glimmer-component-v1
71102
- ember-release
72103
- ember-beta
73104
- ember-canary
@@ -76,15 +107,19 @@ jobs:
76107

77108
steps:
78109
- uses: actions/checkout@v4
79-
- uses: pnpm/action-setup@v3
80-
with:
81-
version: 8
110+
- uses: pnpm/action-setup@v4
82111
- uses: actions/setup-node@v4
83112
with:
84-
node-version: 18
113+
node-version: 20
85114
cache: pnpm
115+
86116
- name: Install Dependencies
87117
run: pnpm install --frozen-lockfile
118+
119+
- run: pnpm build
120+
- run: pnpm i -f # re-sync injected deps
121+
88122
- name: Run Tests
89-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
90-
working-directory: test-app
123+
env:
124+
EMBER_TRY_SCENARIO: ${{ matrix.try-scenario }}
125+
run: pnpm --filter test-app test:ember-try $EMBER_TRY_SCENARIO --skip-cleanup

.github/workflows/push-dist.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,24 @@ on:
1414
jobs:
1515
push-dist:
1616
name: Push dist
17+
permissions:
18+
contents: write
1719
runs-on: ubuntu-latest
1820
timeout-minutes: 10
1921

2022
steps:
2123
- uses: actions/checkout@v4
22-
- uses: pnpm/action-setup@v3
23-
with:
24-
version: 8
24+
- uses: pnpm/action-setup@v4
2525
- uses: actions/setup-node@v4
2626
with:
27-
node-version: 18
27+
node-version: 20
2828
cache: pnpm
2929
- name: Install Dependencies
3030
run: pnpm install --frozen-lockfile
31+
32+
- run: pnpm build
33+
- run: pnpm i -f # re-sync injected deps
34+
3135
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
3236
with:
3337
branch: dist

.npmrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Docs: https://pnpm.io/npmrc
2+
# https://github.com/emberjs/rfcs/pull/907
3+
4+
# we don't want addons to be bad citizens of the ecosystem
5+
auto-install-peers=false
6+
7+
# we want true isolation,
8+
# if a dependency is not declared, we want an error
9+
resolve-peers-from-workspace-root=false

config/ember-cli-update.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"schemaVersion": "1.0.0",
3-
"projectName": "ember-power-select",
3+
"projectName": "ember-power-select-with-create",
44
"packages": [
55
{
66
"name": "@embroider/addon-blueprint",
7-
"version": "2.16.0",
7+
"version": "4.1.2",
88
"blueprints": [
99
{
1010
"name": "@embroider/addon-blueprint",

ember-power-select-with-create/.eslintignore

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

ember-power-select-with-create/.eslintrc.cjs

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

ember-power-select-with-create/.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
};
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
{
22
"plugins": [
33
"@embroider/addon-dev/template-colocation-plugin",
4-
["babel-plugin-ember-template-compilation", {
5-
"targetFormat": "hbs",
6-
"transforms": []
7-
}],
8-
["module:decorator-transforms", { "runtime": { "import": "decorator-transforms/runtime" } }],
4+
[
5+
"babel-plugin-ember-template-compilation",
6+
{
7+
"targetFormat": "hbs",
8+
"transforms": []
9+
}
10+
],
11+
[
12+
"module:decorator-transforms",
13+
{ "runtime": { "import": "decorator-transforms/runtime" } }
14+
]
915
]
1016
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
23+
const esmParserOptions = {
24+
ecmaFeatures: { modules: true },
25+
ecmaVersion: 'latest',
26+
};
27+
28+
export default [
29+
js.configs.recommended,
30+
prettier,
31+
ember.configs.base,
32+
ember.configs.gjs,
33+
/**
34+
* Ignores must be in their own object
35+
* https://eslint.org/docs/latest/use/configure/ignore
36+
*/
37+
{
38+
ignores: ['dist/', 'declarations/', 'node_modules/', 'coverage/', '!**/.*'],
39+
},
40+
/**
41+
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
42+
*/
43+
{
44+
linterOptions: {
45+
reportUnusedDisableDirectives: 'error',
46+
},
47+
},
48+
{
49+
files: ['**/*.js'],
50+
languageOptions: {
51+
parser: babelParser,
52+
},
53+
},
54+
{
55+
files: ['**/*.{js,gjs}'],
56+
languageOptions: {
57+
parserOptions: esmParserOptions,
58+
globals: {
59+
...globals.browser,
60+
},
61+
},
62+
},
63+
{
64+
files: ['src/**/*'],
65+
plugins: {
66+
import: importPlugin,
67+
},
68+
rules: {
69+
// require relative imports use full extensions
70+
'import/extensions': ['error', 'always', { ignorePackages: true }],
71+
},
72+
},
73+
/**
74+
* CJS node files
75+
*/
76+
{
77+
files: [
78+
'**/*.cjs',
79+
'.prettierrc.js',
80+
'.stylelintrc.js',
81+
'.template-lintrc.js',
82+
'addon-main.cjs',
83+
],
84+
plugins: {
85+
n,
86+
},
87+
88+
languageOptions: {
89+
sourceType: 'script',
90+
ecmaVersion: 'latest',
91+
globals: {
92+
...globals.node,
93+
},
94+
},
95+
},
96+
/**
97+
* ESM node files
98+
*/
99+
{
100+
files: ['**/*.mjs'],
101+
plugins: {
102+
n,
103+
},
104+
105+
languageOptions: {
106+
sourceType: 'module',
107+
ecmaVersion: 'latest',
108+
parserOptions: esmParserOptions,
109+
globals: {
110+
...globals.node,
111+
},
112+
},
113+
},
114+
];

0 commit comments

Comments
 (0)