@angular/build 20.0.0-next.3 → 20.0.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "20.0.0-next.3",
3
+ "version": "20.0.0-next.5",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,16 +23,15 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.2000.0-next.3",
26
+ "@angular-devkit/architect": "0.2000.0-next.5",
27
27
  "@babel/core": "7.26.10",
28
28
  "@babel/helper-annotate-as-pure": "7.25.9",
29
29
  "@babel/helper-split-export-declaration": "7.24.7",
30
- "@babel/plugin-syntax-import-attributes": "7.26.0",
31
- "@inquirer/confirm": "5.1.8",
30
+ "@inquirer/confirm": "5.1.9",
32
31
  "@vitejs/plugin-basic-ssl": "2.0.0",
33
- "beasties": "0.2.0",
32
+ "beasties": "0.3.2",
34
33
  "browserslist": "^4.23.0",
35
- "esbuild": "0.25.1",
34
+ "esbuild": "0.25.2",
36
35
  "https-proxy-agent": "7.0.6",
37
36
  "istanbul-lib-instrument": "6.0.3",
38
37
  "jsonc-parser": "3.3.1",
@@ -42,33 +41,38 @@
42
41
  "parse5-html-rewriting-stream": "7.0.0",
43
42
  "picomatch": "4.0.2",
44
43
  "piscina": "4.9.2",
45
- "rollup": "4.37.0",
46
- "sass": "1.86.0",
44
+ "rollup": "4.39.0",
45
+ "sass": "1.86.3",
47
46
  "semver": "7.7.1",
48
47
  "source-map-support": "0.5.21",
49
48
  "tinyglobby": "0.2.12",
50
- "vite": "6.2.3",
49
+ "vite": "6.2.5",
51
50
  "watchpack": "2.4.2"
52
51
  },
53
52
  "optionalDependencies": {
54
53
  "lmdb": "3.2.6"
55
54
  },
56
55
  "peerDependencies": {
56
+ "@angular/core": "^20.0.0 || ^20.0.0-next.0",
57
57
  "@angular/compiler": "^20.0.0 || ^20.0.0-next.0",
58
58
  "@angular/compiler-cli": "^20.0.0 || ^20.0.0-next.0",
59
59
  "@angular/localize": "^20.0.0 || ^20.0.0-next.0",
60
60
  "@angular/platform-browser": "^20.0.0 || ^20.0.0-next.0",
61
61
  "@angular/platform-server": "^20.0.0 || ^20.0.0-next.0",
62
62
  "@angular/service-worker": "^20.0.0 || ^20.0.0-next.0",
63
- "@angular/ssr": "^20.0.0-next.3",
63
+ "@angular/ssr": "^20.0.0-next.5",
64
64
  "karma": "^6.4.0",
65
65
  "less": "^4.2.0",
66
66
  "ng-packagr": "^20.0.0 || ^20.0.0-next.0",
67
67
  "postcss": "^8.4.0",
68
68
  "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0",
69
+ "tslib": "^2.3.0",
69
70
  "typescript": ">=5.8 <5.9"
70
71
  },
71
72
  "peerDependenciesMeta": {
73
+ "@angular/core": {
74
+ "optional": true
75
+ },
72
76
  "@angular/localize": {
73
77
  "optional": true
74
78
  },
@@ -203,6 +203,8 @@ export declare function normalizeOptions(context: BuilderContext, projectName: s
203
203
  };
204
204
  templateUpdates: boolean;
205
205
  incrementalResults: boolean;
206
+ customConditions: string[] | undefined;
207
+ frameworkVersion: string;
206
208
  }>;
207
209
  export declare function getLocaleBaseHref(baseHref: string | undefined, i18n: NormalizedApplicationBuildOptions['i18nOptions'], locale: string): string | undefined;
208
210
  export {};
