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

Convert Existence Checks to Embroider Macros #8167

Closed
Closed
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
strict-peer-dependencies: true
45 changes: 13 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,36 @@
"test-external:ember-data-relationship-tracker": "node ./scripts/test-external-partner-project.js ember-data-relationship-tracker https://github.com/ef4/ember-data-relationship-tracker.git"
},
"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-decorators": "^7.19.3",
"@babel/plugin-proposal-decorators": "^7.19.6",
"@babel/plugin-transform-typescript": "^7.19.3",
"@babel/core": "^7.19.3",
"@babel/runtime": "^7.19.4",
"@ember/edition-utils": "^1.2.0",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "~2.8.1",
"@glimmer/component": "^1.1.2",
"@glimmer/env": "^0.1.7",
"@types/ember": "^4.0.1",
"@types/ember-qunit": "^5.0.2",
"@types/ember-testing-helpers": "^0.0.4",
"@types/ember__debug": "^4.0.1",
"@types/ember__application": "^4.0.2",
"@types/ember__array": "^4.0.2",
"@types/ember__component": "^4.0.10",
"@types/ember__controller": "^4.0.2",
"@types/ember__debug": "^4.0.1",
"@types/ember__engine": "^4.0.2",
"@types/ember__error": "^4.0.0",
"@types/ember__object": "^4.0.4",
"@types/ember__polyfills": "^4.0.0",
"@types/ember__routing": "^4.0.11",
"@types/ember__runloop": "^4.0.1",
"@types/ember__service": "^4.0.0",
"@types/ember__string": "^3.0.9",
"@types/ember__template": "^4.0.0",
"@types/ember__test": "^4.0.0",
"@types/htmlbars-inline-precompile": "^3.0.0",
"@types/ember__application": "^4.0.2",
"@types/ember__service": "^4.0.0",
"@types/ember__utils": "^4.0.1",
"@types/ember__object": "^4.0.4",
"@types/ember__engine": "^4.0.2",
"@types/ember__test-helpers": "^2.8.1",
"@types/ember__routing": "^4.0.11",
"@types/ember__utils": "^4.0.1",
"@types/htmlbars-inline-precompile": "^3.0.0",
"@types/qunit": "^2.19.3",
"@types/rsvp": "^4.0.4",
"@typescript-eslint/eslint-plugin": "^5.40.1",
Expand All @@ -93,43 +92,26 @@
"debug": "^4.3.4",
"ember-auto-import": "^2.4.3",
"ember-cli": "~4.8.0",
"ember-cli-app-version": "^5.0.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-blueprint-test-helpers": "^0.19.2",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-htmlbars": "^6.1.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-path-utils": "^1.0.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-string-utils": "^1.1.0",
"ember-cli-terser": "~4.0.2",
"ember-cli-test-loader": "^3.0.0",
"ember-cli-typescript": "^5.1.1",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-cli-version-checker": "^5.1.2",
"ember-cli-yuidoc": "^0.9.1",
"ember-compatibility-helpers": "^1.2.6",
"ember-decorators-polyfill": "^1.1.5",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-qunit": "^6.0.0",
"ember-resolver": "^8.0.3",
"ember-source": "~4.7.1",
"ember-source-channel-url": "^3.0.0",
"ember-try": "^2.0.0",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-ember": "^11.1.0",
"eslint-plugin-ember-data": "link:./packages/unpublished-eslint-rules",
"eslint-plugin-ember-data": "link:packages/unpublished-eslint-rules",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"execa": "^5.0.0",
"execa": "^5.1.1",
"fromentries": "^1.3.2",
"git-repo-info": "^2.1.1",
"glob": "^8.0.3",
Expand All @@ -154,7 +136,6 @@
"webpack": "^5.74.0",
"zlib": "1.0.5"
},
"dependencies": {},
"engines": {
"node": "^14.8.0 || 16.* || >= 18.*",
"yarn": "use pnpm",
Expand All @@ -165,7 +146,7 @@
"node": "16.18.0",
"pnpm": "7.13.5"
},
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"changelog": {
"labels": {
"changelog:breaking": ":boom: Breaking Change",
Expand Down
1 change: 1 addition & 0 deletions packages/-ember-data/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = function (defaults) {
'ember-cli-babel': {
throwUnlessParallelizable: true,
includeExternalHelpers: true,
enableTypeScriptTransform: true,
},
'ember-cli-terser': terserSettings,
'@embroider/macros': {
Expand Down
28 changes: 13 additions & 15 deletions packages/-ember-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,36 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ember-data/adapter": "4.9.0-alpha.6",
"@ember-data/debug": "4.9.0-alpha.6",
"@ember-data/model": "4.9.0-alpha.6",
"@ember-data/private-build-infra": "4.9.0-alpha.6",
"@ember-data/record-data": "4.9.0-alpha.6",
"@ember-data/serializer": "4.9.0-alpha.6",
"@ember-data/store": "4.9.0-alpha.6",
"@ember-data/tracking": "4.9.0-alpha.6",
"@ember-data/adapter": "workspace:4.9.0-alpha.6",
"@ember-data/debug": "workspace:4.9.0-alpha.6",
"@ember-data/model": "workspace:4.9.0-alpha.6",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6",
"@ember-data/record-data": "workspace:4.9.0-alpha.6",
"@ember-data/serializer": "workspace:4.9.0-alpha.6",
"@ember-data/store": "workspace:4.9.0-alpha.6",
"@ember-data/tracking": "workspace:4.9.0-alpha.6",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^3.0.0",
"@embroider/macros": "^1.9.0",
"@glimmer/env": "^0.1.7",
"broccoli-merge-trees": "^4.2.0",
"ember-auto-import": "^2.4.3",
"ember-cli-babel": "^7.26.11",
"ember-cli-typescript": "^5.1.1",
"ember-inflector": "^4.0.2"
},
"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/plugin-transform-typescript": "^7.19.3",
"@ember-data/unpublished-test-infra": "4.9.0-alpha.6",
"@babel/core": "^7.19.3",
"@babel/runtime": "^7.19.4",
"@ember-data/unpublished-test-infra": "link:../unpublished-test-infra",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "~2.8.1",
"@glimmer/component": "^1.1.2",
"@types/ember": "^4.0.1",
"@types/ember__object": "^4.0.4",
"@types/ember-qunit": "^5.0.2",
"@types/ember-testing-helpers": "^0.0.4",
"@types/ember__debug": "^4.0.1",
"@types/ember__object": "^4.0.4",
"@types/ember__test-helpers": "^2.8.1",
"@types/ember__utils": "^4.0.1",
"@types/qunit": "^2.19.3",
Expand All @@ -66,6 +65,7 @@
"broccoli-string-replace": "^0.1.2",
"broccoli-test-helper": "^2.0.0",
"broccoli-uglify-sourcemap": "^4.0.0",
"ember-cached-decorator-polyfill": "^1.0.1",
"ember-cli": "~4.8.0",
"ember-cli-app-version": "^5.0.0",
"ember-cli-dependency-checker": "^3.3.1",
Expand All @@ -74,8 +74,6 @@
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "~4.0.2",
"ember-cli-test-loader": "^3.0.0",
"ember-cached-decorator-polyfill": "^1.0.1",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-cli-yuidoc": "^0.9.1",
"ember-compatibility-helpers": "^1.2.6",
"ember-decorators-polyfill": "^1.1.5",
Expand Down Expand Up @@ -112,5 +110,5 @@
"node": "16.18.0",
"pnpm": "7.13.5"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]"
}
27 changes: 15 additions & 12 deletions packages/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,26 @@
"test:node": "mocha"
},
"peerDependencies": {
"ember-inflector": "^4.0.2"
"ember-inflector": "^4.0.2",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6",
"@ember-data/store": "workspace:4.9.0-alpha.6",
"@ember/string": "^3.0.0"
},
"peerDependenciesMeta": {},
"dependencies": {
"@ember-data/private-build-infra": "4.9.0-alpha.6",
"@ember-data/store": "4.9.0-alpha.6",
"@embroider/macros": "^1.9.0",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^3.0.0",
"ember-auto-import": "^2.4.3",
"ember-cli-babel": "^7.26.11",
"ember-cli-test-info": "^1.0.0",
"ember-cli-typescript": "^5.1.1"
"ember-cli-test-info": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/runtime": "^7.19.3",
"@ember-data/unpublished-test-infra": "4.9.0-alpha.6",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6",
"@ember-data/store": "workspace:4.9.0-alpha.6",
"@ember/string": "^3.0.0",
"@babel/core": "^7.19.6",
"@babel/runtime": "^7.19.4",
"@ember-data/unpublished-test-infra": "link:../unpublished-test-infra",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "~2.8.1",
"broccoli-asset-rev": "^3.0.0",
Expand All @@ -45,10 +49,9 @@
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "~4.0.2",
"ember-inflector": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-inflector": "^4.0.2",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-qunit": "^6.0.0",
"ember-resolver": "^8.0.3",
Expand All @@ -71,5 +74,5 @@
"node": "16.18.0",
"pnpm": "7.13.5"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]"
}
5 changes: 5 additions & 0 deletions packages/canary-features/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
module.exports = {
name: require('./package').name,
options: {
'ember-cli-babel': {
enableTypeScriptTransform: true,
},
},
treeFor() {
// Nested addons don't call isEnabled automatically,
// So this ensures that we return empty trees whenever
Expand Down
8 changes: 4 additions & 4 deletions packages/canary-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"directories": {},
"scripts": {},
"dependencies": {
"ember-cli-babel": "^7.26.11",
"ember-cli-typescript": "^5.1.1"
"@embroider/macros": "^1.9.0",
"ember-cli-babel": "^7.26.11"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/runtime": "^7.19.4",
"babel-plugin-debug-macros": "^0.3.4",
"babel-plugin-filter-imports": "^4.0.0",
Expand Down Expand Up @@ -48,5 +48,5 @@
"node": "16.18.0",
"pnpm": "7.13.5"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]"
}
21 changes: 11 additions & 10 deletions packages/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@
"build": "ember build",
"start": "ember serve"
},
"peerDependencies": {
"@ember/string": "^3.0.0"
},
"dependencies": {
"@ember-data/private-build-infra": "4.9.0-alpha.6",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^3.0.0",
"@embroider/macros": "^1.9.0",
"ember-auto-import": "^2.4.3",
"ember-cli-babel": "^7.26.11",
"ember-cli-test-info": "^1.0.0",
"ember-cli-typescript": "^5.1.1"
"ember-cli-babel": "^7.26.11"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/runtime": "^7.19.3",
"@ember-data/unpublished-test-infra": "4.9.0-alpha.6",
"@babel/core": "^7.19.6",
"@babel/runtime": "^7.19.4",
"@ember-data/unpublished-test-infra": "link:../unpublished-test-infra",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.0",
"@ember/test-helpers": "~2.8.1",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~4.8.0",
Expand All @@ -42,7 +44,6 @@
"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": "^1.0.0",
"ember-qunit": "^6.0.0",
"ember-resolver": "^8.0.3",
Expand All @@ -65,5 +66,5 @@
"node": "16.18.0",
"pnpm": "7.13.5"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]"
}
1 change: 1 addition & 0 deletions packages/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = Object.assign({}, addonBaseConfig, {
'ember-inflector',
'ember',
'rsvp',
'@embroider/macros/runtime',
];
},
});
28 changes: 15 additions & 13 deletions packages/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,32 @@
"test:node": "mocha"
},
"peerDependencies": {
"ember-inflector": "^4.0.2"
"ember-inflector": "^4.0.2",
"@ember-data/store": "workspace:4.9.0-alpha.6",
"@ember-data/canary-features": "workspace:4.9.0-alpha.6",
"@ember-data/tracking": "workspace:4.9.0-alpha.6",
"@ember/string": "^3.0.0"
},
"dependencies": {
"@ember-data/canary-features": "4.9.0-alpha.6",
"@ember-data/private-build-infra": "4.9.0-alpha.6",
"@ember-data/tracking": "4.9.0-alpha.6",
"@ember-data/store": "4.9.0-alpha.6",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^3.0.0",
"@embroider/macros": "^1.9.0",
"ember-auto-import": "^2.4.3",
"ember-cached-decorator-polyfill": "^0.1.4",
"ember-cli-babel": "^7.26.11",
"ember-cli-string-utils": "^1.1.0",
"ember-cli-test-info": "^1.0.0",
"ember-cli-typescript": "^5.1.1",
"ember-compatibility-helpers": "^1.2.6",
"inflection": "~1.13.4"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/runtime": "^7.19.3",
"@ember-data/unpublished-test-infra": "4.9.0-alpha.6",
"@babel/core": "^7.19.6",
"@babel/runtime": "^7.19.4",
"@ember-data/unpublished-test-infra": "link:../unpublished-test-infra",
"@ember-data/canary-features": "workspace:4.9.0-alpha.6",
"@ember-data/store": "workspace:4.9.0-alpha.6",
"@ember-data/tracking": "workspace:4.9.0-alpha.6",
"@ember/string": "^3.0.0",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "~2.8.1",
"broccoli-asset-rev": "^3.0.0",
Expand All @@ -54,9 +57,8 @@
"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": "^1.0.0",
"ember-inflector": "^4.0.2",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-qunit": "^6.0.0",
"ember-resolver": "^8.0.3",
"ember-source": "~4.7.1",
Expand All @@ -78,5 +80,5 @@
"node": "16.18.0",
"pnpm": "7.13.5"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]"
}
Loading