diff --git a/packages/addon-shim/.prettierignore b/packages/addon-shim/.prettierignore index 4178fd571..9385391f2 100644 --- a/packages/addon-shim/.prettierignore +++ b/packages/addon-shim/.prettierignore @@ -1,25 +1,13 @@ # unconventional js /blueprints/*/files/ -/vendor/ # compiled output /dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ # misc /coverage/ !.* -.eslintcache -.lint-todo/ +.*/ # ember-try /.node_modules.ember-try/ -/bower.json.ember-try -/npm-shrinkwrap.json.ember-try -/package.json.ember-try -/package-lock.json.ember-try -/yarn.lock.ember-try diff --git a/packages/compat/src/babel-plugin-adjust-imports.ts b/packages/compat/src/babel-plugin-adjust-imports.ts index e75080dec..7f7319817 100644 --- a/packages/compat/src/babel-plugin-adjust-imports.ts +++ b/packages/compat/src/babel-plugin-adjust-imports.ts @@ -6,7 +6,7 @@ import { ImportUtil } from 'babel-import-util'; import { readJSONSync } from 'fs-extra'; import type { CompatResolverOptions } from './resolver-transform'; import type { Package } from '@embroider/core'; -import { locateEmbroiderWorkingDir, packageName, Resolver, unrelativize } from '@embroider/core'; +import { cleanUrl, locateEmbroiderWorkingDir, packageName, Resolver, unrelativize } from '@embroider/core'; import { snippetToDasherizedName } from './dasherize-component-name'; import type { ActivePackageRules, ComponentRules, ModuleRules, TemplateRules } from './dependency-rules'; import { appTreeRulesDir } from './dependency-rules'; @@ -73,7 +73,7 @@ export default function main(babel: typeof Babel) { }; function addExtraImports(t: BabelTypes, path: NodePath, config: InternalConfig) { - let filename: string = (path.hub as any).file.opts.filename; + let filename: string = cleanUrl((path.hub as any).file.opts.filename); let entry = config.extraImports[filename]; let adder = new ImportUtil(t, path); if (entry) { diff --git a/packages/compat/src/resolver-transform.ts b/packages/compat/src/resolver-transform.ts index 7c469c33b..52f4e23e1 100644 --- a/packages/compat/src/resolver-transform.ts +++ b/packages/compat/src/resolver-transform.ts @@ -14,7 +14,7 @@ import { join, sep } from 'path'; import { readJSONSync } from 'fs-extra'; import { dasherize, snippetToDasherizedName } from './dasherize-component-name'; import type { ResolverOptions as CoreResolverOptions } from '@embroider/core'; -import { Resolver, locateEmbroiderWorkingDir } from '@embroider/core'; +import { Resolver, cleanUrl, locateEmbroiderWorkingDir } from '@embroider/core'; import type CompatOptions from './options'; import type { AuditMessage, Loc } from './audit'; import { camelCase, mergeWith } from 'lodash'; @@ -342,6 +342,10 @@ class TemplateResolver implements ASTPlugin { } private findRules(absPath: string): PreprocessedComponentRule | undefined { + // when babel is invoked by vite our filenames can have query params still + // hanging off them. That would break rule matching. + absPath = cleanUrl(absPath, true); + let fileRules = this.rules.files.get(absPath); let componentRules: PreprocessedComponentRule | undefined; diff --git a/packages/core/src/module-resolver.ts b/packages/core/src/module-resolver.ts index 293aa486c..53d4b2aa7 100644 --- a/packages/core/src/module-resolver.ts +++ b/packages/core/src/module-resolver.ts @@ -305,7 +305,9 @@ export class Resolver { let fastbootFile = engineConfig.fastbootFiles[candidate]; if (fastbootFile) { if (fastbootFile.shadowedFilename) { - let { names } = describeExports(readFileSync(resolve(pkg.root, fastbootFile.shadowedFilename), 'utf8'), {}); + let { names } = describeExports(readFileSync(resolve(pkg.root, fastbootFile.shadowedFilename), 'utf8'), { + configFile: false, + }); let switchFile = fastbootSwitch(candidate, resolve(pkg.root, 'package.json'), names); if (switchFile === request.fromFile) { return logTransition('internal lookup from fastbootSwitch', request); @@ -1237,7 +1239,7 @@ export class Resolver { `${matched.entry['app-js'].fromPackageName} declared ${inEngineSpecifier} in packageJSON.ember-addon.app-js, but that module does not exist` ); } - let { names } = describeExports(readFileSync(foundAppJS.filename, 'utf8'), {}); + let { names } = describeExports(readFileSync(foundAppJS.filename, 'utf8'), { configFile: false }); return request.virtualize(fastbootSwitch(matched.matched, resolve(engine.root, 'package.json'), names)); } } diff --git a/packages/test-setup/package.json b/packages/test-setup/package.json index b8ae5fede..a2f050180 100644 --- a/packages/test-setup/package.json +++ b/packages/test-setup/package.json @@ -12,6 +12,7 @@ "src/index.js" ], "dependencies": { + "broccoli-plugin": "^4.0.7", "lodash": "^4.17.21", "resolve": "^1.20.0" }, diff --git a/packages/test-setup/src/index.ts b/packages/test-setup/src/index.ts index 19c46901f..a88ee633c 100644 --- a/packages/test-setup/src/index.ts +++ b/packages/test-setup/src/index.ts @@ -1,6 +1,8 @@ import type { PipelineOptions } from '@embroider/compat'; import type { PackagerConstructor } from '@embroider/core'; import type { Webpack } from '@embroider/webpack'; +import Plugin from 'broccoli-plugin'; +import { spawn } from 'child_process'; type EmberWebpackOptions = typeof Webpack extends PackagerConstructor ? Options : never; @@ -30,10 +32,6 @@ export function maybeEmbroider(app: any, opts: PipelineOptions { + return new Promise((resolve, reject) => { + const child = spawn(`npx vite build --outDir ${this.outputPath}`, { + cwd: process.cwd(), + shell: true, + stdio: 'inherit', + env: { ...process.env }, + }); + child.on('exit', code => (code === 0 ? resolve() : reject(new Error('vite build failed')))); + }); + } } export function embroiderSafe(extension?: object) { diff --git a/packages/vite/src/build.ts b/packages/vite/src/build.ts index b93cfedff..04dcc3ae1 100644 --- a/packages/vite/src/build.ts +++ b/packages/vite/src/build.ts @@ -1,15 +1,26 @@ import { fork } from 'child_process'; import type { Plugin } from 'vite'; -export function emberBuild(mode: string): Promise { - if (mode === 'build') { +export function emberBuild(command: string, mode: string): Promise { + if (command === 'build') { return new Promise((resolve, reject) => { - const child = fork('./node_modules/ember-cli/bin/ember', ['build', '--production']); + const child = fork('./node_modules/ember-cli/bin/ember', ['build', '--environment', mode], { + env: { + ...process.env, + EMBROIDER_PREBUILD: 'true', + }, + }); child.on('exit', code => (code === 0 ? resolve() : reject())); }); } return new Promise((resolve, reject) => { - const child = fork('./node_modules/ember-cli/bin/ember', ['build', '--watch'], { silent: true }); + const child = fork('./node_modules/ember-cli/bin/ember', ['build', '--watch', '--environment', mode], { + silent: true, + env: { + ...process.env, + EMBROIDER_PREBUILD: 'true', + }, + }); child.on('exit', code => (code === 0 ? resolve() : reject(new Error('ember build --watch failed')))); child.on('spawn', () => { child.stderr?.on('data', data => { @@ -26,15 +37,24 @@ export function emberBuild(mode: string): Promise { } export function compatPrebuild(): Plugin { - let mode = 'build'; + let viteCommand: string | undefined; + let viteMode: string | undefined; + return { name: 'embroider-builder', enforce: 'pre', - configureServer() { - mode = 'development'; + config(_config, { mode, command }) { + viteCommand = command; + viteMode = mode; }, async buildStart() { - await emberBuild(mode); + if (!viteCommand) { + throw new Error(`bug: embroider compatPrebuild did not detect Vite's command`); + } + if (!viteMode) { + throw new Error(`bug: embroider compatPrebuild did not detect Vite's mode`); + } + await emberBuild(viteCommand, viteMode); }, }; } diff --git a/packages/vite/src/esbuild-resolver.ts b/packages/vite/src/esbuild-resolver.ts index 9901443eb..d22c0b83a 100644 --- a/packages/vite/src/esbuild-resolver.ts +++ b/packages/vite/src/esbuild-resolver.ts @@ -4,7 +4,7 @@ import { ResolverLoader, virtualContent, locateEmbroiderWorkingDir } from '@embr import { readFileSync, readJSONSync } from 'fs-extra'; import { EsBuildModuleRequest } from './esbuild-request'; import assertNever from 'assert-never'; -import { resolve, join } from 'path'; +import { resolve } from 'path'; import { hbsToJS } from '@embroider/core'; import { Preprocessor } from 'content-tag'; @@ -82,7 +82,6 @@ export function esBuildResolver(root = process.cwd()): EsBuildPlugin { const code = readFileSync(filename, 'utf8'); const result = transform(preprocessor.process(code, { filename }), { - configFile: join(process.cwd(), 'babel.config.js'), filename, }); @@ -98,7 +97,7 @@ export function esBuildResolver(root = process.cwd()): EsBuildPlugin { build.onLoad({ filter: /\.hbs$/ }, async ({ path: filename }) => { const code = readFileSync(filename, 'utf8'); - const result = transform(hbsToJS(code), { configFile: join(process.cwd(), 'babel.config.js'), filename }); + const result = transform(hbsToJS(code), { filename }); if (!result || !result.code) { throw new Error(`Failed to load file ${filename} in esbuild-hbs-loader`); diff --git a/packages/vite/src/scripts.ts b/packages/vite/src/scripts.ts index 77f6ae412..4096f74e7 100644 --- a/packages/vite/src/scripts.ts +++ b/packages/vite/src/scripts.ts @@ -1,7 +1,7 @@ import type { Plugin } from 'vite'; import type { EmittedFile } from 'rollup'; import { JSDOM } from 'jsdom'; -import { readFileSync, readJSONSync } from 'fs-extra'; +import { readFileSync, readJSONSync, existsSync } from 'fs-extra'; import { dirname, posix, resolve } from 'path'; // This is a type-only import, so it gets compiled away. At runtime, we load @@ -65,11 +65,17 @@ class ScriptOptimizer { constructor(private rootDir: string) {} async optimizedScript(script: string): Promise { + let fullName = resolve(this.rootDir, script.slice(1)); + if (!existsSync(fullName)) { + // in prod builds, test-support.js isn't going to exist (for example) + return []; + } + // loading these lazily here so they never load in non-production builds. // The node cache will ensures we only load them once. const [Terser, srcURL] = await Promise.all([import('terser'), import('source-map-url')]); - let inCode = readFileSync(resolve(this.rootDir, script.slice(1)), 'utf8'); + let inCode = readFileSync(fullName, 'utf8'); let terserOpts: MinifyOptions = {}; let fileRelativeSourceMapURL; let appRelativeSourceMapURL; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2fcded776..101244574 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,6 +735,9 @@ importers: packages/test-setup: dependencies: + broccoli-plugin: + specifier: ^4.0.7 + version: 4.0.7 lodash: specifier: ^4.17.21 version: 4.17.21 @@ -1406,6 +1409,12 @@ importers: '@babel/core': specifier: ^7.19.3 version: 7.23.9 + '@babel/eslint-parser': + specifier: ^7.22.5 + version: 7.23.10(@babel/core@7.23.9)(eslint@8.57.0) + '@babel/plugin-proposal-decorators': + specifier: ^7.22.5 + version: 7.23.9(@babel/core@7.23.9) '@ember/optional-features': specifier: ^2.0.0 version: 2.1.0 @@ -1413,8 +1422,8 @@ importers: specifier: ^3.1.1 version: 3.1.1 '@ember/test-helpers': - specifier: ^2.9.1 - version: 2.9.4(@babel/core@7.23.9)(@glint/environment-ember-loose@1.3.0)(@glint/template@1.3.0)(ember-source@4.6.0) + specifier: ^3.0.3 + version: 3.3.0(ember-source@5.0.0) '@embroider/compat': specifier: workspace:* version: link:../../packages/compat @@ -1427,38 +1436,44 @@ importers: '@embroider/test-setup': specifier: workspace:* version: link:../../packages/test-setup - '@embroider/webpack': + '@embroider/vite': specifier: workspace:* - version: link:../../packages/webpack + version: link:../../packages/vite '@glimmer/component': specifier: ^1.1.2 version: 1.1.2(@babel/core@7.23.9) '@glimmer/tracking': specifier: ^1.1.2 version: 1.1.2 - babel-eslint: - specifier: ^10.1.0 - version: 10.1.0(eslint@7.32.0) + '@rollup/plugin-babel': + specifier: ^5.3.1 + version: 5.3.1(@babel/core@7.23.9)(rollup@3.29.4) broccoli-asset-rev: specifier: ^3.0.0 version: 3.0.0 + concurrently: + specifier: ^8.2.0 + version: 8.2.2 ember-auto-import: - specifier: ^2.4.2 - version: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) + specifier: ^2.6.3 + version: 2.7.2 ember-cli: - specifier: ~4.6.0 - version: 4.6.0 - ember-cli-app-version: - specifier: ^5.0.0 + specifier: ~5.0.0 version: 5.0.0 + ember-cli-app-version: + specifier: ^6.0.0 + version: 6.0.1(ember-source@5.0.0) ember-cli-babel: specifier: ^7.26.11 version: 7.26.11 + ember-cli-clean-css: + specifier: ^2.0.0 + version: 2.0.1 ember-cli-dependency-checker: specifier: ^3.3.1 - version: 3.3.2(ember-cli@4.6.0) + version: 3.3.2(ember-cli@5.0.0) ember-cli-htmlbars: - specifier: ^6.1.0 + specifier: ^6.2.0 version: 6.3.0 ember-cli-inject-live-reload: specifier: ^2.1.0 @@ -1469,66 +1484,72 @@ importers: ember-cli-terser: specifier: ^4.0.2 version: 4.0.2 - ember-data: - specifier: ~4.4.0 - version: 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - ember-fetch: - specifier: ^8.1.1 - version: 8.1.2 ember-load-initializers: specifier: ^2.1.2 version: 2.1.2(@babel/core@7.23.9) + ember-modifier: + specifier: ^4.1.0 + version: 4.1.0(ember-source@5.0.0) ember-page-title: specifier: ^7.0.0 version: 7.0.0 ember-qunit: - specifier: ^6.1.1 - version: 6.2.0(@ember/test-helpers@2.9.4)(@glint/template@1.3.0)(ember-source@4.6.0)(qunit@2.20.1)(webpack@5.90.3) + specifier: ^7.0.0 + version: 7.0.0(@ember/test-helpers@3.3.0)(ember-source@5.0.0)(qunit@2.20.1) ember-resolver: specifier: ^10.1.0 - version: 10.1.1(@ember/string@3.1.1)(ember-source@4.6.0) + version: 10.1.1(@ember/string@3.1.1)(ember-source@5.0.0) ember-source: - specifier: ~4.6.0 - version: 4.6.0(@babel/core@7.23.9)(@glint/template@1.3.0)(webpack@5.90.3) + specifier: ~5.0.0 + version: 5.0.0(@babel/core@7.23.9)(@glimmer/component@1.1.2) ember-template-lint: - specifier: ^4.10.1 - version: 4.18.2 + specifier: ^5.10.1 + version: 5.13.0 eslint: - specifier: ^7.32.0 - version: 7.32.0 + specifier: ^8.42.0 + version: 8.57.0 eslint-config-prettier: - specifier: ^8.5.0 - version: 8.10.0(eslint@7.32.0) + specifier: ^8.8.0 + version: 8.10.0(eslint@8.57.0) eslint-plugin-ember: - specifier: ^11.0.2 - version: 11.12.0(eslint@7.32.0) - eslint-plugin-node: - specifier: ^11.1.0 - version: 11.1.0(eslint@7.32.0) + specifier: ^11.8.0 + version: 11.12.0(eslint@8.57.0) + eslint-plugin-n: + specifier: ^16.0.0 + version: 16.6.2(eslint@8.57.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@7.32.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.0)(prettier@2.8.8) eslint-plugin-qunit: - specifier: ^7.3.1 - version: 7.3.4(eslint@7.32.0) + specifier: ^7.3.4 + version: 7.3.4(eslint@8.57.0) loader.js: specifier: ^4.7.0 version: 4.7.0 - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 prettier: - specifier: ^2.7.1 + specifier: ^2.8.8 version: 2.8.8 qunit: - specifier: ^2.19.1 + specifier: ^2.19.4 version: 2.20.1 qunit-dom: specifier: ^2.0.0 version: 2.0.0 - webpack: - specifier: ^5.74.0 - version: 5.90.3 + stylelint: + specifier: ^15.7.0 + version: 15.11.0(typescript@5.2.2) + stylelint-config-standard: + specifier: ^33.0.0 + version: 33.0.0(stylelint@15.11.0) + stylelint-prettier: + specifier: ^3.0.0 + version: 3.0.0(prettier@2.8.8)(stylelint@15.11.0) + tracked-built-ins: + specifier: ^3.1.1 + version: 3.3.0 + vite: + specifier: ^5.0.9 + version: 5.1.4 tests/fixtures: {} @@ -1560,7 +1581,7 @@ importers: version: 2.19.10 ember-auto-import: specifier: ^2.6.3 - version: 2.7.2 + version: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) fastboot: specifier: ^4.1.1 version: 4.1.2 @@ -1633,7 +1654,7 @@ importers: version: 3.1.1 '@ember/test-helpers-3': specifier: npm:@ember/test-helpers@^3.2.0 - version: /@ember/test-helpers@3.3.0(ember-source@3.28.12) + version: /@ember/test-helpers@3.3.0(ember-source@3.28.12)(webpack@5.90.3) '@embroider/addon-shim': specifier: workspace:* version: link:../../packages/addon-shim @@ -1687,7 +1708,7 @@ importers: version: 3.0.0 ember-bootstrap: specifier: ^5.0.0 - version: 5.1.1(@babel/core@7.23.9)(ember-source@3.28.12) + version: 5.1.1(@babel/core@7.23.9)(ember-source@3.28.12)(webpack@5.90.3) ember-cli: specifier: ~3.28.0 version: 3.28.6(lodash@4.17.21) @@ -1703,12 +1724,9 @@ importers: ember-cli-latest: specifier: npm:ember-cli@latest version: /ember-cli@5.6.0(lodash@4.17.21) - ember-composable-helpers: - specifier: ^4.4.1 - version: 4.5.0 ember-data-4.12: specifier: npm:ember-data@~4.12.0 - version: /ember-data@4.12.5(@babel/core@7.23.9)(@ember/string@3.1.1)(ember-source@3.28.12) + version: /ember-data@4.12.5(@babel/core@7.23.9)(@ember/string@3.1.1)(ember-source@3.28.12)(webpack@5.90.3) ember-data-beta: specifier: npm:ember-data@beta version: /ember-data@5.4.0-beta.2(@babel/core@7.23.9)(@ember/string@3.1.1)(ember-source@3.28.12) @@ -1726,22 +1744,22 @@ importers: version: 4.1.0(ember-source@3.28.12) ember-qunit-7: specifier: npm:ember-qunit@^7.0.0 - version: /ember-qunit@7.0.0(@ember/test-helpers@3.3.0)(ember-source@3.28.12)(qunit@2.20.1) + version: /ember-qunit@7.0.0(@ember/test-helpers@3.3.0)(ember-source@3.28.12)(qunit@2.20.1)(webpack@5.90.3) ember-source: specifier: ~3.28.11 version: 3.28.12(@babel/core@7.23.9) ember-source-4.4: specifier: npm:ember-source@~4.4.0 - version: /ember-source@4.4.5(@babel/core@7.23.9) + version: /ember-source@4.4.5(@babel/core@7.23.9)(webpack@5.90.3) ember-source-beta: specifier: npm:ember-source@beta - version: /ember-source@5.7.0-beta.2(@babel/core@7.23.9) + version: /ember-source@5.7.0-beta.2(@babel/core@7.23.9)(webpack@5.90.3) ember-source-canary: specifier: https://s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz - version: '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz(@babel/core@7.23.9)' + version: '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz(@babel/core@7.23.9)(webpack@5.90.3)' ember-source-latest: specifier: npm:ember-source@latest - version: /ember-source@5.6.0(@babel/core@7.23.9) + version: /ember-source@5.6.0(@babel/core@7.23.9)(webpack@5.90.3) ember-truth-helpers: specifier: ^3.0.0 version: 3.1.1 @@ -1754,6 +1772,9 @@ importers: typescript: specifier: ^5.1.6 version: 5.2.2 + webpack: + specifier: ^5.90.3 + version: 5.90.3 tests/ts-app-template: devDependencies: @@ -1787,9 +1808,9 @@ importers: '@embroider/test-setup': specifier: workspace:* version: link:../../packages/test-setup - '@embroider/webpack': + '@embroider/vite': specifier: workspace:* - version: link:../../packages/webpack + version: link:../../packages/vite '@glimmer/component': specifier: ^1.1.2 version: 1.1.2(@babel/core@7.23.9) @@ -1808,6 +1829,9 @@ importers: '@glint/template': specifier: ^1.1.0 version: 1.3.0 + '@rollup/plugin-babel': + specifier: ^5.3.1 + version: 5.3.1(@babel/core@7.23.9)(rollup@3.29.4) '@tsconfig/ember': specifier: ^1.0.0 version: 1.0.1 @@ -1856,9 +1880,6 @@ importers: ember-cli-terser: specifier: ^4.0.2 version: 4.0.2 - ember-fetch: - specifier: ^8.1.2 - version: 8.1.2 ember-load-initializers: specifier: ^2.1.2 version: 2.1.2(@babel/core@7.23.9) @@ -1907,6 +1928,9 @@ importers: typescript: specifier: ^5.1.6 version: 5.2.2 + vite: + specifier: ^5.1.5 + version: 5.1.6 webpack: specifier: ^5.88.2 version: 5.90.3 @@ -3499,25 +3523,6 @@ packages: - supports-color dev: true - /@ember-data/adapter@4.4.3(@babel/core@7.23.9)(webpack@5.90.3): - resolution: {integrity: sha512-rwcwzffVHosmKgWEOSwvUy8EFazDV08lZvw8uFDK9CrrhUBWGLG8Ugrc1nu3HEAHA9UWNFbaAPKj/R4PvV2igw==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@ember-data/private-build-infra': 4.4.3(@babel/core@7.23.9) - '@ember-data/store': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember/edition-utils': 1.2.0 - '@ember/string': 3.1.1 - ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) - ember-cli-babel: 7.26.11 - ember-cli-test-info: 1.0.0 - ember-cli-typescript: 5.2.1 - transitivePeerDependencies: - - '@babel/core' - - '@glint/template' - - supports-color - - webpack - dev: true - /@ember-data/adapter@5.3.0(@babel/core@7.23.9)(@ember-data/store@5.3.0)(@ember/string@3.1.1)(ember-inflector@4.0.2): resolution: {integrity: sha512-OKbqtuOn6ZHFvU36P8876TsWtr6BKx1eOAzftnRtS8kD8r9rxdXapCA7M2V3l+Fma4d+MMwm8flLrqMddP5rmA==} engines: {node: 16.* || >= 18.*} @@ -3563,17 +3568,7 @@ packages: - supports-color dev: true - /@ember-data/canary-features@4.4.3: - resolution: {integrity: sha512-QzmWO6XkXUb6sND/HST7Xh9o7xlYynv1Wht/GSz+6sRDe5p2M/njwd10Hqhiraso34zNfWNqiPNjAtu3OUNL1g==} - engines: {node: 12.* || >= 14.*} - dependencies: - ember-cli-babel: 7.26.11 - ember-cli-typescript: 5.2.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@ember-data/debug@4.12.5(@ember-data/store@4.12.5)(@ember/string@3.1.1): + /@ember-data/debug@4.12.5(@ember-data/store@4.12.5)(@ember/string@3.1.1)(webpack@5.90.3): resolution: {integrity: sha512-IpmZ2ZXhl7NDPd8DH2XNQBzjiwxJHmGbwGFs9IVtZXmOSkk5iCX6v2MkeRBeDjLvUOcZIHNBuHUz66nZJrHNCg==} engines: {node: 16.* || >= 18.*} peerDependencies: @@ -3585,27 +3580,9 @@ packages: '@ember/edition-utils': 1.2.0 '@ember/string': 3.1.1 '@embroider/macros': 1.13.5(@glint/template@1.3.0) - ember-auto-import: 2.7.2 - ember-cli-babel: 7.26.11 - transitivePeerDependencies: - - '@glint/template' - - supports-color - - webpack - dev: true - - /@ember-data/debug@4.4.3(@babel/core@7.23.9)(webpack@5.90.3): - resolution: {integrity: sha512-ZCE+yD53pPUp4705y3YxrV4Q4+upLt0LY9o9tMWrdV5C7L74aiVyUJ5FqD6fmBsWYEa2TG8nde27gNIW3KlSJw==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@ember-data/private-build-infra': 4.4.3(@babel/core@7.23.9) - '@ember/edition-utils': 1.2.0 - '@ember/string': 3.1.1 ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 - ember-cli-test-info: 1.0.0 - ember-cli-typescript: 5.2.1 transitivePeerDependencies: - - '@babel/core' - '@glint/template' - supports-color - webpack @@ -3882,7 +3859,7 @@ packages: '@ember-data/json-api': optional: true dependencies: - '@ember-data/debug': 4.12.5(@ember-data/store@4.12.5)(@ember/string@3.1.1) + '@ember-data/debug': 4.12.5(@ember-data/store@4.12.5)(@ember/string@3.1.1)(webpack@5.90.3) '@ember-data/graph': 4.12.5(@ember-data/store@4.12.5) '@ember-data/json-api': 4.12.5(@ember-data/graph@4.12.5)(@ember-data/store@4.12.5) '@ember-data/legacy-compat': 4.12.5(@ember-data/graph@4.12.5)(@ember-data/json-api@4.12.5) @@ -3905,30 +3882,6 @@ packages: - supports-color dev: true - /@ember-data/model@4.4.3(@babel/core@7.23.9)(webpack@5.90.3): - resolution: {integrity: sha512-gHrSGJQUewZ0hqAnDzAehz7DXqBHHT9MKGl/f7/mYMP+QNVQXbPemurc9NAO7nunUJZhDvHYRkMuy0hrdtiT+g==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@ember-data/canary-features': 4.4.3 - '@ember-data/private-build-infra': 4.4.3(@babel/core@7.23.9) - '@ember-data/store': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember/edition-utils': 1.2.0 - '@ember/string': 3.1.1 - ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) - ember-cached-decorator-polyfill: 0.1.4(@babel/core@7.23.9) - ember-cli-babel: 7.26.11 - ember-cli-string-utils: 1.1.0 - ember-cli-test-info: 1.0.0 - ember-cli-typescript: 5.2.1 - ember-compatibility-helpers: 1.2.7(@babel/core@7.23.9) - inflection: 1.13.4 - transitivePeerDependencies: - - '@babel/core' - - '@glint/template' - - supports-color - - webpack - dev: true - /@ember-data/model@5.3.0(@babel/core@7.23.9)(@ember-data/debug@5.3.0)(@ember-data/graph@5.3.0)(@ember-data/json-api@5.3.0)(@ember-data/legacy-compat@5.3.0)(@ember-data/store@5.3.0)(@ember-data/tracking@5.3.0)(@ember/string@3.1.1)(ember-inflector@4.0.2)(ember-source@3.28.12): resolution: {integrity: sha512-9DckZXu3DZk1fYd1js6kS2SCxuuaQBDE1N3NMc+Zz55n8qu1LKHLxr+dGwVqV+Wtl7LGcAU1ocnm7gKNhC1vuw==} engines: {node: 16.* || >= 18.*} @@ -4050,41 +4003,6 @@ packages: - supports-color dev: true - /@ember-data/private-build-infra@4.4.3(@babel/core@7.23.9): - resolution: {integrity: sha512-2piJv/agaq3pDoSfNcJS96SSVvlCnz3ZQgyhOw4b0zAYaSchnk+775W6jUoxNl8NGjXEnBGulXce/b+NBX7z+Q==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@babel/plugin-transform-block-scoping': 7.23.4(@babel/core@7.23.9) - '@ember-data/canary-features': 4.4.3 - '@ember/edition-utils': 1.2.0 - babel-plugin-debug-macros: 0.3.4(@babel/core@7.23.9) - babel-plugin-filter-imports: 4.0.0 - babel6-plugin-strip-class-callcheck: 6.0.0 - broccoli-debug: 0.6.5 - broccoli-file-creator: 2.1.1 - broccoli-funnel: 3.0.8 - broccoli-merge-trees: 4.2.0 - broccoli-rollup: 5.0.0 - calculate-cache-key-for-tree: 2.0.0 - chalk: 4.1.2 - ember-cli-babel: 7.26.11 - ember-cli-path-utils: 1.0.0 - ember-cli-string-utils: 1.1.0 - ember-cli-typescript: 5.2.1 - ember-cli-version-checker: 5.1.2 - esm: 3.2.25 - git-repo-info: 2.1.1 - glob: 7.2.3 - npm-git-info: 1.0.3 - rimraf: 3.0.2 - rsvp: 4.8.5 - semver: 7.6.0 - silent-error: 1.1.1 - transitivePeerDependencies: - - '@babel/core' - - supports-color - dev: true - /@ember-data/private-build-infra@5.3.0: resolution: {integrity: sha512-n7VCPgvjS0Yza5USBucdYjTvlk5GC6fIdWiQUGdK9QxHnyekFg2Znu932ulKp/Iokoc8iBEaVX3HoiCwM/Hw1w==} engines: {node: 16.* || >= 18.*} @@ -4148,25 +4066,6 @@ packages: - supports-color dev: true - /@ember-data/record-data@4.4.3(@babel/core@7.23.9)(webpack@5.90.3): - resolution: {integrity: sha512-hHGSD23qHR+Zd59/P2AqmcFBOAgb22Imcm7aJbXUfQVSpXx2AlcdcrWL8bA6hMaO9yX/KQRTmBazmS0vqTxFug==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@ember-data/canary-features': 4.4.3 - '@ember-data/private-build-infra': 4.4.3(@babel/core@7.23.9) - '@ember-data/store': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember/edition-utils': 1.2.0 - ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) - ember-cli-babel: 7.26.11 - ember-cli-test-info: 1.0.0 - ember-cli-typescript: 5.2.1 - transitivePeerDependencies: - - '@babel/core' - - '@glint/template' - - supports-color - - webpack - dev: true - /@ember-data/request-utils@5.3.0(@babel/core@7.23.9): resolution: {integrity: sha512-f/DGyW7tKbx1NCxz/arDBXTwEiV0+a0m8AStTMOlPkGLvnDhuHAH3jVlhuNweFxI6CmfXaL+UAY7g+uWAwCn0Q==} engines: {node: 16.* || >= 18} @@ -4259,23 +4158,6 @@ packages: - supports-color dev: true - /@ember-data/serializer@4.4.3(@babel/core@7.23.9)(webpack@5.90.3): - resolution: {integrity: sha512-rHL3yraqUBHLjw1y5s0sGCD+xjwJaEWsx/wcVxG5FBIBcMtUQTyp/QLoiqqVfI0/1MOnvpYDjy1Fyioy0gGAZA==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@ember-data/private-build-infra': 4.4.3(@babel/core@7.23.9) - '@ember-data/store': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) - ember-cli-babel: 7.26.11 - ember-cli-test-info: 1.0.0 - ember-cli-typescript: 5.2.1 - transitivePeerDependencies: - - '@babel/core' - - '@glint/template' - - supports-color - - webpack - dev: true - /@ember-data/serializer@5.3.0(@babel/core@7.23.9)(@ember/string@3.1.1)(ember-inflector@4.0.2): resolution: {integrity: sha512-apsfN8qHOVQxIxmPQh6SSxYtzNcb3/jvdjJDrU6L8eklyQXfxcbaBD6r2uUAA2jaI94oNXoSHM/75TZnJjLIZA==} engines: {node: 16.* || >= 18.*} @@ -4355,26 +4237,6 @@ packages: - supports-color dev: true - /@ember-data/store@4.4.3(@babel/core@7.23.9)(webpack@5.90.3): - resolution: {integrity: sha512-1kvCV/qO7ULD4fJNfr1NTwQwcPAU/fwxIWj46p2JnpRKg1jwzBNz9E6hQNdQ0kLD2pOUiaHB8J/2J6mCqVljKA==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@ember-data/canary-features': 4.4.3 - '@ember-data/private-build-infra': 4.4.3(@babel/core@7.23.9) - '@ember/string': 3.1.1 - '@glimmer/tracking': 1.1.2 - ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) - ember-cached-decorator-polyfill: 0.1.4(@babel/core@7.23.9) - ember-cli-babel: 7.26.11 - ember-cli-path-utils: 1.0.0 - ember-cli-typescript: 5.2.1 - transitivePeerDependencies: - - '@babel/core' - - '@glint/template' - - supports-color - - webpack - dev: true - /@ember-data/store@5.3.0(@babel/core@7.23.9)(@ember-data/tracking@5.3.0)(@ember/string@3.1.1)(ember-source@3.28.12): resolution: {integrity: sha512-okM7AJmgM8Wz+FNgsDXVUVw32UZVLKko2K/2GfBmOjOcKVnfwLKI08HmQNLnT5IXiOsJW5mA4mRESuVgN8L4lQ==} engines: {node: 16.* || >= 18.*} @@ -4654,7 +4516,7 @@ packages: - webpack dev: true - /@ember/test-helpers@3.3.0(ember-source@3.28.12): + /@ember/test-helpers@3.3.0(ember-source@3.28.12)(webpack@5.90.3): resolution: {integrity: sha512-HEI28wtjnQuEj9+DstHUEEKPtqPAEVN9AAVr4EifVCd3DyEDy0m6hFT4qbap1WxAIktLja2QXGJg50lVWzZc5g==} engines: {node: 16.* || >= 18} peerDependencies: @@ -4666,7 +4528,7 @@ packages: broccoli-debug: 0.6.5 broccoli-funnel: 3.0.8 dom-element-descriptors: 0.5.0 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-htmlbars: 6.3.0 ember-source: 3.28.12(@babel/core@7.23.9) @@ -4676,6 +4538,28 @@ packages: - webpack dev: true + /@ember/test-helpers@3.3.0(ember-source@5.0.0): + resolution: {integrity: sha512-HEI28wtjnQuEj9+DstHUEEKPtqPAEVN9AAVr4EifVCd3DyEDy0m6hFT4qbap1WxAIktLja2QXGJg50lVWzZc5g==} + engines: {node: 16.* || >= 18} + peerDependencies: + ember-source: ^4.0.0 || ^5.0.0 + dependencies: + '@ember/test-waiters': 3.1.0 + '@embroider/macros': 1.13.5(@glint/template@1.3.0) + '@simple-dom/interface': 1.4.0 + broccoli-debug: 0.6.5 + broccoli-funnel: 3.0.8 + dom-element-descriptors: 0.5.0 + ember-auto-import: 2.7.2 + ember-cli-babel: 7.26.11 + ember-cli-htmlbars: 6.3.0 + ember-source: 5.0.0(@babel/core@7.23.9)(@glimmer/component@1.1.2) + transitivePeerDependencies: + - '@glint/template' + - supports-color + - webpack + dev: true + /@ember/test-helpers@3.3.0(ember-source@5.7.0-beta.1): resolution: {integrity: sha512-HEI28wtjnQuEj9+DstHUEEKPtqPAEVN9AAVr4EifVCd3DyEDy0m6hFT4qbap1WxAIktLja2QXGJg50lVWzZc5g==} engines: {node: 16.* || >= 18} @@ -7524,12 +7408,6 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: false - /@types/acorn@4.0.6: - resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} - dependencies: - '@types/estree': 1.0.5 - dev: true - /@types/babel-types@7.0.15: resolution: {integrity: sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g==} dev: true @@ -7792,10 +7670,6 @@ packages: /@types/node@15.14.9: resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} - /@types/node@9.6.61: - resolution: {integrity: sha512-/aKAdg5c8n468cYLy2eQrcR5k6chlbNwZNGUj3TboyPa2hcO2QAJcfymlqPzMiRj8B6nYKXjzQz36minFE0RwQ==} - dev: true - /@types/normalize-package-data@2.4.4: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: true @@ -8255,10 +8129,6 @@ packages: /abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - /abortcontroller-polyfill@1.7.5: - resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} - dev: true - /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -8266,13 +8136,6 @@ packages: mime-types: 2.1.35 negotiator: 0.6.3 - /acorn-dynamic-import@3.0.0: - resolution: {integrity: sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==} - deprecated: This is probably built in to whatever tool you're using. If you still need it... idk - dependencies: - acorn: 5.7.4 - dev: true - /acorn-globals@6.0.0: resolution: {integrity: sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==} dependencies: @@ -9037,6 +8900,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 + dev: true /babel-loader@8.3.0(@babel/core@7.23.9)(webpack@5.90.3): resolution: {integrity: sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==} @@ -10033,27 +9897,6 @@ packages: /broccoli-funnel-reducer@1.0.0: resolution: {integrity: sha512-SaOCEdh+wnt2jFUV2Qb32m7LXyElvFwW3NKNaEJyi5PGQNwxfqpkc0KI6AbQANKgdj/40U2UC0WuGThFwuEUaA==} - /broccoli-funnel@2.0.1: - resolution: {integrity: sha512-C8Lnp9TVsSSiZMGEF16C0dCiNg2oJqUKwuZ1K4kVC6qRPG/2Cj/rtB5kRCC9qEbwqhX71bDbfHROx0L3J7zXQg==} - engines: {node: ^4.5 || 6.* || >= 7.*} - dependencies: - array-equal: 1.0.2 - blank-object: 1.0.2 - broccoli-plugin: 1.3.1 - debug: 2.6.9(supports-color@8.1.1) - fast-ordered-set: 1.0.3 - fs-tree-diff: 0.5.9 - heimdalljs: 0.2.6 - minimatch: 3.1.2 - mkdirp: 0.5.6 - path-posix: 1.0.0 - rimraf: 2.7.1 - symlink-or-copy: 1.3.1 - walk-sync: 0.3.4 - transitivePeerDependencies: - - supports-color - dev: true - /broccoli-funnel@2.0.2: resolution: {integrity: sha512-/vDTqtv7ipjEZQOVqO4vGDVAOZyuYzQ/EgGoyewfOgh1M7IQAToBKZI0oAQPgMBeFPPlIbfMuAngk+ohPBuaHQ==} engines: {node: ^4.5 || 6.* || >= 7.*} @@ -10265,30 +10108,11 @@ packages: broccoli-output-wrapper: 3.2.5 fs-merger: 3.2.1 promise-map-series: 0.3.0 - quick-temp: 0.1.8 - rimraf: 3.0.2 - symlink-or-copy: 1.3.1 - transitivePeerDependencies: - - supports-color - - /broccoli-rollup@2.1.1: - resolution: {integrity: sha512-aky/Ovg5DbsrsJEx2QCXxHLA6ZR+9u1TNVTf85soP4gL8CjGGKQ/JU8R3BZ2ntkWzo6/83RCKzX6O+nlNKR5MQ==} - engines: {node: '>=4.0'} - dependencies: - '@types/node': 9.6.61 - amd-name-resolver: 1.3.1 - broccoli-plugin: 1.3.1 - fs-tree-diff: 0.5.9 - heimdalljs: 0.2.6 - heimdalljs-logger: 0.1.10 - magic-string: 0.24.1 - node-modules-path: 1.0.2 - rollup: 0.57.1 + quick-temp: 0.1.8 + rimraf: 3.0.2 symlink-or-copy: 1.3.1 - walk-sync: 0.3.4 transitivePeerDependencies: - supports-color - dev: true /broccoli-rollup@5.0.0: resolution: {integrity: sha512-QdMuXHwsdz/LOS8zu4HP91Sfi4ofimrOXoYP/lrPdRh7lJYD87Lfq4WzzUhGHsxMfzANIEvl/7qVHKD3cFJ4tA==} @@ -10381,19 +10205,6 @@ packages: transitivePeerDependencies: - supports-color - /broccoli-templater@2.0.2: - resolution: {integrity: sha512-71KpNkc7WmbEokTQpGcbGzZjUIY1NSVa3GB++KFKAfx5SZPUozCOsBlSTwxcv8TLoCAqbBnsX5AQPgg6vJ2l9g==} - engines: {node: 6.* || >= 8.*} - dependencies: - broccoli-plugin: 1.3.1 - fs-tree-diff: 0.5.9 - lodash.template: 4.5.0 - rimraf: 2.7.1 - walk-sync: 0.3.4 - transitivePeerDependencies: - - supports-color - dev: true - /broccoli-terser-sourcemap@4.1.1: resolution: {integrity: sha512-8sbpRf0/+XeszBJQM7vph2UNj4Kal0lCI/yubcrBIzb2NvYj5gjTHJABXOdxx5mKNmlCMu2hx2kvOtMpQsxrfg==} engines: {node: ^10.12.0 || 12.* || >= 14} @@ -10686,15 +10497,6 @@ packages: path-temp: 2.1.0 dev: true - /caniuse-api@3.0.0: - resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} - dependencies: - browserslist: 4.23.0 - caniuse-lite: 1.0.30001589 - lodash.memoize: 4.1.2 - lodash.uniq: 4.5.0 - dev: true - /caniuse-lite@1.0.30001589: resolution: {integrity: sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==} @@ -11634,13 +11436,6 @@ packages: '@babel/runtime': 7.23.9 dev: true - /date-time@2.1.0: - resolution: {integrity: sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==} - engines: {node: '>=4'} - dependencies: - time-zone: 1.0.0 - dev: true - /debug@2.6.9(supports-color@8.1.1): resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -11974,7 +11769,7 @@ packages: semver: 6.3.1 /ee-first@1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} /eight-colors@1.3.0: resolution: {integrity: sha512-hVoK898cR71ADj7L1LZWaECLaSkzzPtqGXIaKv4K6Pzb72QgjLVsQaNI+ELDQQshzFvgp5xTPkaYkPGqw3YR+g==} @@ -12040,6 +11835,7 @@ packages: - '@glint/template' - supports-color - webpack + dev: true /ember-auto-import@2.7.2(@glint/template@1.3.0)(webpack@5.90.3): resolution: {integrity: sha512-pkWIljmJClYL17YBk8FjO7NrZPQoY9v0b+FooJvaHf/xlDQIBYVP7OaDHbNuNbpj7+wAwSDAnnwxjCoLsmm4cw==} @@ -12084,7 +11880,7 @@ packages: - supports-color - webpack - /ember-bootstrap@5.1.1(@babel/core@7.23.9)(ember-source@3.28.12): + /ember-bootstrap@5.1.1(@babel/core@7.23.9)(ember-source@3.28.12)(webpack@5.90.3): resolution: {integrity: sha512-ETb+DBYvVC+cAeABcfWUCHMHdO7S8gR8yZSvGmhHcgQo7jbKOVDDCARA7C12lmn3RojMwlfJMJu0LV3CXRwCHg==} engines: {node: 12.* || 14.* || >= 16} peerDependencies: @@ -12099,7 +11895,7 @@ packages: broccoli-funnel: 3.0.8 broccoli-merge-trees: 4.2.0 chalk: 4.1.2 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-build-config-editor: 0.5.1 ember-cli-htmlbars: 6.3.0 @@ -12111,7 +11907,7 @@ packages: ember-in-element-polyfill: 1.0.1 ember-named-blocks-polyfill: 0.2.5 ember-on-helper: 0.1.0 - ember-popper-modifier: 2.0.1(@babel/core@7.23.9) + ember-popper-modifier: 2.0.1(@babel/core@7.23.9)(webpack@5.90.3) ember-ref-bucket: 4.1.0(@babel/core@7.23.9) ember-render-helpers: 0.2.0 ember-source: 3.28.12(@babel/core@7.23.9) @@ -12143,19 +11939,6 @@ packages: - supports-color dev: true - /ember-cached-decorator-polyfill@0.1.4(@babel/core@7.23.9): - resolution: {integrity: sha512-JOK7kBCWsTVCzmCefK4nr9BACDJk0owt9oIUaVt6Q0UtQ4XeAHmoK5kQ/YtDcxQF1ZevHQFdGhsTR3JLaHNJgA==} - engines: {node: 10.* || >= 12} - dependencies: - '@glimmer/tracking': 1.1.2 - ember-cache-primitive-polyfill: 1.0.1(@babel/core@7.23.9) - ember-cli-babel: 7.26.11 - ember-cli-babel-plugin-helpers: 1.1.1 - transitivePeerDependencies: - - '@babel/core' - - supports-color - dev: true - /ember-cached-decorator-polyfill@1.0.2(@babel/core@7.23.9)(ember-source@3.28.12): resolution: {integrity: sha512-hUX6OYTKltAPAu8vsVZK02BfMTV0OUXrPqvRahYPhgS7D0I6joLjlskd7mhqJMcaXLywqceIy8/s+x8bxF8bpQ==} engines: {node: 14.* || >= 16} @@ -12175,11 +11958,14 @@ packages: - supports-color dev: true - /ember-cli-app-version@5.0.0: - resolution: {integrity: sha512-afhx/CXDOMNXzoe4NDPy5WUfxWmYYHUzMCiTyvPBxCDBXYcMrtxNWxvgaSaeqcoHVEmqzeyBj8V82tzmT1dcyw==} - engines: {node: 10.* || >= 12} + /ember-cli-app-version@6.0.1(ember-source@5.0.0): + resolution: {integrity: sha512-XA1FwkWA5QytmWF0jcJqEr3jcZoiCl9Fb33TZgOVfClL7Voxe+/RwzISEprBRQgbf7j8z1xf8/RJCKfclUy3rQ==} + engines: {node: 14.* || 16.* || >= 18} + peerDependencies: + ember-source: ^3.28.0 || >= 4.0.0 dependencies: ember-cli-babel: 7.26.11 + ember-source: 5.0.0(@babel/core@7.23.9)(@glimmer/component@1.1.2) git-repo-info: 2.1.1 transitivePeerDependencies: - supports-color @@ -13792,18 +13578,6 @@ packages: - '@babel/core' - supports-color - /ember-composable-helpers@4.5.0: - resolution: {integrity: sha512-XjpDLyVPsLCy6kd5dIxZonOECCO6AA5sY5Hr6tYUbJg3s5ghFAiFWaNcYraYC+fL2yPJQAswwpfwGlQORUJZkw==} - engines: {node: 10.* || >= 12.*} - dependencies: - '@babel/core': 7.23.9 - broccoli-funnel: 2.0.1 - ember-cli-babel: 7.26.11 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - dev: true - /ember-concurrency@2.3.7(@babel/core@7.23.9): resolution: {integrity: sha512-sz6sTIXN/CuLb5wdpauFa+rWXuvXXSnSHS4kuNzU5GSMDX1pLBWSuovoUk61FUe6CYRqBmT1/UushObwBGickQ==} engines: {node: 10.* || 12.* || 14.* || >= 16} @@ -13821,14 +13595,14 @@ packages: - supports-color dev: true - /ember-data@4.12.5(@babel/core@7.23.9)(@ember/string@3.1.1)(ember-source@3.28.12): + /ember-data@4.12.5(@babel/core@7.23.9)(@ember/string@3.1.1)(ember-source@3.28.12)(webpack@5.90.3): resolution: {integrity: sha512-5q0m0qFdbur3eFk2/iT1GEGxBUOnwbDD0Gk6sWLiVGL2NLZw1wH6Spo36RqClx62ov2vlo9DytVmKbOu224WaQ==} engines: {node: 16.* || >= 18.*} peerDependencies: '@ember/string': ^3.0.1 dependencies: '@ember-data/adapter': 4.12.5(@ember-data/store@4.12.5)(@ember/string@3.1.1)(ember-inflector@4.0.2) - '@ember-data/debug': 4.12.5(@ember-data/store@4.12.5)(@ember/string@3.1.1) + '@ember-data/debug': 4.12.5(@ember-data/store@4.12.5)(@ember/string@3.1.1)(webpack@5.90.3) '@ember-data/graph': 4.12.5(@ember-data/store@4.12.5) '@ember-data/json-api': 4.12.5(@ember-data/graph@4.12.5)(@ember-data/store@4.12.5) '@ember-data/legacy-compat': 4.12.5(@ember-data/graph@4.12.5)(@ember-data/json-api@4.12.5) @@ -13843,7 +13617,7 @@ packages: '@embroider/macros': 1.13.5(@glint/template@1.3.0) '@glimmer/env': 0.1.7 broccoli-merge-trees: 4.2.0 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-inflector: 4.0.2 transitivePeerDependencies: @@ -13855,32 +13629,6 @@ packages: - webpack dev: true - /ember-data@4.4.3(@babel/core@7.23.9)(webpack@5.90.3): - resolution: {integrity: sha512-Z67pYs41LoJ2EKQsTOb2QOmv7A4gn72nv9MORYpQnGk8z8stYGtrgZFwATg+NES4mnJsLShdLIWaZNKze7c1HA==} - engines: {node: 12.* || >= 14.*} - dependencies: - '@ember-data/adapter': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember-data/debug': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember-data/model': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember-data/private-build-infra': 4.4.3(@babel/core@7.23.9) - '@ember-data/record-data': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember-data/serializer': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember-data/store': 4.4.3(@babel/core@7.23.9)(webpack@5.90.3) - '@ember/edition-utils': 1.2.0 - '@ember/string': 3.1.1 - '@glimmer/env': 0.1.7 - broccoli-merge-trees: 4.2.0 - ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) - ember-cli-babel: 7.26.11 - ember-cli-typescript: 5.2.1 - ember-inflector: 4.0.2 - transitivePeerDependencies: - - '@babel/core' - - '@glint/template' - - supports-color - - webpack - dev: true - /ember-data@5.3.0(@babel/core@7.23.9)(@ember/string@3.1.1)(ember-source@3.28.12): resolution: {integrity: sha512-ca8udUa2SrWyYxPckYc89Fdv/9pCG3X360zHvlGxtB4C87o3dWp6sle98tP9G1TjximKhrU/PMrqpdhJ8rOGtA==} engines: {node: 16.* || >= 18.*} @@ -14070,29 +13818,6 @@ packages: engines: {node: '>= 4'} dev: true - /ember-fetch@8.1.2: - resolution: {integrity: sha512-TVx24/jrvDIuPL296DV0hBwp7BWLcSMf0I8464KGz01sPytAB+ZAePbc9ooBTJDkKZEGFgatJa4nj3yF1S9Bpw==} - engines: {node: '>= 10'} - dependencies: - abortcontroller-polyfill: 1.7.5 - broccoli-concat: 4.2.5 - broccoli-debug: 0.6.5 - broccoli-merge-trees: 4.2.0 - broccoli-rollup: 2.1.1 - broccoli-stew: 3.0.0 - broccoli-templater: 2.0.2 - calculate-cache-key-for-tree: 2.0.0 - caniuse-api: 3.0.0 - ember-cli-babel: 7.26.11 - ember-cli-typescript: 4.2.1 - ember-cli-version-checker: 5.1.2 - node-fetch: 2.7.0 - whatwg-fetch: 3.6.20 - transitivePeerDependencies: - - encoding - - supports-color - dev: true - /ember-focus-trap@1.1.0(ember-source@3.28.12): resolution: {integrity: sha512-KxbCKpAJaBVZm+bW4tHPoBJAZThmxa6pI+WQusL+bj0RtAnGUNkWsVy6UBMZ5QqTQzf4EvGHkCVACVp5lbAWMQ==} engines: {node: 12.* || >= 14} @@ -14211,6 +13936,22 @@ packages: - supports-color dev: true + /ember-modifier@4.1.0(ember-source@5.0.0): + resolution: {integrity: sha512-YFCNpEYj6jdyy3EjslRb2ehNiDvaOrXTilR9+ngq+iUqSHYto2zKV0rleiA1XJQ27ELM1q8RihT29U6Lq5EyqQ==} + peerDependencies: + ember-source: '*' + peerDependenciesMeta: + ember-source: + optional: true + dependencies: + '@embroider/addon-shim': 1.8.7 + ember-cli-normalize-entity-name: 1.0.0 + ember-cli-string-utils: 1.1.0 + ember-source: 5.0.0(@babel/core@7.23.9)(@glimmer/component@1.1.2) + transitivePeerDependencies: + - supports-color + dev: true + /ember-modifier@4.1.0(ember-source@5.3.0): resolution: {integrity: sha512-YFCNpEYj6jdyy3EjslRb2ehNiDvaOrXTilR9+ngq+iUqSHYto2zKV0rleiA1XJQ27ELM1q8RihT29U6Lq5EyqQ==} peerDependencies: @@ -14284,12 +14025,12 @@ packages: - supports-color dev: true - /ember-popper-modifier@2.0.1(@babel/core@7.23.9): + /ember-popper-modifier@2.0.1(@babel/core@7.23.9)(webpack@5.90.3): resolution: {integrity: sha512-NczO1m4uDFs4f4L8VEoC5MmRSZZvpTGwCWunYXQ+5vuWKIJ2KnPJQ3cRp9a1EpsWrfPwss+sB4JAEsY24ffdDA==} engines: {node: 10.* || >= 12} dependencies: '@popperjs/core': 2.11.8 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-htmlbars: 6.3.0 ember-modifier: 3.2.7(@babel/core@7.23.9) @@ -14352,7 +14093,7 @@ packages: - webpack dev: true - /ember-qunit@7.0.0(@ember/test-helpers@3.3.0)(ember-source@3.28.12)(qunit@2.20.1): + /ember-qunit@7.0.0(@ember/test-helpers@3.3.0)(ember-source@3.28.12)(qunit@2.20.1)(webpack@5.90.3): resolution: {integrity: sha512-KhrndHYEXsHnXvmsGyJLJQ6VCudXaRs5dzPZBsdttZJIhsB6PmYAvq2Q+mh3GRDT/59T/sRDrB3FD3/lATS8aA==} engines: {node: 16.* || >= 18} peerDependencies: @@ -14360,11 +14101,11 @@ packages: ember-source: '>=4.0.0' qunit: ^2.13.0 dependencies: - '@ember/test-helpers': 3.3.0(ember-source@3.28.12) + '@ember/test-helpers': 3.3.0(ember-source@3.28.12)(webpack@5.90.3) broccoli-funnel: 3.0.8 broccoli-merge-trees: 3.0.2 common-tags: 1.8.2 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-test-loader: 3.1.0 ember-source: 3.28.12(@babel/core@7.23.9) @@ -14378,6 +14119,32 @@ packages: - webpack dev: true + /ember-qunit@7.0.0(@ember/test-helpers@3.3.0)(ember-source@5.0.0)(qunit@2.20.1): + resolution: {integrity: sha512-KhrndHYEXsHnXvmsGyJLJQ6VCudXaRs5dzPZBsdttZJIhsB6PmYAvq2Q+mh3GRDT/59T/sRDrB3FD3/lATS8aA==} + engines: {node: 16.* || >= 18} + peerDependencies: + '@ember/test-helpers': '>=3.0.3' + ember-source: '>=4.0.0' + qunit: ^2.13.0 + dependencies: + '@ember/test-helpers': 3.3.0(ember-source@5.0.0) + broccoli-funnel: 3.0.8 + broccoli-merge-trees: 3.0.2 + common-tags: 1.8.2 + ember-auto-import: 2.7.2 + ember-cli-babel: 7.26.11 + ember-cli-test-loader: 3.1.0 + ember-source: 5.0.0(@babel/core@7.23.9)(@glimmer/component@1.1.2) + qunit: 2.20.1 + resolve-package-path: 4.0.3 + silent-error: 1.1.1 + validate-peer-dependencies: 2.2.0 + transitivePeerDependencies: + - '@glint/template' + - supports-color + - webpack + dev: true + /ember-qunit@7.0.0(@ember/test-helpers@3.3.0)(ember-source@5.7.0-beta.1)(qunit@2.20.1): resolution: {integrity: sha512-KhrndHYEXsHnXvmsGyJLJQ6VCudXaRs5dzPZBsdttZJIhsB6PmYAvq2Q+mh3GRDT/59T/sRDrB3FD3/lATS8aA==} engines: {node: 16.* || >= 18} @@ -14478,6 +14245,23 @@ packages: - supports-color dev: true + /ember-resolver@10.1.1(@ember/string@3.1.1)(ember-source@5.0.0): + resolution: {integrity: sha512-y1zzn6C4YGJui+tJzcCKlsf1oSOSVAkRrvmg8OwqVIKnALKKb9ihx2qLCslHg8x0wJvJgMtDMXgrczvQrZW0Lw==} + engines: {node: 14.* || 16.* || >= 18} + peerDependencies: + '@ember/string': ^3.0.1 + ember-source: ^4.8.3 || >= 5.0.0 + peerDependenciesMeta: + ember-source: + optional: true + dependencies: + '@ember/string': 3.1.1 + ember-cli-babel: 7.26.11 + ember-source: 5.0.0(@babel/core@7.23.9)(@glimmer/component@1.1.2) + transitivePeerDependencies: + - supports-color + dev: true + /ember-resolver@10.1.1(@ember/string@3.1.1)(ember-source@5.7.0-beta.1): resolution: {integrity: sha512-y1zzn6C4YGJui+tJzcCKlsf1oSOSVAkRrvmg8OwqVIKnALKKb9ihx2qLCslHg8x0wJvJgMtDMXgrczvQrZW0Lw==} engines: {node: 14.* || 16.* || >= 18} @@ -14648,7 +14432,7 @@ packages: - webpack dev: true - /ember-source@4.4.5(@babel/core@7.23.9): + /ember-source@4.4.5(@babel/core@7.23.9)(webpack@5.90.3): resolution: {integrity: sha512-5U+IYHEb2XPokrLEQBy6N2+MwbE909K4RKKQxOLQEwnThWcO2cTTLTbz7z3biYL4vyne04ygXVqzlfUtKWwVQQ==} engines: {node: '>= 12.*'} dependencies: @@ -14664,7 +14448,7 @@ packages: broccoli-funnel: 3.0.8 broccoli-merge-trees: 4.2.0 chalk: 4.1.2 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-get-component-path-option: 1.0.0 ember-cli-is-package-missing: 1.0.0 @@ -14722,6 +14506,46 @@ packages: - webpack dev: true + /ember-source@5.0.0(@babel/core@7.23.9)(@glimmer/component@1.1.2): + resolution: {integrity: sha512-zy0iU3Mf9HZXVQacqWLAfHCbQge8Ysi2EpU6XTgrdf2PX5ILdWTbSPklxuTlkGV7NrG5PkIfGW8hfimwY6I/tw==} + engines: {node: '>= 16.*'} + peerDependencies: + '@glimmer/component': ^1.1.2 + dependencies: + '@babel/helper-module-imports': 7.22.15 + '@babel/plugin-transform-block-scoping': 7.23.4(@babel/core@7.23.9) + '@ember/edition-utils': 1.2.0 + '@glimmer/component': 1.1.2(@babel/core@7.23.9) + '@glimmer/vm-babel-plugins': 0.84.2(@babel/core@7.23.9) + babel-plugin-debug-macros: 0.3.4(@babel/core@7.23.9) + babel-plugin-filter-imports: 4.0.0 + broccoli-concat: 4.2.5 + broccoli-debug: 0.6.5 + broccoli-file-creator: 2.1.1 + broccoli-funnel: 3.0.8 + broccoli-merge-trees: 4.2.0 + chalk: 4.1.2 + ember-auto-import: 2.7.2 + ember-cli-babel: 7.26.11 + ember-cli-get-component-path-option: 1.0.0 + ember-cli-is-package-missing: 1.0.0 + ember-cli-normalize-entity-name: 1.0.0 + ember-cli-path-utils: 1.0.0 + ember-cli-string-utils: 1.1.0 + ember-cli-typescript-blueprint-polyfill: 0.1.0 + ember-cli-version-checker: 5.1.2 + ember-router-generator: 2.0.0 + inflection: 1.13.4 + resolve: 1.22.8 + semver: 7.6.0 + silent-error: 1.1.1 + transitivePeerDependencies: + - '@babel/core' + - '@glint/template' + - supports-color + - webpack + dev: true + /ember-source@5.3.0(@babel/core@7.23.9)(@glimmer/component@1.1.2)(@glint/template@1.3.0)(webpack@5.90.3): resolution: {integrity: sha512-MnsPEYo2gArYzlY0uu5bBH60oNYcgcayYQEd27nJumuaceN1sMLMu1jGQmjiQzZ4b6U5edEUNQbCIZ/9TXbASw==} engines: {node: '>= 16.*'} @@ -14781,7 +14605,7 @@ packages: - webpack dev: true - /ember-source@5.6.0(@babel/core@7.23.9): + /ember-source@5.6.0(@babel/core@7.23.9)(webpack@5.90.3): resolution: {integrity: sha512-dtxi3cVPT4/+NyhA+a+4UL/i+ut4Fuu3uJAgkVqrN1XlK4TXpyVp9I6VbH7DjD5+LJdF1+UqIn8GJ50dIdoH2Q==} engines: {node: '>= 16.*'} dependencies: @@ -14816,7 +14640,7 @@ packages: broccoli-funnel: 3.0.8 broccoli-merge-trees: 4.2.0 chalk: 4.1.2 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-get-component-path-option: 1.0.0 ember-cli-is-package-missing: 1.0.0 @@ -14901,7 +14725,7 @@ packages: - webpack dev: true - /ember-source@5.7.0-beta.2(@babel/core@7.23.9): + /ember-source@5.7.0-beta.2(@babel/core@7.23.9)(webpack@5.90.3): resolution: {integrity: sha512-Ep/oOmkYhtV/xv4lhqH+XucU6ioKEcaR7BWzaCGzjG2S4ly+yJwfm8hwticBFGGpDxxm4WZrSABvwe87SHA5zQ==} engines: {node: '>= 16.*'} dependencies: @@ -14936,7 +14760,7 @@ packages: broccoli-funnel: 3.0.8 broccoli-merge-trees: 4.2.0 chalk: 4.1.2 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-get-component-path-option: 1.0.0 ember-cli-is-package-missing: 1.0.0 @@ -18158,12 +17982,6 @@ packages: /is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - /is-reference@1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - dependencies: - '@types/estree': 1.0.5 - dev: true - /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -19231,10 +19049,6 @@ packages: /loader.js@4.7.0: resolution: {integrity: sha512-9M2KvGT6duzGMgkOcTkWb+PR/Q2Oe54df/tLgHGVmFpAmtqJ553xJh6N63iFYI2yjo2PeJXbS5skHi/QpJq4vA==} - /locate-character@2.0.5: - resolution: {integrity: sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg==} - dev: true - /locate-path@2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} @@ -19362,10 +19176,6 @@ packages: lodash.isarguments: 3.1.0 lodash.isarray: 3.0.4 - /lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - dev: true - /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -19461,12 +19271,6 @@ packages: engines: {node: '>=12'} dev: true - /magic-string@0.24.1: - resolution: {integrity: sha512-YBfNxbJiixMzxW40XqJEIldzHyh5f7CZKalo1uZffevyrPEX8Qgo9s0dmcORLHdV47UyvJg8/zD+6hQG3qvJrA==} - dependencies: - sourcemap-codec: 1.4.8 - dev: true - /magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} dependencies: @@ -20728,11 +20532,6 @@ packages: lines-and-columns: 1.2.4 dev: true - /parse-ms@1.0.1: - resolution: {integrity: sha512-LpH1Cf5EYuVjkBvCDBYvkUPh+iv2bk3FHflxHkpCYT0/FZ1d3N3uJaLiHr4yGuMcFUhv6eAivitTvWZI4B/chg==} - engines: {node: '>=0.10.0'} - dev: true - /parse-ms@2.1.0: resolution: {integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==} engines: {node: '>=6'} @@ -21071,13 +20870,6 @@ packages: ansi-styles: 5.2.0 react-is: 18.2.0 - /pretty-ms@3.2.0: - resolution: {integrity: sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==} - engines: {node: '>=4'} - dependencies: - parse-ms: 1.0.1 - dev: true - /pretty-ms@7.0.1: resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==} engines: {node: '>=10'} @@ -21697,10 +21489,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - /require-relative@0.8.7: - resolution: {integrity: sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==} - dev: true - /requireindex@1.2.0: resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} engines: {node: '>=0.10.5'} @@ -21871,23 +21659,6 @@ packages: estree-walker: 0.6.1 dev: true - /rollup@0.57.1: - resolution: {integrity: sha512-I18GBqP0qJoJC1K1osYjreqA8VAKovxuI3I81RSk0Dmr4TgloI0tAULjZaox8OsJ+n7XRrhH6i0G2By/pj1LCA==} - hasBin: true - dependencies: - '@types/acorn': 4.0.6 - acorn: 5.7.4 - acorn-dynamic-import: 3.0.0 - date-time: 2.1.0 - is-reference: 1.2.1 - locate-character: 2.0.5 - pretty-ms: 3.2.0 - require-relative: 0.8.7 - rollup-pluginutils: 2.8.2 - signal-exit: 3.0.7 - sourcemap-codec: 1.4.8 - dev: true - /rollup@2.79.1: resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} engines: {node: '>=10.0.0'} @@ -23302,11 +23073,6 @@ packages: /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - /time-zone@1.0.0: - resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} - engines: {node: '>=4'} - dev: true - /timed-out@4.0.1: resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} engines: {node: '>=0.10.0'} @@ -24000,6 +23766,41 @@ packages: fsevents: 2.3.3 dev: true + /vite@5.1.6: + resolution: {integrity: sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.19.12 + postcss: 8.4.35 + rollup: 4.12.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /w3c-hr-time@1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} deprecated: Use your platform's native performance.now() and performance.timeOrigin. @@ -24189,10 +23990,6 @@ packages: dependencies: iconv-lite: 0.6.3 - /whatwg-fetch@3.6.20: - resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} - dev: true - /whatwg-mimetype@2.3.0: resolution: {integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==} dev: false @@ -24512,7 +24309,7 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} - '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz(@babel/core@7.23.9)': + '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz(@babel/core@7.23.9)(webpack@5.90.3)': resolution: {tarball: https://s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz} id: '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz' name: ember-source @@ -24550,7 +24347,7 @@ packages: broccoli-funnel: 3.0.8 broccoli-merge-trees: 4.2.0 chalk: 4.1.2 - ember-auto-import: 2.7.2 + ember-auto-import: 2.7.2(@glint/template@1.3.0)(webpack@5.90.3) ember-cli-babel: 7.26.11 ember-cli-get-component-path-option: 1.0.0 ember-cli-is-package-missing: 1.0.0 diff --git a/tests/app-template/.ember-cli b/tests/app-template/.ember-cli index 4ccb4bf43..8c1812cff 100644 --- a/tests/app-template/.ember-cli +++ b/tests/app-template/.ember-cli @@ -8,8 +8,8 @@ "disableAnalytics": false, /** - Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript - rather than JavaScript by default, when a TypeScript version of a given blueprint is available. + Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript + rather than JavaScript by default, when a TypeScript version of a given blueprint is available. */ "isTypeScriptProject": false } diff --git a/tests/app-template/.eslintignore b/tests/app-template/.eslintignore index d474a40bd..9385391f2 100644 --- a/tests/app-template/.eslintignore +++ b/tests/app-template/.eslintignore @@ -1,25 +1,13 @@ # unconventional js /blueprints/*/files/ -/vendor/ # compiled output /dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ # misc /coverage/ !.* .*/ -.eslintcache # ember-try /.node_modules.ember-try/ -/bower.json.ember-try -/npm-shrinkwrap.json.ember-try -/package.json.ember-try -/package-lock.json.ember-try -/yarn.lock.ember-try diff --git a/tests/app-template/.eslintrc.js b/tests/app-template/.eslintrc.js index ebca75c1e..5fb672c2a 100644 --- a/tests/app-template/.eslintrc.js +++ b/tests/app-template/.eslintrc.js @@ -2,10 +2,16 @@ module.exports = { root: true, - parser: 'babel-eslint', + parser: '@babel/eslint-parser', parserOptions: { - ecmaVersion: 2018, + ecmaVersion: 'latest', sourceType: 'module', + requireConfigFile: false, + babelOptions: { + plugins: [ + ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], + ], + }, }, plugins: ['ember'], extends: ['eslint:recommended', 'plugin:ember/recommended'], @@ -19,6 +25,7 @@ module.exports = { files: [ './.eslintrc.js', './.prettierrc.js', + './.stylelintrc.js', './.template-lintrc.js', './ember-cli-build.js', './testem.js', @@ -34,14 +41,7 @@ module.exports = { browser: false, node: true, }, - plugins: ['node'], - extends: ['plugin:node/recommended'], - rules: { - // this can be removed once the following is fixed - // https://github.com/mysticatea/eslint-plugin-node/issues/77 - 'node/no-unpublished-require': 'off', - 'node/no-missing-require': 'off', - }, + extends: ['plugin:n/recommended'], }, { // test files diff --git a/tests/app-template/.github/workflows/ci.yml b/tests/app-template/.github/workflows/ci.yml deleted file mode 100644 index 34efd595b..000000000 --- a/tests/app-template/.github/workflows/ci.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: CI - -on: - push: - branches: - - main - - master - pull_request: {} - -concurrency: - group: ci-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - lint: - name: "Lint" - runs-on: ubuntu-latest - timeout-minutes: 10 - - steps: - - uses: actions/checkout@v3 - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: 14.x - cache: npm - - name: Install Dependencies - run: yarn install --frozen-lockfile - - name: Lint - run: yarn lint - - test: - name: "Test" - runs-on: ubuntu-latest - timeout-minutes: 10 - - steps: - - uses: actions/checkout@v3 - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: 14.x - cache: npm - - name: Install Dependencies - run: yarn install --frozen-lockfile - - name: Run Tests - run: yarn test diff --git a/tests/app-template/.gitignore b/tests/app-template/.gitignore index 59a00ea13..8dcec07ec 100644 --- a/tests/app-template/.gitignore +++ b/tests/app-template/.gitignore @@ -1,11 +1,7 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - # compiled output /dist/ -/tmp/ # dependencies -/bower_components/ /node_modules/ # misc @@ -13,15 +9,14 @@ /.pnp* /.sass-cache /connect.lock +/.eslintcache /coverage/ -/libpeerconnection.log /npm-debug.log* /testem.log /yarn-error.log # ember-try /.node_modules.ember-try/ -/bower.json.ember-try /npm-shrinkwrap.json.ember-try /package.json.ember-try /package-lock.json.ember-try diff --git a/tests/app-template/.prettierrc.js b/tests/app-template/.prettierrc.js index 52881f37e..e5f7b6d1e 100644 --- a/tests/app-template/.prettierrc.js +++ b/tests/app-template/.prettierrc.js @@ -3,7 +3,7 @@ module.exports = { overrides: [ { - files: '*{js,ts}', + files: '*.{js,ts}', options: { singleQuote: true, }, diff --git a/tests/app-template/.stylelintignore b/tests/app-template/.stylelintignore new file mode 100644 index 000000000..a0cf71cbd --- /dev/null +++ b/tests/app-template/.stylelintignore @@ -0,0 +1,8 @@ +# unconventional files +/blueprints/*/files/ + +# compiled output +/dist/ + +# addons +/.node_modules.ember-try/ diff --git a/tests/app-template/.stylelintrc.js b/tests/app-template/.stylelintrc.js new file mode 100644 index 000000000..021c539ad --- /dev/null +++ b/tests/app-template/.stylelintrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'], +}; diff --git a/tests/app-template/.watchmanconfig b/tests/app-template/.watchmanconfig index e7834e3e4..f9c3d8f84 100644 --- a/tests/app-template/.watchmanconfig +++ b/tests/app-template/.watchmanconfig @@ -1,3 +1,3 @@ { - "ignore_dirs": ["tmp", "dist"] + "ignore_dirs": ["dist"] } diff --git a/tests/app-template/app/styles/app.css b/tests/app-template/app/styles/app.css index e69de29bb..2763afa4c 100644 --- a/tests/app-template/app/styles/app.css +++ b/tests/app-template/app/styles/app.css @@ -0,0 +1 @@ +/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */ diff --git a/tests/app-template/babel.config.cjs b/tests/app-template/babel.config.cjs new file mode 100644 index 000000000..28a6d38b1 --- /dev/null +++ b/tests/app-template/babel.config.cjs @@ -0,0 +1,19 @@ +// eslint-disable-next-line n/no-missing-require + +let config; + +// TODO - remove this once we have the better solution for injecting stage1 babel config into a real config file +// this is needed because there are things (like ember-composible-helpers) that are now finding our babel config during +// their stage1 build and historically they will never (99% of the time) have found any babel config. +// we might need to keep something like this so that prebuild will never apply babel configs during stage1 i.e. a util +// function that wraps your whole babel config +if ( + process.env.EMBROIDER_PREBUILD || + process.env.EMBROIDER_TEST_SETUP_FORCE === "classic" +) { + config = {}; +} else { + config = require("./node_modules/.embroider/rewritten-app/_babel_config_"); +} + +module.exports = config; diff --git a/tests/app-template/config/ember-cli-update.json b/tests/app-template/config/ember-cli-update.json index 1767e741c..592c332da 100644 --- a/tests/app-template/config/ember-cli-update.json +++ b/tests/app-template/config/ember-cli-update.json @@ -3,7 +3,7 @@ "packages": [ { "name": "ember-cli", - "version": "4.6.0", + "version": "5.0.0", "blueprints": [ { "name": "app", diff --git a/tests/app-template/config/environment.js b/tests/app-template/config/environment.js index fd7336e9f..778f59a90 100644 --- a/tests/app-template/config/environment.js +++ b/tests/app-template/config/environment.js @@ -1,12 +1,13 @@ 'use strict'; module.exports = function (environment) { - let ENV = { + const ENV = { modulePrefix: 'app-template', environment, rootURL: '/', locationType: 'history', EmberENV: { + EXTEND_PROTOTYPES: false, FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true diff --git a/tests/app-template/package.json b/tests/app-template/package.json index 7f8d93f2b..d431a1a2d 100644 --- a/tests/app-template/package.json +++ b/tests/app-template/package.json @@ -11,64 +11,71 @@ "test": "tests" }, "scripts": { - "build": "ember build", - "build:production": "ember build -prod", - "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", + "build": "vite build", + "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", + "lint:css": "stylelint \"**/*.css\"", + "lint:css:fix": "concurrently \"npm:lint:css -- --fix\"", + "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", - "start": "ember serve", - "test": "ember test", - "test:ember": "ember test" + "start": "vite", + "test": "vite build --mode test && ember test --path dist", + "test:ember": "vite build --mode test && ember test --path dist" }, "devDependencies": { "@babel/core": "^7.19.3", + "@babel/eslint-parser": "^7.22.5", + "@babel/plugin-proposal-decorators": "^7.22.5", "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.9.1", + "@ember/string": "^3.1.1", + "@ember/test-helpers": "^3.0.3", "@embroider/compat": "workspace:*", "@embroider/core": "workspace:*", "@embroider/router": "workspace:*", - "@ember/string": "^3.1.1", "@embroider/test-setup": "workspace:*", - "@embroider/webpack": "workspace:*", + "@embroider/vite": "workspace:*", "@glimmer/component": "^1.1.2", "@glimmer/tracking": "^1.1.2", - "babel-eslint": "^10.1.0", + "@rollup/plugin-babel": "^5.3.1", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^2.4.2", - "ember-cli": "~4.6.0", - "ember-cli-app-version": "^5.0.0", + "concurrently": "^8.2.0", + "ember-auto-import": "^2.6.3", + "ember-cli": "~5.0.0", + "ember-cli-app-version": "^6.0.0", "ember-cli-babel": "^7.26.11", + "ember-cli-clean-css": "^2.0.0", "ember-cli-dependency-checker": "^3.3.1", - "ember-cli-htmlbars": "^6.1.0", + "ember-cli-htmlbars": "^6.2.0", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~4.4.0", - "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", + "ember-modifier": "^4.1.0", "ember-page-title": "^7.0.0", - "ember-qunit": "^6.1.1", + "ember-qunit": "^7.0.0", "ember-resolver": "^10.1.0", - "ember-source": "~4.6.0", - "ember-template-lint": "^4.10.1", - "eslint": "^7.32.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-ember": "^11.0.2", - "eslint-plugin-node": "^11.1.0", + "ember-source": "~5.0.0", + "ember-template-lint": "^5.10.1", + "eslint": "^8.42.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-ember": "^11.8.0", + "eslint-plugin-n": "^16.0.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-qunit": "^7.3.1", + "eslint-plugin-qunit": "^7.3.4", "loader.js": "^4.7.0", - "npm-run-all": "^4.1.5", - "prettier": "^2.7.1", - "qunit": "^2.19.1", + "prettier": "^2.8.8", + "qunit": "^2.19.4", "qunit-dom": "^2.0.0", - "webpack": "^5.74.0" + "stylelint": "^15.7.0", + "stylelint-config-standard": "^33.0.0", + "stylelint-prettier": "^3.0.0", + "tracked-built-ins": "^3.1.1", + "vite": "^5.0.9" }, "engines": { - "node": "14.* || >= 16" + "node": "16.* || >= 18" }, "ember": { "edition": "octane" diff --git a/tests/app-template/vendor/.gitkeep b/tests/app-template/vendor/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/app-template/vite.config.mjs b/tests/app-template/vite.config.mjs new file mode 100644 index 000000000..376422f0a --- /dev/null +++ b/tests/app-template/vite.config.mjs @@ -0,0 +1,61 @@ +import { defineConfig } from "vite"; +import { + resolver, + hbs, + scripts, + templateTag, + optimizeDeps, + compatPrebuild, +} from "@embroider/vite"; +import { resolve } from "path"; +import { babel } from "@rollup/plugin-babel"; + +const root = "node_modules/.embroider/rewritten-app"; + +export default defineConfig(({ mode }) => { + return { + root, + // esbuild in vite does not support decorators + esbuild: false, + cacheDir: resolve("node_modules", ".vite"), + plugins: [ + hbs(), + templateTag(), + scripts(), + resolver(), + compatPrebuild(), + + babel({ + babelHelpers: "runtime", + + // this needs .hbs because our hbs() plugin above converts them to + // javascript but the javascript still also needs babel, but we don't want + // to rename them because vite isn't great about knowing how to hot-reload + // them if we resolve them to made-up names. + extensions: [".gjs", ".js", ".hbs", ".ts", ".gts"], + }), + ], + optimizeDeps: optimizeDeps(), + server: { + port: 4200, + watch: { + ignored: ["!**/node_modules/.embroider/rewritten-app/**"], + }, + }, + build: { + outDir: resolve(process.cwd(), "dist"), + rollupOptions: { + input: { + main: resolve(root, "index.html"), + ...(shouldBuildTests(mode) + ? { tests: resolve(root, "tests/index.html") } + : undefined), + }, + }, + }, + }; +}); + +function shouldBuildTests(mode) { + return mode !== "production" || process.env.FORCE_BUILD_TESTS; +} diff --git a/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js b/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js index 280a823ab..bb4421fac 100644 --- a/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js +++ b/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js @@ -1,17 +1,17 @@ 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { maybeEmbroider } = require('@embroider/test-setup'); module.exports = function (defaults) { let app = new EmberApp(defaults, { - // Add options here addons: { exclude: ['blacklisted-in-repo-addon'], }, }); - const { Webpack } = require('@embroider/webpack'); - return require('@embroider/compat').compatBuild(app, Webpack, { + return maybeEmbroider(app, { + skipBabel: [ { package: 'qunit', diff --git a/tests/fixtures/fastboot-app/ember-cli-build.js b/tests/fixtures/fastboot-app/ember-cli-build.js index 0e68751cb..8c3afd648 100644 --- a/tests/fixtures/fastboot-app/ember-cli-build.js +++ b/tests/fixtures/fastboot-app/ember-cli-build.js @@ -1,28 +1,10 @@ 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { prebuild } = require('@embroider/compat'); module.exports = function (defaults) { let app = new EmberApp(defaults, {}); - const Webpack = require('@embroider/webpack').Webpack; - return require('@embroider/compat').compatBuild(app, Webpack, { - skipBabel: [ - { - package: 'qunit', - }, - ], - packagerOptions: { - webpackConfig: { - optimization: { - splitChunks: { - // In these tests we want to guarantee that the lazily imported - // things really get handled lazily by webpack, even if they're too - // small for the optimizer to normally bother with - minSize: 1, - }, - }, - }, - }, - }); + return prebuild(app); }; diff --git a/tests/fixtures/macro-sample-addon/tests/integration/helpers/reflect-config-test.js b/tests/fixtures/macro-sample-addon/tests/integration/helpers/reflect-config-test.js index 10025d7a9..580a73a31 100644 --- a/tests/fixtures/macro-sample-addon/tests/integration/helpers/reflect-config-test.js +++ b/tests/fixtures/macro-sample-addon/tests/integration/helpers/reflect-config-test.js @@ -1,17 +1,18 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; -import { helper } from '@ember/component/helper'; +import { precompileTemplate } from '@ember/template-compilation'; module('Integration | Helper | reflect-config', function (hooks) { setupRenderingTest(hooks); test('it accesses our config', async function (assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function ([value]) { + function myAssertion(value) { assert.deepEqual(value, { hello: 'world' }); + } + await render(precompileTemplate(`{{myAssertion (reflect-config) }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (reflect-config) }}`); }); }); diff --git a/tests/fixtures/macro-test/ember-cli-build.js b/tests/fixtures/macro-test/ember-cli-build.js index 7daf1d63f..aa0460719 100644 --- a/tests/fixtures/macro-test/ember-cli-build.js +++ b/tests/fixtures/macro-test/ember-cli-build.js @@ -1,6 +1,7 @@ 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { maybeEmbroider } = require('@embroider/test-setup'); module.exports = function (defaults) { let app = new EmberApp(defaults, { @@ -41,10 +42,5 @@ module.exports = function (defaults) { app.import('vendor/prepend/four.js', { prepend: true }); app.import('vendor/prepend/order.js', { prepend: true }); - if (process.env.CLASSIC) { - return app.toTree(); - } - - const Webpack = require('@embroider/webpack').Webpack; - return require('@embroider/compat').compatBuild(app, Webpack); + return maybeEmbroider(app); }; diff --git a/tests/fixtures/macro-test/tests/acceptance/basic-test.js b/tests/fixtures/macro-test/tests/acceptance/basic-test.js index 8e6daad09..3113199c6 100644 --- a/tests/fixtures/macro-test/tests/acceptance/basic-test.js +++ b/tests/fixtures/macro-test/tests/acceptance/basic-test.js @@ -6,7 +6,11 @@ import ENV from 'app-template/config/environment'; module('Acceptance | smoke tests', function (hooks) { setupApplicationTest(hooks); - test('ensure all scripts in index.html 200', async function (assert) { + // TODO: this currently fails on apple.js, which was added to test app.import + // custom outputPath support. It's unclear whether we want to keep that + // feature, and regardless this test suite was a bad place to test it, so I'm + // skipping this. -ef4 + test.skip('ensure all scripts in index.html 200', async function (assert) { for (let { src } of document.scripts) { let { status } = await fetch(src); assert.equal(status, 200, `expected: '${src}' to be accessible`); @@ -31,7 +35,11 @@ module('Acceptance | smoke tests', function (hooks) { assert.equal(this.element.querySelector('[data-test-testing]').textContent.trim(), 'true'); }); - test('/ordered.js is ordered correctly', function (assert) { + + // TODO: this tests app.import custom outputPath support. It's unclear whether + // we want to keep that feature, and regardless this test suite was a bad + // place to test it, so I'm skipping this. -ef4 + test.skip('/ordered.js is ordered correctly', function (assert) { assert.deepEqual(self.ORDER, [ // these come via app.import(name, { prepend: true }); // which ultimately end up in vendor.js diff --git a/tests/fixtures/macro-test/tests/integration/components/cross-package-config-test.js b/tests/fixtures/macro-test/tests/integration/components/cross-package-config-test.js index 7fad9f6b5..a6573e272 100644 --- a/tests/fixtures/macro-test/tests/integration/components/cross-package-config-test.js +++ b/tests/fixtures/macro-test/tests/integration/components/cross-package-config-test.js @@ -1,26 +1,24 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; -import { helper } from '@ember/component/helper'; import { reflectAddonConfig } from 'app-template/helpers/reflect-addon-config'; +import { precompileTemplate } from "@ember/template-compilation"; module('Integration | cross-package-config', function (hooks) { setupRenderingTest(hooks); test(`addon's JS can see addon's merged config`, async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.deepEqual(value, { - shouldBeOverwritten: 'overwritten', - configFromAddonItself: 'this is the addon', - configFromMacrosTests: 'exists', - }); - }) - ); - await render(hbs`{{my-assertion (reflect-config)}}`); + function myAssertion(value) { + assert.deepEqual(value, { + shouldBeOverwritten: 'overwritten', + configFromAddonItself: 'this is the addon', + configFromMacrosTests: 'exists', + }); + } + await render(precompileTemplate('{{myAssertion (reflect-config)}}', { + scope: () => ({ myAssertion }) + })); }); test(`app's JS can see addon's merged config`, async function (assert) { @@ -33,31 +31,29 @@ module('Integration | cross-package-config', function (hooks) { test(`addon's HBS can see addon's merged config`, async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.deepEqual(value, { - shouldBeOverwritten: 'overwritten', - configFromAddonItself: 'this is the addon', - configFromMacrosTests: 'exists', - }); - }) - ); - await render(hbs`{{#reflect-hbs-config as |config|}} {{my-assertion config}} {{/reflect-hbs-config}}`); + function myAssertion(value) { + assert.deepEqual(value, { + shouldBeOverwritten: 'overwritten', + configFromAddonItself: 'this is the addon', + configFromMacrosTests: 'exists', + }); + } + await render(precompileTemplate(`{{#reflect-hbs-config as |config|}} {{myAssertion config}} {{/reflect-hbs-config}}`, { + scope: () => ({ myAssertion }) + })); }); test(`app's HBS can see addon's merged config`, async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.deepEqual(value, { - shouldBeOverwritten: 'overwritten', - configFromAddonItself: 'this is the addon', - configFromMacrosTests: 'exists', - }); - }) - ); - await render(hbs`{{my-assertion (macroGetConfig "macro-sample-addon" )}}`); + function myAssertion(value) { + assert.deepEqual(value, { + shouldBeOverwritten: 'overwritten', + configFromAddonItself: 'this is the addon', + configFromMacrosTests: 'exists', + }); + } + await render(precompileTemplate(`{{myAssertion (macroGetConfig "macro-sample-addon" )}}`, { + scope: () => ({ myAssertion }) + })); }); }); diff --git a/tests/fixtures/macro-test/tests/integration/components/dependency-satisfies-test.js b/tests/fixtures/macro-test/tests/integration/components/dependency-satisfies-test.js index 84ff23af9..a7f8d9e4a 100644 --- a/tests/fixtures/macro-test/tests/integration/components/dependency-satisfies-test.js +++ b/tests/fixtures/macro-test/tests/integration/components/dependency-satisfies-test.js @@ -2,7 +2,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -import { helper } from '@ember/component/helper'; +import { precompileTemplate } from "@ember/template-compilation"; module('Integration | Macro | dependencySatisfies', function(hooks) { setupRenderingTest(hooks); @@ -14,26 +14,32 @@ module('Integration | Macro | dependencySatisfies', function(hooks) { test('macroDependencySatisfies in subexpression position', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.strictEqual(value, true); + } + await render(precompileTemplate(`{{myAssertion (macroDependencySatisfies "ember-cli" "*") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroDependencySatisfies "ember-cli" "*") }}`); }); test('macroDependencySatisfies emits false for missing package', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.strictEqual(value, false); + } + await render(precompileTemplate(`{{myAssertion (macroDependencySatisfies "not-a-package" "*") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroDependencySatisfies "not-a-package" "*") }}`); }); test('macroDependencySatisfies emits false for out-of-range package', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.strictEqual(value, false); + } + await render(precompileTemplate(`{{myAssertion (macroDependencySatisfies "ember-cli" "0.0.1") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroDependencySatisfies "ember-cli" "0.0.1") }}`); }); }); diff --git a/tests/fixtures/macro-test/tests/integration/components/get-config-test.js b/tests/fixtures/macro-test/tests/integration/components/get-config-test.js index 5746b820e..127d47d42 100644 --- a/tests/fixtures/macro-test/tests/integration/components/get-config-test.js +++ b/tests/fixtures/macro-test/tests/integration/components/get-config-test.js @@ -2,7 +2,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -import { helper } from '@ember/component/helper'; +import { precompileTemplate } from "@ember/template-compilation"; module('Integration | Macro | getConfig', function(hooks) { setupRenderingTest(hooks); @@ -29,39 +29,47 @@ module('Integration | Macro | getConfig', function(hooks) { test('macroGetOwnConfig emits number', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.equal(value, 42); + } + await render(precompileTemplate(`{{myAssertion (macroGetOwnConfig "count") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroGetOwnConfig "count") }}`); }); test('macroGetOwnConfig emits boolean', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.equal(value, true); + } + await render(precompileTemplate(`{{myAssertion (macroGetOwnConfig "inner" "items" "0" "awesome") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroGetOwnConfig "inner" "items" "0" "awesome") }}`); }); test('macroGetOwnConfig emits string', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.strictEqual(value, 'amazing'); + } + await render(precompileTemplate(`{{myAssertion (macroGetOwnConfig "mode") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroGetOwnConfig "mode") }}`); }); test('macroGetOwnConfig emits null', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.strictEqual(value, null); + } + await render(precompileTemplate(`{{myAssertion (macroGetOwnConfig "inner" "description") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroGetOwnConfig "inner" "description") }}`); }); test('macroGetOwnConfig emits complex pojo', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.deepEqual(value, { mode: 'amazing', count: 42, @@ -72,23 +80,29 @@ module('Integration | Macro | getConfig', function(hooks) { description: null } }); + } + await render(precompileTemplate(`{{myAssertion (macroGetOwnConfig) }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroGetOwnConfig) }}`); }); test('macroGetOwnConfig emits undefined for missing key', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.strictEqual(value, undefined); + } + await render(precompileTemplate(`{{myAssertion (macroGetOwnConfig "inner" "notAThing") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroGetOwnConfig "inner" "notAThing") }}`); }); test('macroGetConfig emits undefined for missing config', async function(assert) { assert.expect(1); - this.owner.register('helper:my-assertion', helper(function([value]) { + function myAssertion(value) { assert.strictEqual(value, undefined); + } + await render(precompileTemplate(`{{myAssertion (macroGetConfig "ember-cli") }}`, { + scope: () => ({ myAssertion }) })); - await render(hbs`{{my-assertion (macroGetConfig "ember-cli") }}`); }); }); diff --git a/tests/fixtures/macro-test/tests/integration/components/macro-if-test.js b/tests/fixtures/macro-test/tests/integration/components/macro-if-test.js index 8870cc8ce..90f85157a 100644 --- a/tests/fixtures/macro-test/tests/integration/components/macro-if-test.js +++ b/tests/fixtures/macro-test/tests/integration/components/macro-if-test.js @@ -2,7 +2,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, click } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -import { helper } from '@ember/component/helper'; +import { precompileTemplate } from "@ember/template-compilation"; module('Integration | Macro | macroCondition', function (hooks) { setupRenderingTest(hooks); @@ -24,13 +24,12 @@ module('Integration | Macro | macroCondition', function (hooks) { test('macroCondition in subexpression position when true', async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.strictEqual(value, 'red'); - }) - ); - await render(hbs`{{my-assertion (if (macroCondition true) 'red' 'blue') }}`); + function myAssertion(value) { + assert.strictEqual(value, 'red'); + } + await render(precompileTemplate(`{{myAssertion (if (macroCondition true) 'red' 'blue') }}`, { + scope: () => ({ myAssertion }) + })); }); test('macroCondition inside string', async function (assert) { @@ -41,24 +40,23 @@ module('Integration | Macro | macroCondition', function (hooks) { test('macroCondition in subexpression position when false', async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.strictEqual(value, 'blue'); - }) - ); - await render(hbs`{{my-assertion (if (macroCondition false) 'red' 'blue') }}`); + function myAssertion (value) { + assert.strictEqual(value, 'blue'); + } + await render(precompileTemplate(`{{myAssertion (if (macroCondition false) 'red' 'blue') }}`, { + scope: () => ({ myAssertion }) + })); }); test('macroCondition in subexpression position when false with no alternate', async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.strictEqual(value, undefined); - }) - ); - await render(hbs`{{my-assertion (if (macroCondition false) 'red') }}`); + function myAssertion(value) { + assert.strictEqual(value, undefined); + } + + await render(precompileTemplate(`{{myAssertion (if (macroCondition false) 'red') }}`, { + scope: () => ({ myAssertion }) + })); }); test('macroMaybeAttrs when true', async function (assert) { @@ -96,39 +94,36 @@ module('Integration | Macro | macroCondition', function (hooks) { test('macroCondition composes with other macros, true case', async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { + function myAssertion(value) { assert.strictEqual(value, 'red'); - }) - ); + } await render( - hbs`{{my-assertion (if (macroCondition (macroDependencySatisfies 'ember-source' '*')) 'red' 'blue') }}` + precompileTemplate(`{{myAssertion (if (macroCondition (macroDependencySatisfies 'ember-source' '*')) 'red' 'blue') }}`, { + scope: () => ({ myAssertion }) + }) ); }); test('macroCondition composes with other macros, false case', async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.strictEqual(value, 'blue'); - }) - ); + function myAssertion(value) { + assert.strictEqual(value, 'blue'); + } await render( - hbs`{{my-assertion (if (macroCondition (macroDependencySatisfies 'ember-source' '10.x')) 'red' 'blue') }}` + precompileTemplate(`{{myAssertion (if (macroCondition (macroDependencySatisfies 'ember-source' '10.x')) 'red' 'blue') }}`, { + scope: () => ({ myAssertion }) + }) ); }); test('macroCondition composes with self', async function (assert) { assert.expect(1); - this.owner.register( - 'helper:my-assertion', - helper(function ([value]) { - assert.strictEqual(value, 'red'); - }) - ); - await render(hbs`{{my-assertion (if (macroCondition true) (if (macroCondition false) 'green' 'red') 'blue') }}`); + function myAssertion(value) { + assert.strictEqual(value, 'red'); + } + await render(precompileTemplate(`{{myAssertion (if (macroCondition true) (if (macroCondition false) 'green' 'red') 'blue') }}`, { + scope: () => ({ myAssertion }) + })); }); diff --git a/tests/scenarios/app-config-environment-test.ts b/tests/scenarios/app-config-environment-test.ts index 935264d4b..73a7a733c 100644 --- a/tests/scenarios/app-config-environment-test.ts +++ b/tests/scenarios/app-config-environment-test.ts @@ -27,7 +27,7 @@ appScenarios 'environment.js': `module.exports = function(environment) { // DEFAULT config/environment.js let ENV = { - modulePrefix: 'my-app', + modulePrefix: 'app-template', environment, rootURL: '/', locationType: 'history', @@ -80,7 +80,7 @@ appScenarios // later. This difference in environment is important because it's the // only way for us to test ember-cli-build.js' `tests: true` behavior, // and is equivalent to visiting the app's /tests page - let devBuildResult = await app.execute(`pnpm build --environment=development`); + let devBuildResult = await app.execute(`pnpm build`); assert.equal(devBuildResult.exitCode, 0, devBuildResult.output); let testRunResult = await app.execute(`pnpm test:ember --path dist`); assert.equal(testRunResult.exitCode, 0, testRunResult.output); diff --git a/tests/scenarios/compat-addon-import-test.ts b/tests/scenarios/compat-addon-import-test.ts index c696d899c..6ee236721 100644 --- a/tests/scenarios/compat-addon-import-test.ts +++ b/tests/scenarios/compat-addon-import-test.ts @@ -42,7 +42,7 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE1_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { STAGE1_ONLY: 'true', EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-addon-styles-test.ts b/tests/scenarios/compat-addon-styles-test.ts index 9f8b86594..55119ccf2 100644 --- a/tests/scenarios/compat-addon-styles-test.ts +++ b/tests/scenarios/compat-addon-styles-test.ts @@ -97,7 +97,7 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE1_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { STAGE1_ONLY: 'true', EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-app-dot-import-test.ts b/tests/scenarios/compat-app-dot-import-test.ts index 853e9b69b..1c7baedde 100644 --- a/tests/scenarios/compat-app-dot-import-test.ts +++ b/tests/scenarios/compat-app-dot-import-test.ts @@ -41,7 +41,7 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-app-embroider-concat-stats-test.ts b/tests/scenarios/compat-app-embroider-concat-stats-test.ts index 778b17d14..51790fa3f 100644 --- a/tests/scenarios/compat-app-embroider-concat-stats-test.ts +++ b/tests/scenarios/compat-app-embroider-concat-stats-test.ts @@ -15,7 +15,7 @@ appScenarios test('building with EMBROIDER_CONCAT_STATS works', async function (assert) { app = await scenario.prepare(); let result = await app.execute('ember build', { - env: { STAGE2_ONLY: 'true', EMBROIDER_CONCAT_STATS: 'true' }, + env: { EMBROIDER_PREBUILD: 'true', EMBROIDER_CONCAT_STATS: 'true' }, }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-app-html-attributes-test.ts b/tests/scenarios/compat-app-html-attributes-test.ts index 0ff13156c..438c2f9c3 100644 --- a/tests/scenarios/compat-app-html-attributes-test.ts +++ b/tests/scenarios/compat-app-html-attributes-test.ts @@ -2,6 +2,8 @@ import type { ExpectFile } from '@embroider/test-support/file-assertions/qunit'; import { expectFilesAt } from '@embroider/test-support/file-assertions/qunit'; import { appScenarios } from './scenarios'; import QUnit from 'qunit'; +import { join } from 'path'; + const { module: Qmodule, test } = QUnit; appScenarios @@ -47,21 +49,32 @@ appScenarios Qmodule(scenario.name, function (hooks) { hooks.beforeEach(async assert => { let app = await scenario.prepare(); - let result = await app.execute('ember build'); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); - expectFile = expectFilesAt(app.dir, { qunit: assert }); + expectFile = expectFilesAt(join(app.dir, 'node_modules', '.embroider', 'rewritten-app'), { qunit: assert }); }); test('custom HTML attributes are passed through', () => { - expectFile('./dist/index.html').matches(''); - expectFile('./dist/index.html').matches('" data-original-filename="app-template.css">'); - expectFile('./dist/index.html').matches('" data-original-filename="vendor.js">'); - expectFile('./dist/index.html').matches('" data-original-filename="app-template.js">'); + expectFile('./index.html').matches('', + 'does not have data-original-filename vendor.css' + ); + expectFile('./index.html').matches( + '" data-original-filename="app-template.css">', + 'has data-original-filename app-template.css' + ); + expectFile('./index.html').matches( + '" data-original-filename="vendor.js">', + 'has data-original-filename vendor.js' + ); + expectFile('./index.html').matches( + '" data-original-filename="app-template.js" type="module">', + 'has data-original-filename app-template.js' + ); }); }); }); diff --git a/tests/scenarios/compat-dummy-app-test.ts b/tests/scenarios/compat-dummy-app-test.ts index 537bcab44..21a1202a2 100644 --- a/tests/scenarios/compat-dummy-app-test.ts +++ b/tests/scenarios/compat-dummy-app-test.ts @@ -41,7 +41,7 @@ dummyAppScenarios hooks.before(async () => { app = await scenario.prepare(); - builder = await Rebuilder.create(app.dir, { STAGE2_ONLY: 'true' }); + builder = await Rebuilder.create(app.dir, { EMBROIDER_PREBUILD: 'true' }); }); hooks.after(async () => { await builder?.shutdown(); diff --git a/tests/scenarios/compat-exclude-dot-files-test.ts b/tests/scenarios/compat-exclude-dot-files-test.ts index 49a48147c..afa37a03f 100644 --- a/tests/scenarios/compat-exclude-dot-files-test.ts +++ b/tests/scenarios/compat-exclude-dot-files-test.ts @@ -5,11 +5,30 @@ import type { PreparedApp } from 'scenario-tester'; import { appScenarios, baseAddon } from './scenarios'; import QUnit from 'qunit'; import { merge } from 'lodash'; +import { setupAuditTest } from '@embroider/test-support/audit-assertions'; const { module: Qmodule, test } = QUnit; appScenarios .map('compat-exclude-dot-files', app => { merge(app.files, { + 'ember-cli-build.js': `'use strict'; + + const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + const { maybeEmbroider } = require('@embroider/test-setup'); + + module.exports = function (defaults) { + let app = new EmberApp(defaults, {}); + + return maybeEmbroider(app, { + staticAddonTrees: false, + skipBabel: [ + { + package: 'qunit', + }, + ], + }); + }; + `, app: { '.foobar.js': `// foobar content`, '.barbaz.js': `// barbaz content`, @@ -37,24 +56,35 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); + let expectAudit = setupAuditTest(hooks, () => ({ app: app.dir })); + hooks.beforeEach(assert => { expectFile = expectRewrittenFilesAt(app.dir, { qunit: assert }); }); - test('dot files are not included as app modules', function () { + test('dot files are not included as app modules', function (assert) { // dot files should exist on disk expectFile('./.foobar.js').exists(); expectFile('./.barbaz.js').exists(); expectFile('./bizbiz.js').exists(); - // dot files should not be included as modules - expectFile('./assets/app-template.js').doesNotMatch('app-template/.foobar'); - expectFile('./assets/app-template.js').doesNotMatch('app-template/.barbaz'); - expectFile('./assets/app-template.js').matches('app-template/bizbiz'); + // but not be picked up in the entrypoint + expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/app-template.js') + .toModule() + .withContents(content => { + assert.notOk(/app-template\/\.foobar/.test(content), '.foobar is not in the entrypoint'); + assert.notOk(/app-template\/\.barbaz/.test(content), '.barbaz is not in the entrypoint'); + assert.ok(/app-template\/bizbiz/.test(content), 'bizbiz is in the entrypoint'); + + // we are relying on the assertinos here so we always return true + return true; + }); }); test('dot files are not included as addon implicit-modules', function () { diff --git a/tests/scenarios/compat-namespaced-app-test.ts b/tests/scenarios/compat-namespaced-app-test.ts index 45b0ab298..27af7183c 100644 --- a/tests/scenarios/compat-namespaced-app-test.ts +++ b/tests/scenarios/compat-namespaced-app-test.ts @@ -1,11 +1,9 @@ import type { PreparedApp } from 'scenario-tester'; import { appScenarios, baseAddon, renameApp } from './scenarios'; -import { readFileSync } from 'fs'; -import { join } from 'path'; import QUnit from 'qunit'; const { module: Qmodule, test } = QUnit; import type { ExpectFile } from '@embroider/test-support/file-assertions/qunit'; -import { expectFilesAt } from '@embroider/test-support/file-assertions/qunit'; +import { expectRewrittenFilesAt } from '@embroider/test-support/file-assertions/qunit'; import { throwOnWarnings } from '@embroider/core'; import { setupAuditTest } from '@embroider/test-support/audit-assertions'; @@ -33,30 +31,32 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); let expectAudit = setupAuditTest(hooks, () => ({ app: app.dir })); hooks.beforeEach(assert => { - expectFile = expectFilesAt(readFileSync(join(app.dir, 'dist/.stage2-output'), 'utf8'), { qunit: assert }); - }); - test(`app js location`, function () { - expectFile('assets/@ef4/namespaced-app.js').exists(); + expectFile = expectRewrittenFilesAt(app.dir, { qunit: assert }); }); test(`imports within app js`, function () { expectAudit - .module('assets/@ef4/namespaced-app.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/@ef4/namespaced-app.js') + .toModule() .resolves('./-embroider-implicit-modules.js') .toModule() .resolves('my-addon/my-implicit-module.js') .to('./node_modules/my-addon/my-implicit-module.js'); - expectAudit.module('assets/@ef4/namespaced-app.js').codeContains(` - d('@ef4/namespaced-app/app', function(){ return i('@ef4/namespaced-app/app.js');}); - `); + expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/@ef4/namespaced-app.js') + .toModule().codeContains(`d("@ef4/namespaced-app/templates/application", function () { + return i("@ef4/namespaced-app/templates/application.hbs"); + });`); }); test(`app css location`, function () { diff --git a/tests/scenarios/compat-plugin-hints-test.ts b/tests/scenarios/compat-plugin-hints-test.ts index 05515f53c..503a533de 100644 --- a/tests/scenarios/compat-plugin-hints-test.ts +++ b/tests/scenarios/compat-plugin-hints-test.ts @@ -56,7 +56,7 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-preprocessors-test.ts b/tests/scenarios/compat-preprocessors-test.ts index 0442c0ea7..f8bd78979 100644 --- a/tests/scenarios/compat-preprocessors-test.ts +++ b/tests/scenarios/compat-preprocessors-test.ts @@ -94,7 +94,7 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-renaming-test.ts b/tests/scenarios/compat-renaming-test.ts index f5e93c128..1d7b48a5f 100644 --- a/tests/scenarios/compat-renaming-test.ts +++ b/tests/scenarios/compat-renaming-test.ts @@ -15,6 +15,35 @@ appScenarios .map('compat-renaming', app => { app.addDependency('a-library', { files: { 'index.js': '' } }); merge(app.files, { + 'ember-cli-build.js': `'use strict'; + + const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + const { maybeEmbroider } = require('@embroider/test-setup'); + + module.exports = function (defaults) { + let app = new EmberApp(defaults, {}); + + return maybeEmbroider(app, { + staticAddonTrees: false, + staticComponents: false, + skipBabel: [ + { + package: 'qunit', + }, + ], + // TODO remove this when we virtualise the entrypoint + amdCompatibility: { + es: [ + ["somebody-elses-package", ["default"]], + ["somebody-elses-package/deeper", ["default"]], + ["somebody-elses-package/environment", ["default"]], + ["somebody-elses-package/utils", ["default"]], + ["somebody-elses-package/utils/index", ["default"]], + ] + } + }); + }; + `, app: { components: { 'import-lodash.js': ` @@ -226,7 +255,9 @@ appScenarios }); test('renamed modules keep their classic runtime name when used as implicit-modules', function () { expectAudit - .module('assets/app-template.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/app-template.js') + .toModule() .resolves('./-embroider-implicit-modules.js') .toModule() .withContents(contents => { @@ -241,12 +272,12 @@ appScenarios expectAudit .module('./components/import-somebody-elses-original.js') .resolves('somebody-elses-package') - .to(resolve('/@embroider/ext-cjs/somebody-elses-package').split(sep).join('/')); + .to(resolve('/@embroider/ext-es/somebody-elses-package?exports=default').split(sep).join('/')); expectAudit .module('./components/import-somebody-elses-original.js') .resolves('somebody-elses-package/deeper') - .to(resolve('/@embroider/ext-cjs/somebody-elses-package/deeper').split(sep).join('/')); + .to(resolve('/@embroider/ext-es/somebody-elses-package/deeper?exports=default').split(sep).join('/')); }); test('single file package gets captured and renamed', function () { expectAudit diff --git a/tests/scenarios/compat-route-split-test.ts b/tests/scenarios/compat-route-split-test.ts index 2b7f30ea0..8932f335f 100644 --- a/tests/scenarios/compat-route-split-test.ts +++ b/tests/scenarios/compat-route-split-test.ts @@ -88,7 +88,7 @@ splitScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); @@ -260,7 +260,7 @@ splitScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); @@ -432,7 +432,7 @@ splitScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-stage2-test.ts b/tests/scenarios/compat-stage2-test.ts index 12d5f9cf5..a1496ab9e 100644 --- a/tests/scenarios/compat-stage2-test.ts +++ b/tests/scenarios/compat-stage2-test.ts @@ -19,6 +19,12 @@ let stage2Scenarios = appScenarios.map('compat-stage2-build', app => { stage2Scenarios .map('in-repo-addons-of-addons', app => { + app.mergeFiles({ + app: { + 'lib.js': 'import "dep-a/check-resolution.js"', + }, + }); + let depA = addAddon(app, 'dep-a'); let depB = addAddon(app, 'dep-b'); let depC = addAddon(app, 'dep-c'); @@ -96,7 +102,7 @@ stage2Scenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); @@ -125,7 +131,10 @@ stage2Scenarios // check that the app trees with in repo addon are combined correctly expectAudit - .module('./assets/my-app.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() + //TODO investigate removing this @embroider-dep .resolves('my-app/service/in-repo.js') .to('./node_modules/dep-b/lib/in-repo-c/_app_/service/in-repo.js'); }); @@ -133,7 +142,10 @@ stage2Scenarios test('incorporates in-repo-addons of in-repo-addons correctly', function () { // secondary in-repo-addon was correctly detected and activated expectAudit - .module('./assets/my-app.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() + //TODO investigate removing this @embroider-dep .resolves('my-app/services/secondary.js') .to('./lib/secondary-in-repo-addon/_app_/services/secondary.js'); @@ -189,14 +201,17 @@ stage2Scenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); let expectAudit = setupAuditTest(hooks, () => ({ app: app.dir, 'reuse-build': true })); test('verifies that the correct lexigraphically sorted addons win', function () { - let expectModule = expectAudit.module('./assets/my-app.js'); + let expectModule = expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule(); expectModule.resolves('my-app/service/in-repo.js').to('./lib/in-repo-b/_app_/service/in-repo.js'); expectModule.resolves('my-app/service/addon.js').to('./node_modules/dep-b/_app_/service/addon.js'); expectModule.resolves('my-app/service/dev-addon.js').to('./node_modules/dev-c/_app_/service/dev-addon.js'); @@ -204,28 +219,36 @@ stage2Scenarios test('addons declared as dependencies should win over devDependencies', function () { expectAudit - .module('./assets/my-app.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() .resolves('my-app/service/dep-wins-over-dev.js') .to('./node_modules/dep-b/_app_/service/dep-wins-over-dev.js'); }); test('in repo addons declared win over dependencies', function () { expectAudit - .module('./assets/my-app.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() .resolves('my-app/service/in-repo-over-deps.js') .to('./lib/in-repo-a/_app_/service/in-repo-over-deps.js'); }); test('ordering with before specified', function () { expectAudit - .module('./assets/my-app.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() .resolves('my-app/service/test-before.js') .to('./node_modules/dev-d/_app_/service/test-before.js'); }); test('ordering with after specified', function () { expectAudit - .module('./assets/my-app.js') + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() .resolves('my-app/service/test-after.js') .to('./node_modules/dev-b/_app_/service/test-after.js'); }); @@ -238,8 +261,10 @@ stage2Scenarios app.linkDependency('@embroider/sample-transforms', { baseDir: __dirname }); let options: Options = { - staticComponents: true, - staticHelpers: true, + staticAddonTrees: false, + amdCompatibility: { + es: [['not-a-resolvable-package', ['default']]], + }, skipBabel: [ { package: 'babel-filter-test1', @@ -303,7 +328,7 @@ stage2Scenarios 'ember-cli-build.js': ` 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); - const { maybeEmbroider } = require('@embroider/test-setup'); + const { prebuild } = require('@embroider/compat'); let opts = ${JSON.stringify(options)}; module.exports = function (defaults) { let app = new EmberApp(defaults, { @@ -311,7 +336,8 @@ stage2Scenarios plugins: [require.resolve('ember-auto-import/babel-plugin')] } }); - return maybeEmbroider(app, { + + return prebuild(app, { skipBabel: [ { package: 'qunit', @@ -474,7 +500,7 @@ stage2Scenarios hooks.before(async () => { app = await scenario.prepare(); - builder = await Rebuilder.create(app.dir, { STAGE2_ONLY: 'true' }); + builder = await Rebuilder.create(app.dir, { EMBROIDER_PREBUILD: 'true' }); }); hooks.after(async () => { @@ -681,19 +707,42 @@ stage2Scenarios }); test('non-static other paths are included in the entrypoint', function () { - expectFile('assets/my-app.js').matches(/i\("my-app\/non-static-dir\/another-library\.js"\)/); + expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule().codeContains(`d("my-app/non-static-dir/another-library", function () { + return i("my-app/non-static-dir/another-library.js"); + });`); }); test('static other paths are not included in the entrypoint', function () { - expectFile('assets/my-app.js').doesNotMatch(/i\("my-app\/static-dir\/my-library\.js"\)/); + expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() + .withContents(content => { + return !/my-app\/static-dir\/my-library\.js"/.test(content); + }); }); test('top-level static other paths are not included in the entrypoint', function () { - expectFile('assets/my-app.js').doesNotMatch(/i\("my-app\/top-level-static\.js"\)/); + expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() + .withContents(content => { + return !content.includes('my-app/top-level-static.js'); + }); }); test('staticAppPaths do not match partial path segments', function () { - expectFile('assets/my-app.js').matches(/i\("my-app\/static-dir-not-really\/something\.js"\)/); + expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule() + .withContents(content => { + return content.includes('my-app/static-dir-not-really/something.js'); + }); }); test('invokes rule on appTemplates produces synthetic import', function () { @@ -750,7 +799,7 @@ dummyAppScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/compat-template-colocation-test.ts b/tests/scenarios/compat-template-colocation-test.ts index c845435b8..6055b4815 100644 --- a/tests/scenarios/compat-template-colocation-test.ts +++ b/tests/scenarios/compat-template-colocation-test.ts @@ -5,6 +5,7 @@ import { join } from 'path'; import { Transpiler } from '@embroider/test-support'; import type { ExpectFile } from '@embroider/test-support/file-assertions/qunit'; import { expectFilesAt, expectRewrittenFilesAt } from '@embroider/test-support/file-assertions/qunit'; +import { setupAuditTest } from '@embroider/test-support/audit-assertions'; import { throwOnWarnings } from '@embroider/core'; import merge from 'lodash/merge'; import QUnit from 'qunit'; @@ -68,11 +69,13 @@ scenarios 'ember-cli-build.js': ` 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); - const { maybeEmbroider } = require('@embroider/test-setup'); + const { prebuild } = require('@embroider/compat'); + module.exports = function (defaults) { let app = new EmberApp(defaults, {}); - return maybeEmbroider(app, { + return prebuild(app, { staticComponents: false, + staticAddonTrees: false, }); }; `, @@ -88,10 +91,12 @@ scenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); + let expectAudit = setupAuditTest(hooks, () => ({ app: app.dir })); + hooks.beforeEach(assert => { expectFile = expectRewrittenFilesAt(app.dir, { qunit: assert }); build = new Transpiler(app.dir); @@ -126,13 +131,12 @@ scenarios }); test(`app's colocated components are implicitly included correctly`, function () { - let assertFile = expectFile('assets/my-app.js'); - assertFile.matches( - /d\(["']my-app\/components\/has-colocated-template["'], function\(\)\s*\{\s*return i\(["']my-app\/components\/has-colocated-template\.js['"]\);\s*\}/ - ); - assertFile.matches( - /d\(["']my-app\/components\/template-only-component["'], function\(\)\s*\{\s*return i\(["']my-app\/components\/template-only-component\.js['"]\);\s*\}/ - ); + expectAudit + .module('./node_modules/.embroider/rewritten-app/index.html') + .resolves('./assets/my-app.js') + .toModule().codeContains(`d("my-app/components/has-colocated-template", function () { + return i("my-app/components/has-colocated-template.js"); + });`); }); test(`addon's colocated template is associated with JS`, function () { @@ -167,22 +171,7 @@ scenarios }); scenarios - .map('staticComponents-true', app => { - merge(app.files, { - 'ember-cli-build.js': ` - 'use strict'; - const EmberApp = require('ember-cli/lib/broccoli/ember-app'); - const { maybeEmbroider } = require('@embroider/test-setup'); - module.exports = function (defaults) { - let app = new EmberApp(defaults, {}); - return maybeEmbroider(app, { - staticComponents: true, - staticAddonTrees: true, - }); - }; - `, - }); - }) + .map('staticComponents-true', () => {}) .forEachScenario(scenario => { Qmodule(scenario.name, function (hooks) { throwOnWarnings(hooks); @@ -192,7 +181,7 @@ scenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); @@ -224,10 +213,10 @@ appScenarios 'ember-cli-build.js': ` 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); - const { maybeEmbroider } = require('@embroider/test-setup'); + const { prebuild } = require('@embroider/compat'); module.exports = function (defaults) { let app = new EmberApp(defaults, {}); - return maybeEmbroider(app, { + return prebuild(app, { staticComponents: false, }); }; @@ -284,7 +273,7 @@ appScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('ember build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/engines-test.ts b/tests/scenarios/engines-test.ts index 2ab330987..95f01612d 100644 --- a/tests/scenarios/engines-test.ts +++ b/tests/scenarios/engines-test.ts @@ -93,7 +93,7 @@ engineScenarios hooks.before(async assert => { app = await scenario.prepare(); - let result = await app.execute('pnpm run build', { env: { STAGE2_ONLY: 'true' } }); + let result = await app.execute('pnpm run build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); }); diff --git a/tests/scenarios/fastboot-app-test.ts b/tests/scenarios/fastboot-app-test.ts index 29ae9f19b..28d168c20 100644 --- a/tests/scenarios/fastboot-app-test.ts +++ b/tests/scenarios/fastboot-app-test.ts @@ -82,6 +82,8 @@ appScenarios merge(project.files, loadFromFixtureData('fastboot-app')); }) + // TODO remove once https://github.com/ember-fastboot/ember-cli-fastboot/issues/925 is fixed + .skip('canary-fastboot-app-test') .forEachScenario(scenario => { Qmodule(scenario.name, function (hooks) { let app: PreparedApp; diff --git a/tests/scenarios/macro-test.ts b/tests/scenarios/macro-test.ts index a99720f14..685d8c864 100644 --- a/tests/scenarios/macro-test.ts +++ b/tests/scenarios/macro-test.ts @@ -35,6 +35,7 @@ function scenarioSetup(project: Project) { macroSampleAddon.linkDependency('@embroider/macros', { baseDir: __dirname }); project.linkDevDependency('@embroider/macros', { baseDir: __dirname }); project.addDevDependency('version-changer', '4.0.0'); + project.linkDevDependency('webpack', { baseDir: __dirname }); project.addDevDependency(macroSampleAddon); project.addDevDependency(funkySampleAddon); @@ -87,18 +88,31 @@ appScenarios }); test(`pnpm test`, async function (assert) { - let result = await app.execute(`cross-env THROW_UNLESS_PARALLELIZABLE=1 pnpm test`); + let result = await app.execute(`pnpm test`, { + env: { + THROW_UNLESS_PARALLELIZABLE: '1', + }, + }); assert.equal(result.exitCode, 0, result.output); }); test(`pnpm build production`, async function (assert) { - let result = await app.execute(`cross-env THROW_UNLESS_PARALLELIZABLE=1 pnpm build:production`); + let result = await app.execute(`pnpm build`, { + env: { + THROW_UNLESS_PARALLELIZABLE: '1', + }, + }); assert.equal(result.exitCode, 0, result.output); }); - test(`CLASSIC=true pnpm test`, async function (assert) { + test(`EMBROIDER_TEST_SETUP_FORCE=classic pnpm test`, async function (assert) { // throw_unless_parallelizable is enabled to ensure that @embroider/macros is parallelizable - let result = await app.execute(`cross-env THROW_UNLESS_PARALLELIZABLE=1 CLASSIC=true pnpm test`); + let result = await app.execute(`pnpm ember test`, { + env: { + THROW_UNLESS_PARALLELIZABLE: '1', + EMBROIDER_TEST_SETUP_FORCE: 'classic', + }, + }); assert.equal(result.exitCode, 0, result.output); }); }); @@ -128,16 +142,18 @@ appScenarios assert.equal(lodashThreeRun.exitCode, 0, lodashThreeRun.output); }); - test(`CLASSIC=true @embroider/macros babel caching plugin works`, async function (assert) { + test(`EMBROIDER_TEST_SETUP_FORCE=classic @embroider/macros babel caching plugin works`, async function (assert) { updateVersionChanger(app, '4.0.1'); - let lodashFourRun = await app.execute(`cross-env CLASSIC=true pnpm test`); + let lodashFourRun = await app.execute(`cross-env EMBROIDER_TEST_SETUP_FORCE=classic pnpm ember test`); assert.equal(lodashFourRun.exitCode, 0, lodashFourRun.output); // simulate a different version being installed updateVersionChanger(app, '3.0.0'); - let lodashThreeRun = await app.execute(`cross-env EXPECTED_VERSION=three CLASSIC=true pnpm test`); + let lodashThreeRun = await app.execute( + `cross-env EXPECTED_VERSION=three EMBROIDER_TEST_SETUP_FORCE=classic pnpm ember test` + ); assert.equal(lodashThreeRun.exitCode, 0, lodashThreeRun.output); }); }); @@ -211,7 +227,7 @@ dummyAppScenarios }); test(`pnpm test EMBROIDER_TEST_SETUP_FORCE=classic`, async function (assert) { - let result = await addon.execute('cross-env EMBROIDER_TEST_SETUP_FORCE=classic pnpm test'); + let result = await addon.execute('cross-env EMBROIDER_TEST_SETUP_FORCE=classic pnpm ember test'); assert.equal(result.exitCode, 0, result.output); }); }); diff --git a/tests/scenarios/package.json b/tests/scenarios/package.json index 305f43b86..0147de66b 100644 --- a/tests/scenarios/package.json +++ b/tests/scenarios/package.json @@ -67,7 +67,6 @@ "ember-cli-beta": "npm:ember-cli@beta", "ember-cli-fastboot": "^4.1.1", "ember-cli-latest": "npm:ember-cli@latest", - "ember-composable-helpers": "^4.4.1", "ember-data-4.12": "npm:ember-data@~4.12.0", "ember-data-beta": "npm:ember-data@beta", "ember-data-latest": "npm:ember-data@5.3.0", @@ -83,6 +82,7 @@ "ember-truth-helpers": "^3.0.0", "execa": "^5.1.1", "tslib": "^2.6.0", - "typescript": "^5.1.6" + "typescript": "^5.1.6", + "webpack": "^5.90.3" } } diff --git a/tests/scenarios/preprocess-test.ts b/tests/scenarios/preprocess-test.ts index 213ca320e..c7cfb7c1b 100644 --- a/tests/scenarios/preprocess-test.ts +++ b/tests/scenarios/preprocess-test.ts @@ -2,6 +2,8 @@ import { appScenarios, baseAddon } from './scenarios'; import type { PreparedApp } from 'scenario-tester'; import QUnit from 'qunit'; import merge from 'lodash/merge'; +import { readFileSync } from 'fs-extra'; +import { join } from 'path'; import { loadFromFixtureData } from './helpers'; import { expectFilesAt } from '@embroider/test-support/file-assertions/qunit'; const { module: Qmodule, test } = QUnit; @@ -28,10 +30,10 @@ appScenarios Qmodule(scenario.name, function () { test(`pnpm test`, async function (assert) { let app: PreparedApp = await scenario.prepare(); - let result = await app.execute('node ./node_modules/ember-cli/bin/ember b'); + let result = await app.execute('ember build', { env: { EMBROIDER_PREBUILD: 'true' } }); assert.equal(result.exitCode, 0, result.output); - let expectFile = expectFilesAt(app.dir, { qunit: assert }); - expectFile('./dist/assets/app-template.css').matches('body { background: red; }'); + let expectFile = expectFilesAt(readFileSync(join(app.dir, 'dist/.stage2-output'), 'utf8'), { qunit: assert }); + expectFile('./assets/app-template.css').matches('body { background: red; }'); }); }); }); diff --git a/tests/scenarios/router-test.ts b/tests/scenarios/router-test.ts index 519742f06..25437621c 100644 --- a/tests/scenarios/router-test.ts +++ b/tests/scenarios/router-test.ts @@ -18,7 +18,7 @@ let routerApp = tsAppScenarios.map('router', project => { const EmberApp = require('ember-cli/lib/broccoli/ember-app'); const { maybeEmbroider } = require('@embroider/test-setup'); - + module.exports = function (defaults) { let app = new EmberApp(defaults, { 'ember-cli-babel': { @@ -30,7 +30,7 @@ let routerApp = tsAppScenarios.map('router', project => { } } }); - + return maybeEmbroider(app, { staticAddonTestSupportTrees: true, staticAddonTrees: true, @@ -219,7 +219,7 @@ let routerApp = tsAppScenarios.map('router', project => { ); }); }); - + `, }, }, @@ -248,7 +248,7 @@ routerApp.forEachScenario(scenario => { }); test(`CLASSIC pnpm test:ember`, async function (assert) { - let result = await app.execute('pnpm test:ember', { + let result = await app.execute('pnpm ember test', { env: { EMBROIDER_TEST_SETUP_FORCE: 'classic', }, diff --git a/tests/scenarios/stage1-test.ts b/tests/scenarios/stage1-test.ts index 0f7f53564..a8ed7f20e 100644 --- a/tests/scenarios/stage1-test.ts +++ b/tests/scenarios/stage1-test.ts @@ -13,6 +13,33 @@ appScenarios .map('stage-1-max-compat', project => { let addon = baseAddon(); + merge(project.files, { + 'ember-cli-build.js': ` + 'use strict'; + + const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + const { maybeEmbroider } = require('@embroider/test-setup'); + + module.exports = function (defaults) { + let app = new EmberApp(defaults, { + }); + + return maybeEmbroider(app, { + staticAddonTestSupportTrees: false, + staticAddonTrees: false, + staticComponents: false, + staticHelpers: false, + staticModifiers: false, + skipBabel: [ + { + package: 'qunit', + }, + ], + }); + }; + `, + }); + merge(addon.files, loadFromFixtureData('hello-world-addon')); addon.pkg.name = 'my-addon'; @@ -32,7 +59,9 @@ appScenarios hooks.before(async assert => { process.env.THROW_UNLESS_PARALLELIZABLE = '1'; // see https://github.com/embroider-build/embroider/pull/924 app = await scenario.prepare(); - let result = await app.execute('cross-env STAGE1_ONLY=true node ./node_modules/ember-cli/bin/ember b'); + let result = await app.execute( + 'cross-env STAGE1_ONLY=true EMBROIDER_PREBUILD=true node ./node_modules/ember-cli/bin/ember b' + ); assert.equal(result.exitCode, 0, result.output); }); @@ -172,7 +201,9 @@ appScenarios hooks.before(async () => { app = await scenario.prepare(); - await app.execute('cross-env STAGE1_ONLY=true node ./node_modules/ember-cli/bin/ember b'); + await app.execute( + 'cross-env STAGE1_ONLY=true EMBROIDER_PREBUILD=true node ./node_modules/ember-cli/bin/ember b' + ); }); hooks.beforeEach(assert => { @@ -418,7 +449,9 @@ appScenarios hooks.before(async () => { app = await scenario.prepare(); - await app.execute('cross-env STAGE1_ONLY=true node ./node_modules/ember-cli/bin/ember b'); + await app.execute( + 'cross-env STAGE1_ONLY=true EMBROIDER_PREBUILD=true node ./node_modules/ember-cli/bin/ember b' + ); }); hooks.beforeEach(assert => { diff --git a/tests/scenarios/static-app-test.ts b/tests/scenarios/static-app-test.ts index 7425b977e..435869b61 100644 --- a/tests/scenarios/static-app-test.ts +++ b/tests/scenarios/static-app-test.ts @@ -1,4 +1,4 @@ -import { appScenarios } from './scenarios'; +import { appScenarios, baseAddon } from './scenarios'; import type { PreparedApp } from 'scenario-tester'; import { Project } from 'scenario-tester'; import QUnit from 'qunit'; @@ -11,9 +11,70 @@ appScenarios project.linkDevDependency('bootstrap', { baseDir: __dirname }); project.addDevDependency(emberBootstrap()); project.linkDevDependency('@embroider/macros', { baseDir: __dirname }); - project.linkDevDependency('ember-composable-helpers', { baseDir: __dirname }); project.linkDevDependency('ember-modifier', { baseDir: __dirname }); + let myHelpersAddon = baseAddon(); + myHelpersAddon.pkg.name = 'my-helpers-addon'; + myHelpersAddon.mergeFiles({ + app: { + helpers: { + 'reverse.js': `export { default } from 'my-helpers-addon/helpers/reverse'`, + 'intersect.js': `export { default } from 'my-helpers-addon/helpers/intersect'`, + }, + }, + addon: { + helpers: { + 'reverse.js': ` + import { helper } from '@ember/component/helper'; + import { A as emberArray, isArray as isEmberArray } from '@ember/array'; + + export function reverse([array]) { + if (!isEmberArray(array)) { + return [array]; + } + + return emberArray(array).slice(0).reverse(); + } + + export default helper(reverse); + `, + 'intersect.js': ` + import { helper } from '@ember/component/helper'; + import { isArray as isEmberArray } from '@ember/array'; + + export function intersect([...arrays]) { + let confirmedArrays = arrays.map(array => { + return isEmberArray(array) ? array : []; + }); + let results = confirmedArrays.pop().filter(candidate => { + for (let i = 0; i < confirmedArrays.length; i++) { + let found = false; + let array = confirmedArrays[i]; + for (let j = 0; j < array.length; j++) { + if (array[j] === candidate) { + found = true; + break; + } + } + + if (found === false) { + return false; + } + } + + return true; + }); + + return results; + } + + export default helper(intersect); + `, + }, + }, + }); + project.addDevDependency(myHelpersAddon); + merge(project.files, { app: { adapters: { @@ -128,13 +189,13 @@ appScenarios {{/each}} `, 'helpers-example.hbs': ` - {{! this uses two helpers from ember-composable-helpers }} + {{! this uses reverse helpers from my-helpers-addon }} {{#each (reverse (array "alpha" "beta")) as |word| }}
{{word}}
{{/each}} - {{! then this lists all the helpers loaded into our app. It should have the two - above, but none of the other stuff from composable-helpers }} + {{! then this lists all the helpers loaded into our app. It should have reverse from + above, but none of the other stuff in the addon }} {{#each (loaded-helpers) as |name|}}
{{name}}
{{/each}} @@ -302,9 +363,13 @@ appScenarios const EmberApp = require('ember-cli/lib/broccoli/ember-app'); const { MacrosConfig } = require('@embroider/macros/src/node'); + const { maybeEmbroider } = require('@embroider/test-setup'); module.exports = function (defaults) { let app = new EmberApp(defaults, { + ...(process.env.FORCE_BUILD_TESTS ? { + tests: true, + } : undefined), 'ember-bootstrap': { bootstrapVersion: 4, importBootstrapCSS: true @@ -315,15 +380,7 @@ appScenarios isClassic: Boolean(process.env.CLASSIC), }); - if (process.env.CLASSIC) { - return app.toTree(); - } - - const { compatBuild, recommendedOptions } = require('@embroider/compat'); - - const Webpack = require('@embroider/webpack').Webpack; - return compatBuild(app, Webpack, { - ...recommendedOptions.optimized, + return maybeEmbroider(app, { packageRules: [ { package: 'app-template', @@ -355,11 +412,20 @@ appScenarios app = await scenario.prepare(); }); - ['production', 'development'].forEach(env => { - test(`pnpm test: ${env}`, async function (assert) { - let result = await app.execute(`cross-env EMBER_ENV=${env} pnpm test`); - assert.equal(result.exitCode, 0, result.output); + test(`pnpm test: development`, async function (assert) { + let result = await app.execute(`pnpm test`); + assert.equal(result.exitCode, 0, result.output); + }); + + test(`pnpm test: production`, async function (assert) { + let result = await app.execute(`pnpm vite build --mode production`, { + env: { + FORCE_BUILD_TESTS: 'true', + }, }); + assert.equal(result.exitCode, 0, result.output); + result = await app.execute(`pnpm ember test --path dist`); + assert.equal(result.exitCode, 0, result.output); }); }); }); diff --git a/tests/scenarios/watch-mode-test.ts b/tests/scenarios/watch-mode-test.ts index f0ec5a6bb..b32b76f49 100644 --- a/tests/scenarios/watch-mode-test.ts +++ b/tests/scenarios/watch-mode-test.ts @@ -9,7 +9,7 @@ import execa, { type Options, type ExecaChildProcess } from 'execa'; const { module: Qmodule, test } = QUnit; -let app = appScenarios.map('watch-mode', () => { +let app = appScenarios.skip('canary').map('watch-mode', () => { /** * We will create files as a part of the watch-mode tests, * because creating files should cause appropriate watch/update behavior diff --git a/tests/ts-app-template/babel.config.cjs b/tests/ts-app-template/babel.config.cjs new file mode 100644 index 000000000..f646eb68c --- /dev/null +++ b/tests/ts-app-template/babel.config.cjs @@ -0,0 +1,16 @@ +// eslint-disable-next-line n/no-missing-require + +let config; + +// TODO - remove this once we have the better solution for injecting stage1 babel config into a real config file +// this is needed because there are things (like ember-composible-helpers) that are now finding our babel config during +// their stage1 build and historically they will never (99% of the time) have found any babel config. +// we might need to keep something like this so that prebuild will never apply babel configs during stage1 i.e. a util +// function that wraps your whole babel config +if (process.env.EMBROIDER_PREBUILD || process.env.EMBROIDER_TEST_SETUP_FORCE === 'classic') { + config = {}; +} else { + config = require('./node_modules/.embroider/rewritten-app/_babel_config_'); +} + +module.exports = config; diff --git a/tests/ts-app-template/package.json b/tests/ts-app-template/package.json index bc47c720a..fce1d3350 100644 --- a/tests/ts-app-template/package.json +++ b/tests/ts-app-template/package.json @@ -35,13 +35,14 @@ "@embroider/core": "workspace:*", "@embroider/router": "workspace:*", "@embroider/test-setup": "workspace:*", - "@embroider/webpack": "workspace:*", + "@embroider/vite": "workspace:*", "@glimmer/component": "^1.1.2", "@glimmer/interfaces": "^0.84.2", "@glimmer/reference": "^0.84.2", "@glimmer/tracking": "^1.1.2", "@glint/environment-ember-loose": "^1.1.0", "@glint/template": "^1.1.0", + "@rollup/plugin-babel": "^5.3.1", "@tsconfig/ember": "^1.0.0", "@types/htmlbars-inline-precompile": "^3.0.0", "@types/qunit": "^2.19.6", @@ -58,7 +59,6 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-fetch": "^8.1.2", "ember-load-initializers": "^2.1.2", "ember-modifier": "^4.1.0", "ember-page-title": "^8.0.0", @@ -75,6 +75,7 @@ "stylelint-prettier": "^4.0.2", "tracked-built-ins": "^3.2.0", "typescript": "^5.1.6", + "vite": "^5.1.5", "webpack": "^5.88.2" }, "engines": { diff --git a/tests/ts-app-template/vite.config.mjs b/tests/ts-app-template/vite.config.mjs new file mode 100644 index 000000000..e4b545be5 --- /dev/null +++ b/tests/ts-app-template/vite.config.mjs @@ -0,0 +1,46 @@ +import { defineConfig } from 'vite'; +import { resolver, hbs, scripts, templateTag, optimizeDeps, compatPrebuild } from '@embroider/vite'; +import { resolve } from 'path'; +import { babel } from '@rollup/plugin-babel'; + +const root = 'node_modules/.embroider/rewritten-app'; + +export default defineConfig({ + root, + // esbuild in vite does not support decorators + esbuild: false, + cacheDir: resolve('node_modules', '.vite'), + plugins: [ + hbs(), + templateTag(), + scripts(), + resolver(), + compatPrebuild(), + + babel({ + babelHelpers: 'runtime', + + // this needs .hbs because our hbs() plugin above converts them to + // javascript but the javascript still also needs babel, but we don't want + // to rename them because vite isn't great about knowing how to hot-reload + // them if we resolve them to made-up names. + extensions: ['.gjs', '.js', '.hbs', '.ts', '.gts'], + }), + ], + optimizeDeps: optimizeDeps(), + server: { + port: 4200, + watch: { + ignored: ['!**/node_modules/.embroider/rewritten-app/**'], + }, + }, + build: { + outDir: resolve(process.cwd(), 'dist'), + rollupOptions: { + input: { + main: resolve(root, 'index.html'), + tests: resolve(root, 'tests/index.html'), + }, + }, + }, +}); diff --git a/tests/vite-app/vite.config.mjs b/tests/vite-app/vite.config.mjs index f18c894be..bca7b9d9e 100644 --- a/tests/vite-app/vite.config.mjs +++ b/tests/vite-app/vite.config.mjs @@ -13,44 +13,52 @@ import { babel } from "@rollup/plugin-babel"; const root = "node_modules/.embroider/rewritten-app"; -export default defineConfig({ - root, - // esbuild in vite does not support decorators - esbuild: false, - cacheDir: resolve("node_modules", ".vite"), - plugins: [ - hbs(), - templateTag(), - scripts(), - resolver(), - compatPrebuild(), - assets(), +export default defineConfig(({ mode }) => { + return { + root, + // esbuild in vite does not support decorators + esbuild: false, + cacheDir: resolve("node_modules", ".vite"), + plugins: [ + hbs(), + templateTag(), + scripts(), + resolver(), + compatPrebuild(), + assets(), - babel({ - babelHelpers: "runtime", + babel({ + babelHelpers: "runtime", - // this needs .hbs because our hbs() plugin above converts them to - // javascript but the javascript still also needs babel, but we don't want - // to rename them because vite isn't great about knowing how to hot-reload - // them if we resolve them to made-up names. - extensions: [".gjs", ".js", ".hbs", ".ts", ".gts"], - }), - ], - optimizeDeps: optimizeDeps(), - server: { - port: 4200, - watch: { - ignored: ["!**/node_modules/.embroider/rewritten-app/**"], + // this needs .hbs because our hbs() plugin above converts them to + // javascript but the javascript still also needs babel, but we don't want + // to rename them because vite isn't great about knowing how to hot-reload + // them if we resolve them to made-up names. + extensions: [".gjs", ".js", ".hbs", ".ts", ".gts"], + }), + ], + optimizeDeps: optimizeDeps(), + server: { + port: 4200, + watch: { + ignored: ["!**/node_modules/.embroider/rewritten-app/**"], + }, }, - }, - publicDir: resolve(process.cwd(), "public"), - build: { - outDir: resolve(process.cwd(), "dist"), - rollupOptions: { - input: { - main: resolve(root, "index.html"), - tests: resolve(root, "tests/index.html"), + publicDir: resolve(process.cwd(), "public"), + build: { + outDir: resolve(process.cwd(), "dist"), + rollupOptions: { + input: { + main: resolve(root, "index.html"), + ...(shouldBuildTests(mode) + ? { tests: resolve(root, "tests/index.html") } + : undefined), + }, }, }, - }, + }; }); + +function shouldBuildTests(mode) { + return mode !== "production" || process.env.FORCE_BUILD_TESTS; +}