@forge/bundler 4.20.6-next.2 → 4.20.6-next.3

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,13 @@
1
1
  # @forge/bundler
2
2
 
3
+ ## 4.20.6-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7f9c560: Fix duplicate runtime.json
8
+ - Updated dependencies [e23f188]
9
+ - @forge/api@4.3.0-next.1
10
+
3
11
  ## 4.20.6-next.2
4
12
 
5
13
  ### Patch Changes
package/out/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { NativeUIBundler, NativeUIBundleResult } from './nativeui';
2
- export { SandboxBundler, NodeBundler, NODE_RUNTIME_VERSION_FILE } from './runtime';
2
+ export { SandboxBundler, NodeBundler } from './runtime';
3
3
  export { Bundler, BundlerError, BundlerOutput, BundlerWatch, EntryPoint, WatcherMonitor } from './types';
4
4
  export { getCompiler, handleWebpackCompilationResult, runLinter } from './webpack';
5
5
  export { getEntryPoints } from './config/common';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
package/out/index.js CHANGED
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalWrapperProvider = exports.getWrapperProvider = exports.getNativeUiBuildConfig = exports.getEntryPoints = exports.runLinter = exports.handleWebpackCompilationResult = exports.getCompiler = exports.BundlerError = exports.NODE_RUNTIME_VERSION_FILE = exports.NodeBundler = exports.SandboxBundler = exports.NativeUIBundler = void 0;
3
+ exports.LocalWrapperProvider = exports.getWrapperProvider = exports.getNativeUiBuildConfig = exports.getEntryPoints = exports.runLinter = exports.handleWebpackCompilationResult = exports.getCompiler = exports.BundlerError = exports.NodeBundler = exports.SandboxBundler = exports.NativeUIBundler = void 0;
4
4
  var nativeui_1 = require("./nativeui");
5
5
  Object.defineProperty(exports, "NativeUIBundler", { enumerable: true, get: function () { return nativeui_1.NativeUIBundler; } });
6
6
  var runtime_1 = require("./runtime");
7
7
  Object.defineProperty(exports, "SandboxBundler", { enumerable: true, get: function () { return runtime_1.SandboxBundler; } });
8
8
  Object.defineProperty(exports, "NodeBundler", { enumerable: true, get: function () { return runtime_1.NodeBundler; } });
9
- Object.defineProperty(exports, "NODE_RUNTIME_VERSION_FILE", { enumerable: true, get: function () { return runtime_1.NODE_RUNTIME_VERSION_FILE; } });
10
9
  var types_1 = require("./types");
11
10
  Object.defineProperty(exports, "BundlerError", { enumerable: true, get: function () { return types_1.BundlerError; } });
12
11
  var webpack_1 = require("./webpack");
package/out/runtime.d.ts CHANGED
@@ -1,16 +1,13 @@
1
- import webpack from 'webpack';
2
- import { BundleLogger, BundlerOutput, BundlerArgs } from './types';
1
+ import { BundleLogger, BundlerArgs } from './types';
3
2
  import { ConfigWithOutput, WebpackBundler } from './webpack';
4
3
  import { WrapperProvider } from './wrapper-provider';
5
4
  export declare class SandboxBundler extends WebpackBundler {
6
5
  constructor(logger: BundleLogger);
7
6
  getConfig(args: BundlerArgs): ConfigWithOutput;
8
7
  }
9
- export declare const NODE_RUNTIME_VERSION_FILE = "runtime.json";
10
8
  export declare class NodeBundler extends WebpackBundler {
11
9
  private readonly wrapperProvider;
12
10
  constructor(logger: BundleLogger, wrapperProvider: WrapperProvider);
13
- protected getOutput(config: ConfigWithOutput, stats: webpack.Stats): BundlerOutput;
14
11
  getConfig(args: BundlerArgs): ConfigWithOutput;
15
12
  private insertWrapperBundle;
16
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAGA,OAAO,OAAO,MAAM,SAAS,CAAC;AAK9B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,MAAM,EAAE,YAAY;IAIhC,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB;CAG/C;AAED,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AAIxD,qBAAa,WAAY,SAAQ,cAAc;IAG3C,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADhC,MAAM,EAAE,YAAY,EACH,eAAe,EAAE,eAAe;IAInD,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,aAAa;IAWlF,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB;IAyC9C,OAAO,CAAC,mBAAmB;CAkC5B"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,MAAM,EAAE,YAAY;IAIhC,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB;CAG/C;AAUD,qBAAa,WAAY,SAAQ,cAAc;IAG3C,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADhC,MAAM,EAAE,YAAY,EACH,eAAe,EAAE,eAAe;IAKnD,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB;IAyC9C,OAAO,CAAC,mBAAmB;CAkC5B"}
package/out/runtime.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NodeBundler = exports.NODE_RUNTIME_VERSION_FILE = exports.SandboxBundler = void 0;
3
+ exports.NodeBundler = exports.SandboxBundler = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const fs_1 = require("fs");
6
- const path_1 = tslib_1.__importDefault(require("path"));
7
5
  const webpack_1 = tslib_1.__importDefault(require("webpack"));
