@forge/bundler 4.11.1-next.0 → 4.11.1-next.10

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,94 @@
1
1
  # @forge/bundler
2
2
 
3
+ ## 4.11.1-next.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [035116d]
8
+ - @forge/api@2.18.5-next.0
9
+ - @forge/cli-shared@3.17.2-next.5
10
+ - @forge/lint@3.6.5-next.6
11
+ - @forge/runtime@4.4.7-next.1
12
+
13
+ ## 4.11.1-next.9
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [cdf28f27]
18
+ - @forge/cli-shared@3.17.2-next.4
19
+ - @forge/lint@3.6.5-next.5
20
+
21
+ ## 4.11.1-next.8
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [30713ea9]
26
+ - @forge/cli-shared@3.17.2-next.3
27
+ - @forge/lint@3.6.5-next.4
28
+
29
+ ## 4.11.1-next.7
30
+
31
+ ### Patch Changes
32
+
33
+ - 4be20514: Bumping dependencies via Renovate:
34
+
35
+ - eslint-plugin-prettier
36
+
37
+ ## 4.11.1-next.6
38
+
39
+ ### Patch Changes
40
+
41
+ - 4769ae06: Bumping dependencies via Renovate:
42
+
43
+ - eslint-config-prettier
44
+
45
+ ## 4.11.1-next.5
46
+
47
+ ### Patch Changes
48
+
49
+ - 1d4230e6: Bumping dependencies via Renovate:
50
+
51
+ - eslint
52
+ - @types/eslint
53
+
54
+ - Updated dependencies [1d4230e6]
55
+ - @forge/lint@3.6.5-next.3
56
+
57
+ ## 4.11.1-next.4
58
+
59
+ ### Patch Changes
60
+
61
+ - @forge/cli-shared@3.17.2-next.2
62
+ - @forge/lint@3.6.5-next.2
63
+
64
+ ## 4.11.1-next.3
65
+
66
+ ### Patch Changes
67
+
68
+ - 89e0c881: Use \_HANDLER to determine functions to expose on Node runtime
69
+ - Updated dependencies [89e0c881]
70
+ - @forge/runtime@4.4.7-next.0
71
+
72
+ ## 4.11.1-next.2
73
+
74
+ ### Patch Changes
75
+
76
+ - 4f5f44dc: Bumping dependencies via Renovate:
77
+
78
+ - buffer
79
+
80
+ - a5b25d46: Bumping dependencies via Renovate:
81
+
82
+ - assert
83
+
84
+ ## 4.11.1-next.1
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies [81556b08]
89
+ - @forge/cli-shared@3.17.2-next.1
90
+ - @forge/lint@3.6.5-next.1
91
+
3
92
  ## 4.11.1-next.0
4
93
 
5
94
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/config/node.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EAIpB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,eAAO,MAAM,yBAAyB,gBACvB,mBAAmB,EAAE,UAC1B,aAAa,KACpB,mBAuDF,CAAC"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/config/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EAIpB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,eAAO,MAAM,yBAAyB,gBACvB,mBAAmB,EAAE,UAC1B,aAAa,KACpB,mBAkCF,CAAC"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNodeRuntimeBuildConfig = exports.NODE_WEBPACK_CONFIG_NAME = void 0;
4
- const webpack_1 = require("webpack");
5
4
  const common_1 = require("./common");
6
5
  exports.NODE_WEBPACK_CONFIG_NAME = 'node-runtime';
