diff --git a/package.json b/package.json index 3aa22de6..f453c39d 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ }, "pnpm": { "patchedDependencies": { - "fastboot": "patches/fastboot.patch", - "ember-source@6.11.0": "patches/ember-source@6.11.0.patch" + "fastboot": "patches/fastboot.patch" } } } diff --git a/packages/ember-auto-import/ts/package.ts b/packages/ember-auto-import/ts/package.ts index 02e3810b..febe029c 100644 --- a/packages/ember-auto-import/ts/package.ts +++ b/packages/ember-auto-import/ts/package.ts @@ -591,8 +591,22 @@ export default class Package { '<3.27.0', { includePrerelease: true } ); - let templateCompilerPath: string = (emberSource as any).absolutePaths - .templateCompiler; + let templateCompilerPath: string; + if ((emberSource as any).absolutePaths) { + templateCompilerPath = (emberSource as any).absolutePaths + .templateCompiler; + } else { + // v7+ ember-source no longer provides absolutePaths; resolve from + // the host app's directory through the package exports map + // eslint-disable-next-line @typescript-eslint/no-var-requires + let { createRequire } = require('module') as { + createRequire: (filename: string) => NodeRequire; + }; + let appRequire = createRequire(join(this.root, 'package.json')); + templateCompilerPath = appRequire.resolve( + 'ember-source/ember-template-compiler/index.js' + ); + } const babelPluginPrecompile = ensureModuleApiPolyfill ? [ diff --git a/patches/ember-source@6.11.0.patch b/patches/ember-source@6.11.0.patch deleted file mode 100644 index f0cac9d5..00000000 --- a/patches/ember-source@6.11.0.patch +++ /dev/null @@ -1,201 +0,0 @@ -diff --git a/dist/ember.debug.js b/dist/ember.debug.js -index 58e681ac01f6dd9d202041bdabcec15ae4d3faea..f847880a662edfcaf0c64546dd37fffeaad0d3ca 100644 ---- a/dist/ember.debug.js -+++ b/dist/ember.debug.js -@@ -10221,7 +10221,7 @@ var define, require; - the subsequent cache invalidations of the `@cached` properties who were - using this `trackedProp`. - -- Remember that setting tracked data should only be done during initialization, -+ Remember that setting tracked data should only be done during initialization, - or as the result of a user action. Setting tracked data during render - (such as in a getter), is not supported. - -@@ -14292,25 +14292,25 @@ var define, require; - /** - `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same - as the catch block of a try/catch statement. -- -+ - ```js - function findAuthor(){ - throw new Error('couldn\'t find that author'); - } -- -+ - // synchronous - try { - findAuthor(); - } catch(reason) { - // something went wrong - } -- -+ - // async with promises - findAuthor().catch(function(reason){ - // something went wrong - }); - ``` -- -+ - @method catch - @param {Function} onRejection - @param {String} [label] optional string for labeling the promise. -@@ -14324,9 +14324,9 @@ var define, require; - /** - `finally` will be invoked regardless of the promise's fate just as native - try/catch/finally behaves -- -+ - Synchronous example: -- -+ - ```js - findAuthor() { - if (Math.random() > 0.5) { -@@ -14334,7 +14334,7 @@ var define, require; - } - return new Author(); - } -- -+ - try { - return findAuthor(); // succeed or fail - } catch(error) { -@@ -14344,9 +14344,9 @@ var define, require; - // doesn't affect the return value - } - ``` -- -+ - Asynchronous example: -- -+ - ```js - findAuthor().catch(function(reason){ - return findOtherAuthor(); -@@ -14354,7 +14354,7 @@ var define, require; - // author was either found, or not - }); - ``` -- -+ - @method finally - @param {Function} callback - @param {String} [label] optional string for labeling the promise. -@@ -39439,7 +39439,7 @@ var define, require; - nextSibling: null - }), layout, dynamicScope); - let result = this.result = iterator.sync(); -- associateDestroyableChild(owner, result); -+ associateDestroyableChild(this, result); - this.render = errorLoopTransaction(() => { - if (isDestroying(result) || isDestroyed(result)) return; - return result.rerender({ -diff --git a/dist/ember.prod.js b/dist/ember.prod.js -index 7e3f801442ce6dcf77caf7dbc0d69c6a838877cb..4c4fd5ed4d9f92cfa532b3ffa80ec8036570b401 100644 ---- a/dist/ember.prod.js -+++ b/dist/ember.prod.js -@@ -8921,7 +8921,7 @@ var define, require; - the subsequent cache invalidations of the `@cached` properties who were - using this `trackedProp`. - -- Remember that setting tracked data should only be done during initialization, -+ Remember that setting tracked data should only be done during initialization, - or as the result of a user action. Setting tracked data during render - (such as in a getter), is not supported. - -@@ -12889,25 +12889,25 @@ var define, require; - /** - `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same - as the catch block of a try/catch statement. -- -+ - ```js - function findAuthor(){ - throw new Error('couldn\'t find that author'); - } -- -+ - // synchronous - try { - findAuthor(); - } catch(reason) { - // something went wrong - } -- -+ - // async with promises - findAuthor().catch(function(reason){ - // something went wrong - }); - ``` -- -+ - @method catch - @param {Function} onRejection - @param {String} [label] optional string for labeling the promise. -@@ -12921,9 +12921,9 @@ var define, require; - /** - `finally` will be invoked regardless of the promise's fate just as native - try/catch/finally behaves -- -+ - Synchronous example: -- -+ - ```js - findAuthor() { - if (Math.random() > 0.5) { -@@ -12931,7 +12931,7 @@ var define, require; - } - return new Author(); - } -- -+ - try { - return findAuthor(); // succeed or fail - } catch(error) { -@@ -12941,9 +12941,9 @@ var define, require; - // doesn't affect the return value - } - ``` -- -+ - Asynchronous example: -- -+ - ```js - findAuthor().catch(function(reason){ - return findOtherAuthor(); -@@ -12951,7 +12951,7 @@ var define, require; - // author was either found, or not - }); - ``` -- -+ - @method finally - @param {Function} callback - @param {String} [label] optional string for labeling the promise. -@@ -36989,7 +36989,7 @@ var define, require; - nextSibling: null - }), layout, dynamicScope); - let result = this.result = iterator.sync(); -- associateDestroyableChild(owner, result); -+ associateDestroyableChild(this, result); - this.render = errorLoopTransaction(() => { - if (isDestroying(result) || isDestroyed(result)) return; - return result.rerender({ -diff --git a/dist/packages/shared-chunks/index-DaCZcoCY.js b/dist/packages/shared-chunks/index-DaCZcoCY.js -index dc6321247b9fa08737eef218fcfb520853c312ee..17ac4d3d9eefd4b703ee78e7882bdab775a0c560 100644 ---- a/dist/packages/shared-chunks/index-DaCZcoCY.js -+++ b/dist/packages/shared-chunks/index-DaCZcoCY.js -@@ -5205,7 +5205,7 @@ class ClassicRootState { - nextSibling: null - }), layout, dynamicScope); - let result = this.result = iterator.sync(); -- associateDestroyableChild(owner, result); -+ associateDestroyableChild(this, result); - this.render = errorLoopTransaction(() => { - if (isDestroying(result) || isDestroyed(result)) return; - return result.rerender({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index df732d32..80d71608 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,6 @@ settings: excludeLinksFromLockfile: false patchedDependencies: - ember-source@6.11.0: - hash: 2cf10cdc261c57b660da8a7823e1fbc57e3bddb4dc797e68a98530f62e598667 - path: patches/ember-source@6.11.0.patch fastboot: hash: f399fe46775908a599a0998a41aa72bae16315c83fd93ee1a25317e75f0f3979 path: patches/fastboot.patch @@ -709,7 +706,7 @@ importers: version: ember-source@6.12.0-alpha.4(@glimmer/component@2.0.0)(rsvp@4.8.5) ember-source-latest: specifier: npm:ember-source@latest - version: ember-source@6.11.0(patch_hash=2cf10cdc261c57b660da8a7823e1fbc57e3bddb4dc797e68a98530f62e598667)(@glimmer/component@2.0.0)(rsvp@4.8.5) + version: ember-source@6.11.0(@glimmer/component@2.0.0)(rsvp@4.8.5) ember-source-lts: specifier: npm:ember-source@~3.4.0 version: ember-source@3.4.8 @@ -2560,66 +2557,79 @@ packages: resolution: {integrity: sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.59.0': resolution: {integrity: sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.59.0': resolution: {integrity: sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.59.0': resolution: {integrity: sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.59.0': resolution: {integrity: sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.59.0': resolution: {integrity: sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==} cpu: [loong64] os: [linux] + libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.59.0': resolution: {integrity: sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.59.0': resolution: {integrity: sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==} cpu: [ppc64] os: [linux] + libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.59.0': resolution: {integrity: sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.59.0': resolution: {integrity: sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.59.0': resolution: {integrity: sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.59.0': resolution: {integrity: sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.59.0': resolution: {integrity: sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openbsd-x64@4.59.0': resolution: {integrity: sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==} @@ -18533,7 +18543,7 @@ snapshots: - supports-color - webpack - ember-source@6.11.0(patch_hash=2cf10cdc261c57b660da8a7823e1fbc57e3bddb4dc797e68a98530f62e598667)(@glimmer/component@2.0.0)(rsvp@4.8.5): + ember-source@6.11.0(@glimmer/component@2.0.0)(rsvp@4.8.5): dependencies: '@babel/core': 7.29.0 '@ember/edition-utils': 1.2.0