Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base and fix ci #928

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
integration-tests:
name: Integration Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 15
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -94,7 +94,7 @@ jobs:
test-packages:
name: Test Packages
runs-on: ${{ matrix.os }}
timeout-minutes: 15
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -121,7 +121,7 @@ jobs:
test-legacy-mocha:
name: Legacy Mocha Tests - ${{ matrix.node-version }}
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -140,12 +140,14 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: npm i -g npm@8
- run: pnpm --filter ember-cli-fastboot pretest:precook
- run: pnpm --filter ember-cli-fastboot test:mocha

try-scenarios:
name: "ember-try for ember-cli-fastboot: ${{ matrix.ember-try-scenario }}"
runs-on: ubuntu-latest
timeout-minutes: 7
timeout-minutes: 10

strategy:
fail-fast: false
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers=false
public-hoist-pattern=['ember-cli-addon-tests/*','eslint/*','prettier/*']
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"npm-run-all": "^4.1.5",
"release-it": "^14.2.2"
},
"resolutions": {
"fastboot": "4.1.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
Expand Down Expand Up @@ -54,8 +57,14 @@
},
"npm": false
},
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": ["@babel/*", "@eslint/*"]
}
},
"volta": {
"node": "16.18.1",
"yarn": "1.22.19"
"yarn": "1.22.19",
"pnpm": "7.33.5"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an old version of pnpm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the version currently in ci. I figured updating it should be separate.

}
}
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
32 changes: 15 additions & 17 deletions packages/ember-cli-fastboot/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,16 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'lib/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
'./**/.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./**/ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./**/lib/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -57,5 +50,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/testem.js
/test/
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
2 changes: 1 addition & 1 deletion packages/ember-cli-fastboot/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
};
8 changes: 7 additions & 1 deletion packages/ember-cli-fastboot/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ module.exports = function (defaults) {
*/

const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app);
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
};
10 changes: 10 additions & 0 deletions packages/ember-cli-fastboot/fix-node-modules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));

const packagesDir = path.resolve(__dirname, '../../packages');
const nodeModulesDir = path.resolve(__dirname, 'node_modules');
const precookedDir = path.resolve(__dirname, 'tmp', 'precooked_node_modules');

// eslint-disable-next-line no-undef
const shouldRestore = process.argv[2];
Expand All @@ -29,18 +30,27 @@ Options:
function run(shouldRestore) {
['fastboot', 'fastboot-express-middleware'].forEach((packageName) => {
const nodeModulesPackageDir = path.join(nodeModulesDir, packageName);
const precookedPackageDir = path.join(precookedDir, packageName);
const workspacesPackageDir = path.resolve(packagesDir, packageName);
if (fs.existsSync(nodeModulesPackageDir)) {
console.log(chalk.blue(`remove ${nodeModulesPackageDir}`));
fs.removeSync(nodeModulesPackageDir);
}
if (fs.existsSync(precookedPackageDir)) {
console.log(chalk.blue(`remove ${precookedPackageDir}`));
fs.removeSync(precookedPackageDir);
}
if (!shouldRestore) {
console.log(
chalk.green(
`symlink ${nodeModulesPackageDir} -> ${workspacesPackageDir}`
)
);
fs.symlinkSync(workspacesPackageDir, nodeModulesPackageDir, 'dir');
console.log(
chalk.green(`symlink ${precookedPackageDir} -> ${workspacesPackageDir}`)
);
fs.symlinkSync(workspacesPackageDir, precookedPackageDir, 'dir');
}
});
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable prettier/prettier */
/* eslint-disable no-undef, prettier/prettier */
/* eslint-env node */
'use strict';

const path = require('path');
Expand Down
47 changes: 26 additions & 21 deletions packages/ember-cli-fastboot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"release": "release-it",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test:mocha": "node fix-node-modules.mjs && mocha && node fix-node-modules.mjs -r",
"pretest:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js",
"test": "npm-run-all -s lint pretest:* test:*",
"test:mocha": "node fix-node-modules.mjs && mocha",
"test:ember": "ember test",
"test:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js",
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
Expand All @@ -35,7 +35,7 @@
"broccoli-merge-trees": "^4.2.0",
"broccoli-plugin": "^4.0.7",
"chalk": "^4.1.2",
"ember-cli-babel": "^7.26.6",
"ember-cli-babel": "^7.26.10",
"ember-cli-lodash-subset": "^2.0.1",
"ember-cli-preprocess-registry": "^3.3.0",
"ember-cli-version-checker": "^5.1.2",
Expand All @@ -45,14 +45,18 @@
"fs-extra": "^10.0.0",
"json-stable-stringify": "^1.0.1",
"md5-hex": "^3.0.1",
"node-fetch": "^2.6.7",
"recast": "^0.19.1",
"silent-error": "^1.1.1"
},
"fastbootDependencies": [
"node-fetch"
],
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@embroider/test-setup": "^0.37.0",
"@glimmer/component": "^1.0.4",
"@embroider/test-setup": "^0.48.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"body-parser": "^1.18.3",
Expand All @@ -66,35 +70,36 @@
"ember-cli": "~4.1.0",
"ember-cli-addon-tests": "^0.11.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator-for-testing": "^1.0.0",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.2",
"ember-sinon": "^2.2.0",
"ember-source": "~3.26.1",
"ember-resolver": "^8.0.3",
"ember-sinon": "^5.0.0",
"ember-source": "~3.28.11",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.2.0",
"ember-template-lint": "^3.15.0",
"ember-try": "^2.0.0",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.3.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"glob": "^7.1.3",
"lint-to-the-future": "^2.0.0",
"lint-to-the-future-eslint": "^2.0.1",
"loader.js": "^4.7.0",
"mocha": "^9.1.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.14.1",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.6.0",
"release-it": "^14.2.2",
"release-it-lerna-changelog": "^3.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/ember-cli-fastboot/test/fastboot-config-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ describe('FastBoot config', function () {