@@ -132,12 +132,12 @@ async function normalizeOptions(context, projectName, options, extensions) {
132
132
  ? undefined
133
133
  : await getTailwindConfig(searchDirectories, workspaceRoot, context);
134
134
  let serverEntryPoint;
135
- if (options.server) {
135
+ if (typeof options.server === 'string') {
136
+ if (options.server === '') {
137
+ throw new Error('The "server" option cannot be an empty string.');
138
+ }
136
139
  serverEntryPoint = node_path_1.default.join(workspaceRoot, options.server);
137
140
  }
138
- else if (options.server === '') {
139
- throw new Error('The "server" option cannot be an empty string.');
140
- }
141
141
  let prerenderOptions;
142
142
  if (options.prerender) {
143
143
  const { discoverRoutes = true, routesFile = undefined } = options.prerender === true ? {} : options.prerender;
@@ -191,12 +191,18 @@ async function normalizeOptions(context, projectName, options, extensions) {
191
191
  let indexHtmlOptions;
192
192
  // index can never have a value of `true` but in the schema it's of type `boolean`.
193
193
  if (typeof options.index !== 'boolean') {
194
+ let indexInput;
194
195
  let indexOutput;
195
196
  // The output file will be created within the configured output path
196
197
  if (typeof options.index === 'string') {
197
- indexOutput = options.index;
198
+ indexInput = indexOutput = node_path_1.default.join(workspaceRoot, options.index);
199
+ }
200
+ else if (typeof options.index === 'undefined') {
201
+ indexInput = node_path_1.default.join(projectSourceRoot, 'index.html');
202
+ indexOutput = 'index.html';
198
203
  }
199
204
  else {
205
+ indexInput = node_path_1.default.join(workspaceRoot, options.index.input);
200
206
  indexOutput = options.index.output || 'index.html';
201
207
  }
202
208
  /**
@@ -214,7 +220,7 @@ async function normalizeOptions(context, projectName, options, extensions) {
214
220
  ? exports.INDEX_HTML_CSR
215
221
  : indexBaseName;
216
222
  indexHtmlOptions = {
217
- input: node_path_1.default.join(workspaceRoot, typeof options.index === 'string' ? options.index : options.index.input),
223
+ input: indexInput,
218
224
  output: indexOutput,
219
225
  insertionOrder: [
220
226
  ['polyfills', true],
@@ -312,6 +318,8 @@ async function normalizeOptions(context, projectName, options, extensions) {
312
318
  security,
313
319
  templateUpdates: !!options.templateUpdates,
314
320
  incrementalResults: !!options.incrementalResults,
321
+ customConditions: options.conditions,
322
+ frameworkVersion: await findFrameworkVersion(projectRoot),
315
323
  };
316
324
  }
317
325
  async function getTailwindConfig(searchDirectories, workspaceRoot, context) {
@@ -468,5 +476,24 @@ function normalizeExternals(value) {
468
476
  if (!value) {
469
477
  return undefined;
470
478
  }
471
- return [...new Set(value.map((d) => (d.endsWith('/*') ? d.slice(0, -2) : d)))];
479
+ return [
480
+ ...new Set(value.map((d) =>
481
+ // remove "/*" wildcard in the end if provided string is not path-like
482
+ d.endsWith('/*') && !/^\.{0,2}\//.test(d) ? d.slice(0, -2) : d)),
483
+ ];
484
+ }
485
+ async function findFrameworkVersion(projectRoot) {
486
+ // Create a custom require function for ESM compliance.
487
+ // NOTE: The trailing slash is significant.
488
+ const projectResolve = (0, node_module_1.createRequire)(projectRoot + '/').resolve;
489
+ try {
490
+ const manifestPath = projectResolve('@angular/core/package.json');
491
+ const manifestData = await (0, promises_1.readFile)(manifestPath, 'utf-8');
492
+ const manifestObject = JSON.parse(manifestData);
493
+ const version = manifestObject.version;
494
+ return version;
495
+ }
496
+ catch {
497
+ throw new Error('Error: It appears that "@angular/core" is missing as a dependency. Please ensure it is included in your project.');
498
+ }
472
499
  }
@@ -37,6 +37,13 @@ export type Schema = {
37
37
  * Automatically clear the terminal screen during rebuilds.
38
38
  */
39
39
  clearScreen?: boolean;
40
+ /**
41
+ * Custom package resolution conditions used to resolve conditional exports/imports.
42
+ * Defaults to ['module', 'development'/'production']. The following special conditions are
43
+ * always present if the requirements are satisfied: 'default', 'import', 'require',
44
+ * 'browser', 'node'.
45
+ */
46
+ conditions?: string[];
40
47
  /**
41
48
  * Define the crossorigin attribute setting of elements that provide CORS support.
42
49
  */
@@ -86,7 +93,7 @@ export type Schema = {
86
93
  /**
87
94
  * Configures the generation of the application's HTML index.
88
95
  */
89
- index: IndexUnion;
96
+ index?: IndexUnion;
90
97
  /**
91
98
  * The stylesheet language to use for the application's inline component styles.
92
99
  */
@@ -163,11 +170,11 @@ export type Schema = {
163
170
  * The full path for the server entry point to the application, relative to the current
164
171
  * workspace.
165
172
  */
166
- server?: string;
173
+ server?: Serv;
167
174
  /**
168
175
  * Generates a service worker configuration.
169
176
  */
170
- serviceWorker?: ServiceWorker;
177
+ serviceWorker?: Serv;
171
178
  /**
172
179
  * Output source maps for scripts and styles. For more information, see
173
180
  * https://angular.dev/reference/configs/workspace-config#source-map-configuration.
@@ -496,9 +503,12 @@ export type AutoCspClass = {
496
503
  unsafeEval?: boolean;
497
504
  };
498
505
  /**
506
+ * The full path for the server entry point to the application, relative to the current
507
+ * workspace.
508
+ *
499
509
  * Generates a service worker configuration.
500
510
  */
501
- export type ServiceWorker = boolean | string;
511
+ export type Serv = boolean | string;
502
512
  /**
503
513
  * Output source maps for scripts and styles. For more information, see
504
514
  * https://angular.dev/reference/configs/workspace-config#source-map-configuration.
@@ -17,7 +17,6 @@
17
17
  "description": "The full path for the browser entry point to the application, relative to the current workspace."
18
18
  },
19
19
  "server": {
20
- "type": "string",
21
20
  "description": "The full path for the server entry point to the application, relative to the current workspace.",
22
21
  "oneOf": [
23
22
  {
@@ -293,6 +292,13 @@
293
292
  "type": "string"
294
293
  }
295
294
  },
295
+ "conditions": {
296
+ "description": "Custom package resolution conditions used to resolve conditional exports/imports. Defaults to ['module', 'development'/'production']. The following special conditions are always present if the requirements are satisfied: 'default', 'import', 'require', 'browser', 'node'.",
297
+ "type": "array",
298
+ "items": {
299
+ "type": "string"
300
+ }
301
+ },
296
302
  "fileReplacements": {
297
303
  "description": "Replace compilation source files with other compilation source files in the build.",
298
304
  "type": "array",
@@ -610,7 +616,7 @@
610
616
  }
611
617
  },
612
618
  "additionalProperties": false,
613
- "required": ["index", "browser", "tsConfig"],
619
+ "required": ["browser", "tsConfig"],
614
620
  "definitions": {
615
621
  "assetPattern": {
616
622
  "oneOf": [
@@ -121,12 +121,6 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
121
121
  // This will also replace file-based/inline styles as code if external runtime styles are not enabled.
122
122
  browserOptions.templateUpdates =
123
123
  serverOptions.liveReload && serverOptions.hmr && environment_options_1.useComponentTemplateHmr;
124
- if (browserOptions.templateUpdates) {
125
- context.logger.warn('Component HMR has been enabled.\n' +
126
- 'If you encounter application reload issues, you can manually reload the page to bypass HMR and/or disable this feature with the' +
127
- ' `--no-hmr` command line option.\n' +
128
- 'Please consider reporting any issues you encounter here: https://github.com/angular/angular-cli/issues\n');
129
- }
130
124
  browserOptions.incrementalResults = true;
131
125
  // Setup the prebundling transformer that will be shared across Vite prebundling requests
132
126
  const prebundleTransformer = new internal_1.JavaScriptTransformer(
@@ -295,6 +295,7 @@ async function collectEntrypoints(options, context, projectSourceRoot) {
295
295
  const testFiles = await (0, find_tests_1.findTests)(options.include ?? [], options.exclude ?? [], context.workspaceRoot, projectSourceRoot);
296
296
  return (0, find_tests_1.getTestEntrypoints)(testFiles, { projectSourceRoot, workspaceRoot: context.workspaceRoot });
297
297
  }
298
+ // eslint-disable-next-line max-lines-per-function
298
299
  async function initializeApplication(options, context, karmaOptions, transforms = {}) {
299
300
  const outputPath = path.join(context.workspaceRoot, 'dist/test-out', (0, node_crypto_1.randomUUID)());
300
301
  const projectSourceRoot = await getProjectSourceRoot(context);
@@ -406,6 +407,14 @@ async function initializeApplication(options, context, karmaOptions, transforms
406
407
  karmaOptions.files.push({ pattern: `*.css`, type: 'css', watched: false });
407
408
  }
408
409
  const parsedKarmaConfig = await karma.config.parseConfig(options.karmaConfig && path.resolve(context.workspaceRoot, options.karmaConfig), transforms.karmaOptions ? transforms.karmaOptions(karmaOptions) : karmaOptions, { promiseConfig: true, throwErrors: true });
410
+ // Check for jsdom which does not support executing ESM scripts.
411
+ // If present, remove jsdom and issue a warning.
412
+ const updatedBrowsers = parsedKarmaConfig.browsers?.filter((browser) => browser !== 'jsdom');
413
+ if (parsedKarmaConfig.browsers?.length !== updatedBrowsers?.length) {
414
+ parsedKarmaConfig.browsers = updatedBrowsers;
415
+ context.logger.warn(`'jsdom' does not support ESM code execution and cannot be used for karma testing.` +
416
+ ` The 'jsdom' entry has been removed from the 'browsers' option.`);
417
+ }
409
418
  // Remove the webpack plugin/framework:
410
419
  // Alternative would be to make the Karma plugin "smart" but that's a tall order
411
420
  // with managing unneeded imports etc..
@@ -76,7 +76,7 @@ function getBaseKarmaOptions(options, context) {
76
76
  karmaOptions.client.clearContext ??= singleRun ?? false; // `singleRun` defaults to `false` per Karma docs.
77
77
  // Convert browsers from a string to an array
78
78
  if (typeof options.browsers === 'string' && options.browsers) {
79
- karmaOptions.browsers = options.browsers.split(',');
79
+ karmaOptions.browsers = options.browsers.split(',').map((browser) => browser.trim());
80
80
  }
81
81
  else if (options.browsers === false) {
82
82
  karmaOptions.browsers = [];
@@ -7,12 +7,10 @@
7
7
  */
8
8
 
9
9
  import { getTestBed } from '@angular/core/testing';
10
- import { platformBrowser } from '@angular/platform-browser';
11
- import { BrowserTestingModule } from '@angular/platform-browser/testing';
10
+ import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
12
11
 
13
- // TODO(alanagius): replace with `platformBrowserTesting` once https://github.com/angular/angular/pull/60480 is released.
14
12
  // Initialize the Angular testing environment.
15
- getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
13
+ getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
16
14
  errorOnUnknownElements: true,
17
15
  errorOnUnknownProperties: true,
18
16
  });
@@ -57,7 +57,7 @@ const purge_cache_1 = require("../../utils/purge-cache");
57
57
  async function* execute(options, context) {
58
58
  // Purge old build disk cache.
59
59
  await (0, purge_cache_1.purgeStaleBuildCache)(context);
60
- const root = context.workspaceRoot;
60
+ const workspaceRoot = context.workspaceRoot;
61
61
  let packager;
62
62
  try {
63
63
  packager = (await Promise.resolve().then(() => __importStar(require('ng-packagr')))).ngPackagr();
@@ -72,15 +72,18 @@ async function* execute(options, context) {
72
72
  }
73
73
  throw error;
74
74
  }
75
- packager.forProject((0, node_path_1.resolve)(root, options.project));
76
- if (options.tsConfig) {
77
- packager.withTsConfig((0, node_path_1.resolve)(root, options.tsConfig));
78
- }
79
75
  const projectName = context.target?.project;
80
76
  if (!projectName) {
81
77
  throw new Error('The builder requires a target.');
82
78
  }
83
79
  const metadata = await context.getProjectMetadata(projectName);
80
+ const ngPackagrConfig = options.project
81
+ ? (0, node_path_1.join)(workspaceRoot, options.project)
82
+ : (0, node_path_1.join)(workspaceRoot, metadata.root ?? '', 'ng-package.json');
83
+ packager.forProject(ngPackagrConfig);
84
+ if (options.tsConfig) {
85
+ packager.withTsConfig((0, node_path_1.resolve)(workspaceRoot, options.tsConfig));
86
+ }
84
87
  const { enabled: cacheEnabled, path: cacheDirectory } = (0, normalize_cache_1.normalizeCacheOptions)(metadata, context.workspaceRoot);
85
88
  const ngPackagrOptions = {
86
89
  cacheEnabled,
@@ -9,7 +9,7 @@ export type Schema = {
9
9
  /**
10
10
  * The file path for the ng-packagr configuration file, relative to the current workspace.
11
11
  */
12
- project: string;
12
+ project?: string;
13
13
  /**
14
14
  * The full path for the TypeScript configuration file, relative to the current workspace.
15
15
  */
@@ -22,6 +22,5 @@
22
22
  "description": "Enable and define the file watching poll time period in milliseconds."
23
23
  }
24
24
  },
25
- "additionalProperties": false,
26
- "required": ["project"]
25
+ "additionalProperties": false
27
26
  }
@@ -14,6 +14,7 @@ export interface CompilerPluginOptions {
14
14
  sourcemap: boolean | 'external';
15
15
  tsconfig: string;
16
16
  jit?: boolean;
17
+ includeTestMetadata?: boolean;
17
18
  advancedOptimizations?: boolean;
18
19
  thirdPartySourcemaps?: boolean;
19
20
  fileReplacements?: Record<string, string>;
@@ -233,7 +233,7 @@ function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBun
233
233
  let referencedFiles;
234
234
  let externalStylesheets;
235
235
  try {
236
- const initializationResult = await compilation.initialize(pluginOptions.tsconfig, hostOptions, createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserveSymlinks, build.initialOptions.conditions, build.initialOptions.absWorkingDir));
236
+ const initializationResult = await compilation.initialize(pluginOptions.tsconfig, hostOptions, createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserveSymlinks, build.initialOptions.conditions));
237
237
  shouldTsIgnoreJs = !initializationResult.compilerOptions.allowJs;
238
238
  // Isolated modules option ensures safe non-TypeScript transpilation.
239
239
  // Typescript printing support for sourcemaps is not yet integrated.
@@ -474,7 +474,7 @@ async function bundleExternalStylesheet(stylesheetBundler, stylesheetFile, exter
474
474
  });
475
475
  }
476
476
  }
477
- function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserveSymlinks, customConditions, absWorkingDir) {
477
+ function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserveSymlinks, customConditions) {
478
478
  return (compilerOptions) => {
479
479
  // target of 9 is ES2022 (using the number avoids an expensive import of typescript just for an enum)
480
480
  if (compilerOptions.target === undefined || compilerOptions.target < 9 /** ES2022 */) {
@@ -542,6 +542,7 @@ function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserve
542
542
  return {
543
543
  ...compilerOptions,
544
544
  noEmitOnError: false,
545
+ composite: false,
545
546
  inlineSources: !!pluginOptions.sourcemap,
546
547
  inlineSourceMap: !!pluginOptions.sourcemap,
547
548
  sourceMap: undefined,
@@ -550,6 +551,7 @@ function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserve
550
551
  preserveSymlinks,
551
552
  externalRuntimeStyles: pluginOptions.externalRuntimeStyles,
552
553
  _enableHmr: !!pluginOptions.templateUpdates,
554
+ supportTestBed: !!pluginOptions.includeTestMetadata,
553
555
  };
554
556
  };
555
557
  }
@@ -382,7 +382,7 @@ function getEsBuildServerCommonOptions(options) {
382
382
  };
383
383
  }
384
384
  function getEsBuildCommonOptions(options) {
385
- const { workspaceRoot, outExtension, optimizationOptions, sourcemapOptions, tsconfig, externalDependencies, outputNames, preserveSymlinks, jit, loaderExtensions, jsonLogs, i18nOptions, } = options;
385
+ const { workspaceRoot, outExtension, optimizationOptions, sourcemapOptions, tsconfig, externalDependencies, outputNames, preserveSymlinks, jit, loaderExtensions, jsonLogs, i18nOptions, customConditions, frameworkVersion, } = options;
386
386
  // Ensure unique hashes for i18n translation changes when using post-process inlining.
387
387
  // This hash value is added as a footer to each file and ensures that the output file names (with hashes)
388
388
  // change when translation files have changed. If this is not done the post processed files may have
@@ -393,18 +393,36 @@ function getEsBuildCommonOptions(options) {
393
393
  const i18nHash = Object.values(i18nOptions.locales).reduce((data, locale) => data + locale.files.map((file) => file.integrity || '').join('|'), '');
394
394
  footer = { js: `/**i18n:${(0, node_crypto_1.createHash)('sha256').update(i18nHash).digest('hex')}*/` };
395
395
  }
396
+ // Core conditions that are always included
397
+ const conditions = [
398
+ // Required to support rxjs 7.x which will use es5 code if this condition is not present
399
+ 'es2015',
400
+ 'es2020',
401
+ ];
402
+ // The pre-linked code is not used with JIT for two reasons:
403
+ // 1) The pre-linked code may not have the metadata included that is required for JIT
404
+ // 2) The CLI is otherwise setup to use runtime linking for JIT to match the application template compilation
405
+ if (!jit) {
406
+ // The pre-linked package condition is based on the framework version.
407
+ // Currently this is specific to each patch version of the framework.
408
+ conditions.push('angular:linked-' + frameworkVersion);
409
+ }
410
+ // Append custom conditions if present
411
+ if (customConditions) {
412
+ conditions.push(...customConditions);
413
+ }
414
+ else {
415
+ // Include default conditions
416
+ conditions.push('module');
417
+ conditions.push(optimizationOptions.scripts ? 'production' : 'development');
418
+ }
396
419
  return {
397
420
  absWorkingDir: workspaceRoot,
398
421
  format: 'esm',
399
422
  bundle: true,
400
423
  packages: 'bundle',
401
424
  assetNames: outputNames.media,
402
- conditions: [
403
- 'es2020',
404
- 'es2015',
405
- 'module',
406
- optimizationOptions.scripts ? 'production' : 'development',
407
- ],
425
+ conditions,
408
426
  resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.cjs'],
409
427
  metafile: true,
410
428
  legalComments: options.extractLicenses ? 'none' : 'eof',
@@ -9,7 +9,7 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.createCompilerPluginOptions = createCompilerPluginOptions;
11
11
  function createCompilerPluginOptions(options, sourceFileCache, loadResultCache, templateUpdates) {
12
- const { sourcemapOptions, tsconfig, fileReplacements, advancedOptimizations, jit, externalRuntimeStyles, instrumentForCoverage, } = options;
12
+ const { sourcemapOptions, tsconfig, fileReplacements, advancedOptimizations, jit, externalRuntimeStyles, instrumentForCoverage, optimizationOptions, } = options;
13
13
  const incremental = !!options.watch;
14
14
  return {
15
15
  sourcemap: !!sourcemapOptions.scripts && (sourcemapOptions.hidden ? 'external' : true),
@@ -24,5 +24,6 @@ function createCompilerPluginOptions(options, sourceFileCache, loadResultCache,
24
24
  externalRuntimeStyles,
25
25
  instrumentForCoverage,
26
26
  templateUpdates,
27
+ includeTestMetadata: !optimizationOptions.scripts,
27
28
  };
28
29
  }
@@ -70,9 +70,7 @@ async function transformWithBabel(filename, data, options) {
70
70
  const shouldLink = !options.skipLinker && (await requiresLinking(filename, data));
71
71
  const useInputSourcemap = options.sourcemap &&
72
72
  (!!options.thirdPartySourcemaps || !/[\\/]node_modules[\\/]/.test(filename));
73
- // @ts-expect-error Import attribute syntax plugin does not currently have type definitions
74
- const { default: importAttributePlugin } = await Promise.resolve().then(() => __importStar(require('@babel/plugin-syntax-import-attributes')));
75
- const plugins = [importAttributePlugin];
73
+ const plugins = [];
76
74
  if (options.instrumentForCoverage) {
77
75
  const { default: coveragePlugin } = await Promise.resolve().then(() => __importStar(require('../babel/plugins/add-code-coverage.js')));
78
76
  plugins.push(coveragePlugin);
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.normalizeCacheOptions = normalizeCacheOptions;
11
11
  const node_path_1 = require("node:path");
12
12
  /** Version placeholder is replaced during the build process with actual package version */
13
- const VERSION = '20.0.0-next.3';
13
+ const VERSION = '20.0.0-next.5';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&