@forge/bundler 7.0.3-next.4 → 7.1.0-next.6

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
@@ -1,5 +1,26 @@
1
1
  # @forge/bundler
2
2
 
3
+ ## 7.1.0-next.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0949833]
8
+ - @forge/cli-shared@9.3.0-next.6
9
+ - @forge/lint@6.0.3-next.6
10
+
11
+ ## 7.1.0-next.5
12
+
13
+ ### Minor Changes
14
+
15
+ - d1610cc: Manual runtime packaging option
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [d1610cc]
20
+ - @forge/manifest@13.3.0-next.5
21
+ - @forge/cli-shared@9.3.0-next.5
22
+ - @forge/lint@6.0.3-next.5
23
+
3
24
  ## 7.0.3-next.4
4
25
 
5
26
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAEZ,MAAM,EAEN,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,OAAO,EAAkF,MAAM,SAAS,CAAC;AAGlH,OAAO,EAAiB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAMpE,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAkLtD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,GAC7B,OAAO,CAET"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAEZ,MAAM,EAEN,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,OAAO,EAAkF,MAAM,SAAS,CAAC;AAGlH,OAAO,EAAiB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAMpE,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AA4KtD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,GAC7B,OAAO,CAET"}
package/out/runtime.js CHANGED
@@ -92,26 +92,28 @@ class TypeScriptNodeBundler extends typescript_1.TypeScriptBundler {
92
92
  }
93
93
  }
94
94
  class ConfigBundler {
95
+ logger;
96
+ wrapperProvider;
95
97
  configReader;
96
98
  statsigService;
97
- bundlers;
98
99
  constructor(logger, wrapperProvider, configReader, statsigService) {
100
+ this.logger = logger;
101
+ this.wrapperProvider = wrapperProvider;
99
102
  this.configReader = configReader;
100
103
  this.statsigService = statsigService;
101
- this.bundlers = new Map([
102
- ['webpack', new NodeBundler(logger, wrapperProvider)],
103
- ['typescript', new TypeScriptNodeBundler(logger, wrapperProvider)]
104
- ]);
105
- }
106
- async getBundlerType() {
107
- const configuredBundler = (await this.configReader.readConfig()).app.package?.bundler ?? 'webpack';
108
- if (configuredBundler === 'typescript' && !(await this.statsigService.isTypescriptBundlerEnabled())) {
109
- throw new cli_shared_1.UserError(text_1.Text.typescriptBundlerEAP);
110
- }
111
- return configuredBundler;
112
104
  }
113
105
  async getBundler() {
114
- return this.bundlers.get(await this.getBundlerType());
106
+ const config = (await this.configReader.readConfig()).app.package;
107
+ if (config?.bundler === 'typescript') {
108
+ if (!(await this.statsigService.isTypescriptBundlerEnabled())) {
109
+ throw new cli_shared_1.UserError(text_1.Text.typescriptBundlerEAP);
110
+ }
111
+ return new TypeScriptNodeBundler(this.logger, this.wrapperProvider);
112
+ }
113
+ if (config?.bundler === 'manual@2026') {
114
+ throw new cli_shared_1.UserError(text_1.Text.manualBundlerEAP);
115
+ }
116
+ return new NodeBundler(this.logger, this.wrapperProvider);
115
117
  }
116
118
  async bundle(args) {
117
119
  return (await this.getBundler()).bundle(args);
package/out/text.d.ts CHANGED
@@ -4,5 +4,6 @@ export declare const Text: {
4
4
  noExecutableFile: string;
5
5
  metadataFailed: (error: Error) => string;
6
6
  typescriptBundlerEAP: string;
7
+ manualBundlerEAP: string;
7
8
  };
8
9
  //# sourceMappingURL=text.d.ts.map
package/out/text.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;mCACgB,MAAM,EAAE;8BACb,MAAM,EAAE;;4BAKV,KAAK;;CAE9B,CAAC"}
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;mCACgB,MAAM,EAAE;8BACb,MAAM,EAAE;;4BAKV,KAAK;;;CAG9B,CAAC"}
package/out/text.js CHANGED
@@ -7,5 +7,6 @@ exports.Text = {
7
7
  typescriptError: (errors) => `TypeScript errors in the app caused the bundling to fail. Fix the errors listed below before rerunning the command. ${errors.join('\n')}`,
8
8
  noExecutableFile: 'Could not find the main executable file',
9
9
  metadataFailed: (error) => `Application code metadata processing failed: ${error.message}`,
10
- typescriptBundlerEAP: `TypeScript bundler is a Forge EAP feature. Please see ${cli_shared_1.Text.go('dac/platform/forge/manifest-reference/#package')} for more details.`
10
+ typescriptBundlerEAP: `TypeScript bundler is a Forge EAP feature. Please see ${cli_shared_1.Text.go('dac/platform/forge/manifest-reference/#package')} for more details.`,
11
+ manualBundlerEAP: `Manual bundler is a Forge EAP feature. Please see ${cli_shared_1.Text.go('dac/platform/forge/manifest-reference/#package')} for more details.`
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bundler",
3
- "version": "7.0.3-next.4",
3
+ "version": "7.1.0-next.6",
4
4
  "description": "Default bundler for Forge apps",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Atlassian",
@@ -21,10 +21,10 @@
21
21
  "@babel/plugin-transform-react-jsx": "^7.23.4",
22
22
  "@babel/traverse": "^7.24.0",
23
23
  "@babel/types": "^7.24.0",
24
- "@forge/cli-shared": "9.3.0-next.4",
24
+ "@forge/cli-shared": "9.3.0-next.6",
25
25
  "@forge/i18n": "1.0.0",
26
- "@forge/lint": "6.0.3-next.4",
27
- "@forge/manifest": "13.3.0-next.4",
26
+ "@forge/lint": "6.0.3-next.6",
27
+ "@forge/manifest": "13.3.0-next.5",
28
28
  "babel-loader": "^8.3.0",
29
29
  "cheerio": "^1.2.0",
30
30
  "cross-spawn": "^7.0.6",