8
6
  var RawSource = webpack_1.default.sources.RawSource;
9
7
  const common_1 = require("./config/common");
@@ -18,7 +16,7 @@ class SandboxBundler extends webpack_2.WebpackBundler {
18
16
  }
19
17
  }
20
18
  exports.SandboxBundler = SandboxBundler;
21
- exports.NODE_RUNTIME_VERSION_FILE = 'runtime.json';
19
+ const NODE_RUNTIME_VERSION_FILE = 'runtime.json';
22
20
  const NODE_WEBPACK_USER_CODE_DIR = 'bundled';
23
21
  class NodeBundler extends webpack_2.WebpackBundler {
24
22
  wrapperProvider;
@@ -26,12 +24,6 @@ class NodeBundler extends webpack_2.WebpackBundler {
26
24
  super(logger);
27
25
  this.wrapperProvider = wrapperProvider;
28
26
  }
29
- getOutput(config, stats) {
30
- const result = super.getOutput(config, stats);
31
- result.metadata = result.metadata || {};
32
- result.metadata.nodeRuntimeVersion = (0, fs_1.readFileSync)(path_1.default.join(result.outputDir, exports.NODE_RUNTIME_VERSION_FILE)).toString();
33
- return result;
34
- }
35
27
  getConfig(args) {
36
28
  const webpackConfig = (0, common_1.getCommonWebpackConfig)(args);
37
29
  const newEntries = {};
@@ -73,7 +65,7 @@ class NodeBundler extends webpack_2.WebpackBundler {
73
65
  compilation.emitAsset(`${entrypoint.name}.cjs`, source);
74
66
  }
75
67
  }
76
- compilation.emitAsset(exports.NODE_RUNTIME_VERSION_FILE, new RawSource(JSON.stringify({
68
+ compilation.emitAsset(NODE_RUNTIME_VERSION_FILE, new RawSource(JSON.stringify({
77
69
  version: loader ? loader.version : wrapper.version
78
70
  }, null, 2)));
79
71
  };
package/out/types.d.ts CHANGED
@@ -2,7 +2,6 @@ import { Logger, UserError } from '@forge/cli-shared';
2
2
  import { Translations } from '@forge/manifest';
3
3
  export declare type BundlerMetadata = {
4
4
  modules?: string[];
5
- nodeRuntimeVersion?: string;
6
5
  };
7
6
  export interface BundlerOutput {
8
7
  outputDir: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,E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AAC,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC1G,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,IAAI,CAAC;CACd;AAED,oBAAY,kBAAkB,GAAG,cAAc,GAAG;IAChD,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClD,KAAK,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjF,CAAC;AAEF,qBAAa,YAAa,SAAQ,SAAS;CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bundler",
3
- "version": "4.20.6-next.2",
3
+ "version": "4.20.6-next.3",
4
4
  "description": "Default bundler for Forge apps",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Atlassian",
@@ -19,7 +19,7 @@
19
19
  "@babel/plugin-transform-optional-chaining": "^7.23.4",
20
20
  "@babel/plugin-transform-react-jsx": "^7.23.4",
21
21
  "@babel/preset-typescript": "^7.23.3",
22
- "@forge/api": "4.2.1-next.0",
22
+ "@forge/api": "4.3.0-next.1",
23
23
  "@forge/babel-plugin-transform-ui": "1.1.19",
24
24
  "@forge/cli-shared": "6.5.3-next.1",
25
25
  "@forge/i18n": "0.0.2",