return app
.create('fastboot-config', {
emberVersion: 'latest',
emberDataVersion: 'latest',
emberVersion: '~3.28.12',
emberDataVersion: '~3.28.12',
})
.then(function () {
app.editPackageJSON((pkg) => {
delete pkg.devDependencies['ember-fetch'];
delete pkg.devDependencies['ember-welcome-page'];
// needed because @ember-data/store does `FastBoot.require('crypto')`
pkg.fastbootDependencies = ['crypto'];
pkg.fastbootDependencies = ['node-fetch', 'path', 'crypto'];
});
return app.run('npm', 'install');
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ describe('FastBootLocation Configuration', function () {

return app
.create('fastboot-location-config', {
emberVersion: 'latest',
emberDataVersion: 'latest',
emberVersion: '~3.28.12',
emberDataVersion: '~3.28.12',
})
.then(function () {
app.editPackageJSON((pkg) => {
delete pkg.devDependencies['ember-fetch'];
delete pkg.devDependencies['ember-welcome-page'];
// needed because @ember-data/store does `FastBoot.require('crypto')`
pkg.fastbootDependencies = ['crypto'];
pkg.fastbootDependencies = ['node-fetch', 'path', 'crypto'];
});
return app.run('npm', 'install');
})
Expand Down
6 changes: 3 additions & 3 deletions packages/ember-cli-fastboot/test/fastboot-location-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ describe('FastBootLocation', function () {

return app
.create('fastboot-location', {
emberVersion: 'latest',
emberDataVersion: 'latest',
emberVersion: '~3.28.12',
emberDataVersion: '~3.28.12',
})
.then(function () {
app.editPackageJSON((pkg) => {
delete pkg.devDependencies['ember-fetch'];
delete pkg.devDependencies['ember-welcome-page'];
// needed because @ember-data/store does `FastBoot.require('crypto')`
pkg.fastbootDependencies = ['crypto'];
pkg.fastbootDependencies = ['node-fetch', 'path', 'crypto'];
});
return app.run('npm', 'install');
})
Expand Down
6 changes: 3 additions & 3 deletions packages/ember-cli-fastboot/test/package-json-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ describe('generating package.json', function () {
before(function () {
return customApp
.create('customized-outputpaths', {
emberVersion: 'latest',
emberDataVersion: 'latest',
emberVersion: '~3.28.12',
emberDataVersion: '~3.28.12',
})
.then(function () {
customApp.editPackageJSON((pkg) => {
delete pkg.devDependencies['ember-fetch'];
delete pkg.devDependencies['ember-welcome-page'];
// needed because @ember-data/store does `FastBoot.require('crypto')`
pkg.fastbootDependencies = ['crypto'];
pkg.fastbootDependencies = ['node-fetch', 'path', 'crypto'];
});
return customApp.run('npm', 'install');
})
Expand Down
Loading
Loading