Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ jobs:
run: pnpm lint:hbs
- name: Lint (js)
run: pnpm lint:js
- name: Run test
- name: build
run: EMBER_ENV=test pnpm ember build --environment test
- name: test ember debug
run: pnpm ember-debug:test
- name: Run test inspector ui
run: pnpm test
env:
COVERAGE: 'true'
Expand Down Expand Up @@ -110,14 +114,12 @@ jobs:
- name: Set NO_EXTEND_PROTOTYPES
if: matrix.scenario == 'ember-default-no-prototype-extensions'
run: echo "NO_EXTEND_PROTOTYPES==true" >> .GITHUB_ENV
- name: Setup ember-try scenario
run: pnpm ember try:one ${{ matrix.scenario }} --skip-cleanup --- cat package.json
- name: Build
- name: Build Inspector
run: pnpm ember build --environment test
- name: Setup ember-try scenario
run: pnpm ember-debug:try:one ${{ matrix.scenario }} --skip-cleanup --- cat package.json
- name: Run test
# Due to a bug in ember-cli, running `ember test` with `--path` doesn't set `EMBER_ENV=test`
# See https://github.com/ember-cli/ember-cli/issues/8922
run: EMBER_ENV=test pnpm ember test --path dist --filter="Ember Debug"
run: pnpm ember-debug:test

build:
name: Build extensions
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

# dependencies
/node_modules/
/test-apps/classic/dist
/test-apps/classic/node_modules

# misc
/.env*
Expand Down
9 changes: 8 additions & 1 deletion ember_debug/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
'utils/type-check.js',
'port.js',
'utils/ember.js',
'utils/type-check',
'models/profile-node.js',
'libs/promise-assembler.js',
'lib/versions.js',
Expand All @@ -20,5 +21,11 @@ export default {
dir: 'dist',
},

plugins: [babel(), nodeResolve(), commonjs(), del({ targets: 'dist' })],
plugins: [
babel(),
nodeResolve(),
commonjs(),
// eslint-disable-next-line no-undef
process.env.NO_DEL_DIST && del({ targets: 'dist' }),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is for build watch mode.
we want to pre-build ember-debug
and then start build watch for ember-debug and inspector-ui.
ember-cli-build.js depends on dist output of ember-debug.
but when both watches are started, dist gets removed and the build watch for inspector-ui fails

].filter(Boolean),
};
2 changes: 2 additions & 0 deletions ember_debug/utils/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export function isInVersionSpecifier(specifier, version) {
let operator = specifier[0];
if (Number.isNaN(+operator)) {
specifier = specifier.slice(1);
} else {
return specifier === version;
}
specifier = cleanupVersion(specifier).split('.');
version2 = cleanupVersion(version).split('.');
Expand Down
21 changes: 20 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export default ts.config(
'dist/',
'ember_debug/dist/',
'node_modules/',
'test-apps/classic/node_modules/',
'test-apps/classic/dist/',
'test-apps/classic/public/',
'test-apps/tests/helpers/index.ts',
'coverage/',
'!**/.*',
'vendor/',
Expand Down Expand Up @@ -93,6 +97,7 @@ export default ts.config(
...globals.browser,
basicContext: false,
requireModule: false,
chrome: true,
},
},
},
Expand All @@ -113,10 +118,21 @@ export default ts.config(
},
},
{
files: ['tests/**/*-test.{js,gjs,ts,gts}'],
files: [
'tests/**/*-test.{js,gjs,ts,gts}',
'test-apps/classic/tests/**/*-test.{js,gjs,ts,gts}',
],
plugins: {
qunit,
},
languageOptions: {
globals: {
...globals.browser,
basicContext: false,
requireModule: false,
chrome: true,
},
},
},
/**
* CJS node files
Expand All @@ -125,15 +141,18 @@ export default ts.config(
files: [
'**/*.cjs',
'config/**/*.js',
'test-apps/classic/config/**/*.js',
'lib/*/index.js',
'scripts/**/*.js',
'testem.js',
'test-apps/classic/testem.js',
'testem*.js',
'.prettierrc.js',
'.stylelintrc.js',
'.template-lintrc.js',
'babel.config.js',
'ember-cli-build.js',
'test-apps/classic/ember-cli-build.js',
'gulpfile.js',
],
plugins: {
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
"start": "ember serve",
"test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\" --prefixColors auto",
"test:ember": "pnpm build:ember-debug && COVERAGE=true ember test",
"watch": "pnpm '/watch:/'",
"watch-test": "pnpm '/watch-test:/'",
"watch-test:ember-debug": "pnpm --filter ember-debug watch",
"watch-test:inspector-ui": "ember test --serv",
"watch": "export DEL_RUN_ONCE=true; pnpm build:ember-debug && pnpm '/watch:/'",
"watch:inspector-ui": "ember build --watch",
"watch:ember-debug": "pnpm --filter ember-debug watch",
"watch:inspector-ui": "ember build --watch"
"ember-debug:try:one": "pnpm --filter '*' ember:try:one",
"ember-debug:test": "pnpm --filter '*' ember-debug-test"
},
"dependencies": {
"got": "^11.8.6",
Expand Down
Loading