7
6
  const getNodeRuntimeBuildConfig = (entrypoints, config) => {
@@ -14,18 +13,6 @@ const getNodeRuntimeBuildConfig = (entrypoints, config) => {
14
13
  }
15
14
  webpackConfig.entry = newEntries;
16
15
  webpackConfig.target = 'node18';
17
- const defineExports = ({ filename }) => {
18
- const entryName = filename.replace(/\.js$/, '');
19
- const entrypoint = entrypoints.find((e) => e.name === entryName);
20
- if (entrypoint) {
21
- return `__BUNDLED_EXPORTS__ = ${JSON.stringify(entrypoint.functions)};`;
22
- }
23
- return '';
24
- };
25
- webpackConfig.plugins.push(new webpack_1.BannerPlugin({
26
- banner: defineExports,
27
- raw: true
28
- }));
29
16
  webpackConfig.name = exports.NODE_WEBPACK_CONFIG_NAME;
30
17
  webpackConfig.module.rules.push({
31
18
  test: /\.m?js$/,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- var _a, _b;
2
+ var _a, _b, _c, _d;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const api_1 = require("@forge/api");
5
5
  const runtime_1 = require("@forge/runtime");
@@ -11,9 +11,9 @@ const realRequire = eval('require');
11
11
  if (!realRequire) {
12
12
  throw new Error(`Unexpected require: ${realRequire}`);
13
13
  }
14
- const bundledExports = eval('__BUNDLED_EXPORTS__');
15
- if (!bundledExports || bundledExports.length === 0) {
16
- throw new Error('Expected to find __BUNDLED_EXPORTS__ replaced by Webpack configuration.');
14
+ const handler = (_b = (_a = process.env._HANDLER) === null || _a === void 0 ? void 0 : _a.split('.')) === null || _b === void 0 ? void 0 : _b[1];
15
+ if (!handler) {
16
+ throw new Error('Expected to find function handler name in _HANDLER environment variable.');
17
17
  }
18
18
  const adapter = (name) => {
19
19
  return async (lambdaEvent, lambdaContext) => {
@@ -70,7 +70,5 @@ const adapter = (name) => {
70
70
  }
71
71
  };
72
72
  };
73
- (_b = (_a = process).setSourceMapsEnabled) === null || _b === void 0 ? void 0 : _b.call(_a, true);
74
- for (const ownExport of bundledExports) {
75
- exports[ownExport] = adapter(ownExport);
76
- }
73
+ (_d = (_c = process).setSourceMapsEnabled) === null || _d === void 0 ? void 0 : _d.call(_c, true);
74
+ exports[handler] = adapter(handler);
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig-interactor.d.ts","sourceRoot":"","sources":["../src/tsconfig-interactor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,QAAQ,kBAAkB,CAAC;AAExC,eAAO,MAAM,oBAAoB,QAA2C,CAAC;AAE7E,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAAoB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAjE,gBAAgB,EAAE,gBAAgB,EAAmB,YAAY,EAAE,MAAM;IAE/F,eAAe,IAAI,MAAM;CAKjC"}
1
+ {"version":3,"file":"tsconfig-interactor.d.ts","sourceRoot":"","sources":["../src/tsconfig-interactor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,QAAQ,kBAAkB,CAAC;AAExC,eAAO,MAAM,oBAAoB,QAA2C,CAAC;AAE7E,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,MAAM;IAGhC,eAAe,IAAI,MAAM;CAKjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bundler",
3
- "version": "4.11.1-next.0",
3
+ "version": "4.11.1-next.10",
4
4
  "description": "Default bundler for Forge apps",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Atlassian",
@@ -19,16 +19,16 @@
19
19
  "@babel/plugin-transform-optional-chaining": "^7.22.10",
20
20
  "@babel/plugin-transform-react-jsx": "^7.22.5",
21
21
  "@babel/preset-typescript": "^7.22.5",
22
- "@forge/api": "2.18.4",
22
+ "@forge/api": "2.18.5-next.0",
23
23
  "@forge/babel-plugin-transform-ui": "1.1.6",
24
- "@forge/cli-shared": "3.17.2-next.0",
25
- "@forge/lint": "3.6.5-next.0",
26
- "@forge/runtime": "4.4.6",
24
+ "@forge/cli-shared": "3.17.2-next.5",
25
+ "@forge/lint": "3.6.5-next.6",
26
+ "@forge/runtime": "4.4.7-next.1",
27
27
  "@forge/util": "1.3.1",
28
- "assert": "^1.5.0",
28
+ "assert": "^2.0.0",
29
29
  "babel-loader": "^8.3.0",
30
30
  "browserify-zlib": "^0.2.0",
31
- "buffer": "^4.3.0",
31
+ "buffer": "^6.0.3",
32
32
  "chalk": "^2.4.2",
33
33
  "console-browserify": "^1.2.0",
34
34
  "crypto-browserify": "^3.12.0",
@@ -64,12 +64,12 @@
64
64
  "@types/webpack-bundle-analyzer": "^4.6.0",
65
65
  "@typescript-eslint/eslint-plugin": "^5.62.0",
66
66
  "@typescript-eslint/parser": "^5.62.0",
67
- "eslint": "^7.32.0",
68
- "eslint-config-prettier": "^6.15.0",
69
- "eslint-plugin-prettier": "^3.4.1",
70
- "prettier": "2.8.8"
67
+ "eslint": "^8.47.0",
68
+ "eslint-config-prettier": "^9.0.0",
69
+ "eslint-plugin-prettier": "^5.0.0",
70
+ "prettier": "3.0.2"
71
71
  },
72
72
  "engines": {
73
73
  "node": ">=12.13.1"
74
74
  }
75
- }
75
+ }