@ionic-hotfix/cordova-builders 13.0.1-testing.1 → 13.0.1-testing.4

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/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## 13.0.1-testing.1 (2026-02-26)
6
+ ## 13.0.1-testing.4 (2026-02-26)
7
7
 
8
8
 
9
9
  ### Bug Fixes
@@ -44,6 +44,55 @@ update their angular.json to reflect the new package name
44
44
 
45
45
 
46
46
 
47
+ ## 13.0.1-testing.2 (2026-02-26)
48
+
49
+
50
+ ### Bug Fixes
51
+
52
+ * **cordova-builders:** release bump ([#515](https://github.com/ionic-team/angular-toolkit/issues/515)) ([047a563](https://github.com/ionic-team/angular-toolkit/commit/047a563db305a07e1a18ac08935d2809dc3a9a04))
53
+ * Remove extra line from README ([#517](https://github.com/ionic-team/angular-toolkit/issues/517)) ([a6d925f](https://github.com/ionic-team/angular-toolkit/commit/a6d925fca2a477e54d9157529cb25b4f48b04176))
54
+
55
+
56
+ ### Features
57
+
58
+ * add cordova-builders ng-add ([#467](https://github.com/ionic-team/angular-toolkit/issues/467)) ([1b9a0bd](https://github.com/ionic-team/angular-toolkit/commit/1b9a0bdabdbdcd1f6226a8ddc771abd1f54afd42))
59
+ * **builders:** add support for angular 16.0 ([379d8d4](https://github.com/ionic-team/angular-toolkit/commit/379d8d43d066b1cd556b083ccb506703a166ce1d)), closes [#493](https://github.com/ionic-team/angular-toolkit/issues/493) [#494](https://github.com/ionic-team/angular-toolkit/issues/494)
60
+ * bump deps to angular 14 ([767598e](https://github.com/ionic-team/angular-toolkit/commit/767598eace5bc91767008fd86670729c8079a1d9)), closes [#474](https://github.com/ionic-team/angular-toolkit/issues/474)
61
+ * bump deps to angular 15 ([009079a](https://github.com/ionic-team/angular-toolkit/commit/009079a5cf13804d55a7b1d15c79824cac9db179))
62
+ * bump deps to support angular v15 ([e7fdfd8](https://github.com/ionic-team/angular-toolkit/commit/e7fdfd8581819430b549cfae4a87e9edbadf57c9)), closes [#481](https://github.com/ionic-team/angular-toolkit/issues/481) [#477](https://github.com/ionic-team/angular-toolkit/issues/477) [#482](https://github.com/ionic-team/angular-toolkit/issues/482)
63
+ * split tooling ([#465](https://github.com/ionic-team/angular-toolkit/issues/465)) ([a8303ec](https://github.com/ionic-team/angular-toolkit/commit/a8303ec5df92c9f463ded30fbcb97a908578adf5))
64
+ * support angular 17 ([#508](https://github.com/ionic-team/angular-toolkit/issues/508)) ([c002c51](https://github.com/ionic-team/angular-toolkit/commit/c002c51cc09f45639ca97bc5354840d9c384556c))
65
+ * support angular 18 ([#513](https://github.com/ionic-team/angular-toolkit/issues/513)) ([70d5066](https://github.com/ionic-team/angular-toolkit/commit/70d50665a000c10b1cf5701aad664c2e620541c1))
66
+ * support angular 19 ([#520](https://github.com/ionic-team/angular-toolkit/issues/520)) ([2823580](https://github.com/ionic-team/angular-toolkit/commit/282358057bac80e3f3a3f96cec6b7d8c1380cea0))
67
+ * support angular 20 ([#524](https://github.com/ionic-team/angular-toolkit/issues/524)) ([3525b21](https://github.com/ionic-team/angular-toolkit/commit/3525b2151cca563015618eb0745639133d273842))
68
+
69
+
70
+ ### BREAKING CHANGES
71
+
72
+ * The minimum version of Angular required is now 17. Please updates your apps to use
73
+ the latest release of Angular.
74
+ * **builders:** The minimum version of Angular required is now 16. Please updates your apps to use
75
+ the lates release of Angular
76
+ * Apps will need to update to Angular 15 in order to suppor this verion.
77
+ * Apps will need to update to Angular 15 in order to support this version
78
+ * Apps will need to update to Angular 14 in order to suppor this verion.
79
+ * ionic/angular + cordova users will now need to install @ionic/cordova-builders and
80
+ update their angular.json to reflect the new package name
81
+
82
+ * chore(): fix package description
83
+
84
+
85
+
86
+
87
+
88
+ ## [13.0.1-testing.1](https://github.com/ionic-team/angular-toolkit/compare/@ionic/cordova-builders@12.3.0...@ionic/cordova-builders@13.0.1-testing.1) (2026-02-26)
89
+
90
+ **Note:** Version bump only for package @ionic/cordova-builders
91
+
92
+
93
+
94
+
95
+
47
96
  ## [13.0.1-testing.0](https://github.com/ionic-team/angular-toolkit/compare/@ionic/cordova-builders@12.3.0...@ionic/cordova-builders@13.0.1-testing.0) (2026-02-26)
48
97
 
49
98
  **Note:** Version bump only for package @ionic/cordova-builders
@@ -9,13 +9,21 @@ const operators_1 = require("rxjs/operators");
9
9
  const utils_1 = require("../utils");
10
10
  const append_scripts_1 = require("../utils/append-scripts");
11
11
  const log_server_1 = require("./log-server");
12
+ /**
13
+ * Builders that are esbuild-based but not known to @angular-devkit/build-angular's
14
+ * isEsbuildBased() check. We remap them via builderSelector so the dev-server
15
+ * routes to the Vite path instead of falling through to webpack-server.js.
16
+ */
17
+ const CUSTOM_ESBUILD_REMAP = {
18
+ '@angular-builders/custom-esbuild:application': '@angular-devkit/build-angular:application',
19
+ '@angular-builders/custom-esbuild:browser': '@angular-devkit/build-angular:browser-esbuild',
20
+ };
12
21
  /** Builders that use esbuild — scripts/assets are NOT passed via getTargetOptions for these. */
13
22
  const ESBUILD_BUILDERS = new Set([
14
23
  '@angular/build:application',
15
24
  '@angular-devkit/build-angular:application',
16
25
  '@angular-devkit/build-angular:browser-esbuild',
17
- '@angular-builders/custom-esbuild:application',
18
- '@angular-builders/custom-esbuild:browser',
26
+ ...Object.keys(CUSTOM_ESBUILD_REMAP),
19
27
  ]);
20
28
  function serveCordova(options, context) {
21
29
  const { devServerTarget, port, host, ssl } = options;
@@ -23,30 +31,24 @@ function serveCordova(options, context) {
23
31
  const devServerTargetSpec = (0, architect_1.targetFromTargetString)(devServerTarget);
24
32
  async function setup() {
25
33
  var _a, _b, _c;
26
- // ── Dev-server options ─────────────────────────────────────────────────
27
34
  const devServerTargetOptions = await context.getTargetOptions(devServerTargetSpec);
28
35
  const devServerName = await context.getBuilderNameForTarget(devServerTargetSpec);
29
36
  devServerTargetOptions.port = port;
30
37
  devServerTargetOptions.host = host;
31
38
  devServerTargetOptions.ssl = ssl;
32
39
  const devServerOptions = (await context.validateOptions(devServerTargetOptions, devServerName));
33
- // ── Cordova assets ─────────────────────────────────────────────────────
34
40
  const formattedAssets = await (0, utils_1.prepareServerConfig)(options, root);
35
41
  if (options.consolelogs && options.consolelogsPort) {
36
42
  await (0, log_server_1.createConsoleLogServer)(host, options.consolelogsPort);
37
43
  }
38
- // ── Inject scripts/assets into the build target (Webpack path only) ────
39
- // For esbuild-based builders scripts/assets injection is handled via the
40
- // indexHtml transform below. Patching getTargetOptions for esbuild builders
41
- // would expose their object-shaped `outputPath` to Webpack internals and
42
- // cause ERR_INVALID_ARG_TYPE at common.js path.resolve().
44
+ // Webpack-only: patch getTargetOptions so the dev-server picks up the extra
45
+ // Cordova scripts/assets when it reads the build target. Skip for esbuild
46
+ // builders their outputPath is an object and would crash common.js:290.
43
47
  const buildTargetString = (_a = devServerOptions.buildTarget) !== null && _a !== void 0 ? _a : devServerOptions.browserTarget;
44
48
  if (buildTargetString && formattedAssets.extraScripts.length + formattedAssets.extraAssets.length > 0) {
45
49
  const buildTargetSpec = (0, architect_1.targetFromTargetString)(buildTargetString);
46
50
  const buildBuilderName = await context.getBuilderNameForTarget(buildTargetSpec);
47
51
  if (!ESBUILD_BUILDERS.has(buildBuilderName)) {
48
- // Webpack builder: patch getTargetOptions so the dev-server picks up
49
- // the extra Cordova scripts and assets when it reads the build target.
50
52
  const buildTargetOptions = await context.getTargetOptions(buildTargetSpec);
51
53
  const existingScripts = (_b = buildTargetOptions.scripts) !== null && _b !== void 0 ? _b : [];
52
54
  const existingAssets = (_c = buildTargetOptions.assets) !== null && _c !== void 0 ? _c : [];
@@ -67,13 +69,30 @@ function serveCordova(options, context) {
67
69
  return raw;
68
70
  };
69
71
  }
70
- // esbuild builders: scripts are injected into index.html via the
71
- // indexHtml transform; file assets are copied by the builder natively
72
- // through the assets array which is already set in angular.json.
73
72
  }
74
73
  return { devServerOptions, formattedAssets };
75
74
  }
76
- return (0, rxjs_1.from)(setup()).pipe((0, operators_1.switchMap)(({ devServerOptions, formattedAssets }) => (0, build_angular_1.executeDevServerBuilder)(devServerOptions, context, { indexHtml: (0, exports.indexHtmlTransformFactory)(formattedAssets) })));
75
+ return (0, rxjs_1.from)(setup()).pipe((0, operators_1.switchMap)(({ devServerOptions, formattedAssets }) => (0, build_angular_1.executeDevServerBuilder)(devServerOptions, context, { indexHtml: (0, exports.indexHtmlTransformFactory)(formattedAssets) }, {
76
+ // Remap @angular-builders/custom-esbuild:* to the angular-devkit equivalents
77
+ // so executeDevServerBuilder's isEsbuildBased() check passes and routes to
78
+ // the Vite dev server instead of falling through to webpack-server.js.
79
+ builderSelector: (info, logger) => {
80
+ const remapped = CUSTOM_ESBUILD_REMAP[info.builderName];
81
+ if (remapped) {
82
+ return remapped;
83
+ }
84
+ // Fall back to the default selector behaviour
85
+ if (info.builderName === '@angular/build:application' ||
86
+ info.builderName === '@angular-devkit/build-angular:application' ||
87
+ info.builderName === '@angular-devkit/build-angular:browser-esbuild') {
88
+ return info.builderName;
89
+ }
90
+ if (info.forceEsbuild) {
91
+ return '@angular-devkit/build-angular:browser-esbuild';
92
+ }
93
+ return info.builderName;
94
+ },
95
+ })));
77
96
  }
78
97
  exports.default = (0, architect_1.createBuilder)(serveCordova);
79
98
  const indexHtmlTransformFactory = ({ globalScriptsByBundleName }) => (indexTransform) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic-hotfix/cordova-builders",
3
- "version": "13.0.1-testing.1",
3
+ "version": "13.0.1-testing.4",
4
4
  "license": "MIT",
5
5
  "description": "Cordova builders for @ionic/angular apps",
6
6
  "homepage": "https://ionicframework.com/",