@forge/bundler 3.1.2-next.6 → 3.1.2-next.7

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
+ ## 3.1.2-next.7
4
+
5
+ ### Patch Changes
6
+
7
+ - d54a534: Fix console usage in ECMAScript modules
8
+ - @forge/cli-shared@3.2.0-next.7
9
+ - @forge/lint@3.2.6-next.7
10
+
3
11
  ## 3.1.2-next.6
4
12
 
5
13
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"node-webpack-config.d.ts","sourceRoot":"","sources":["../../src/bundler-config/node-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,WAAW,EAA0B,MAAM,YAAY,CAAC;AAEhF,eAAO,MAAM,yBAAyB,qCAAsC,aAAa,KAAG,aAc3F,CAAC"}
1
+ {"version":3,"file":"node-webpack-config.d.ts","sourceRoot":"","sources":["../../src/bundler-config/node-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,WAAW,EAA0B,MAAM,YAAY,CAAC;AAMhF,eAAO,MAAM,yBAAyB,qCAAsC,aAAa,KAAG,aAc3F,CAAC"}
@@ -5,13 +5,16 @@ const tslib_1 = require("tslib");
5
5
  const webpack_1 = tslib_1.__importDefault(require("webpack"));
6
6
  const path_1 = require("path");
7
7
  const webpack_2 = require("../webpack");
8
+ function bundleStubPath(filePath) {
9
+ return path_1.resolve(__dirname, '..', `${filePath}${path_1.extname(__filename)}`);
10
+ }
8
11
  exports.getNodeRuntimeBuildConfig = (entrypoints, config) => {
9
12
  const webpackConfig = webpack_2.getCommonWebpackConfig(entrypoints, config);
10
13
  const nodeConfigPlugin = new webpack_1.default.ProvidePlugin({
11
- api: path_1.resolve(path_1.join(__dirname, '..', 'forge-api')),
12
- 'global.api': path_1.resolve(path_1.join(__dirname, '..', 'forge-api')),
13
- console: path_1.resolve(path_1.join(__dirname, '..', 'console')),
14
- 'global.console': path_1.resolve(path_1.join(__dirname, '..', 'console'))
14
+ api: bundleStubPath('forge-api'),
15
+ 'global.api': bundleStubPath('forge-api'),
16
+ console: bundleStubPath('console'),
17
+ 'global.console': bundleStubPath('console')
15
18
  });
16
19
  webpackConfig.plugins.push(nodeConfigPlugin);
17
20
  webpackConfig.target = 'node14';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bundler",
3
- "version": "3.1.2-next.6",
3
+ "version": "3.1.2-next.7",
4
4
  "description": "Default bundler for Forge apps",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Atlassian",
@@ -20,8 +20,8 @@
20
20
  "@babel/preset-typescript": "^7.16.7",
21
21
  "@forge/api": "2.7.0",
22
22
  "@forge/babel-plugin-transform-ui": "1.1.0",
23
- "@forge/cli-shared": "3.2.0-next.6",
24
- "@forge/lint": "3.2.6-next.6",
23
+ "@forge/cli-shared": "3.2.0-next.7",
24
+ "@forge/lint": "3.2.6-next.7",
25
25
  "assert": "^1.1.1",
26
26
  "babel-loader": "^8.2.3",
27
27
  "browserify-zlib": "^0.2.0",