@forge/bundler 4.2.1-next.8 → 4.3.0-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,18 @@
1
1
  # @forge/bundler
2
2
 
3
+ ## 4.3.0-next.10
4
+
5
+ ### Patch Changes
6
+
7
+ - @forge/cli-shared@3.5.1-next.6
8
+ - @forge/lint@3.2.13-next.6
9
+
10
+ ## 4.3.0-next.9
11
+
12
+ ### Minor Changes
13
+
14
+ - 1abacfd8: Fix tunnel debugger
15
+
3
16
  ## 4.2.1-next.8
4
17
 
5
18
  ### Patch Changes
package/out/webpack.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { IFs } from 'memfs';
1
2
  import webpack, { Compiler, Configuration as WebpackConfig } from 'webpack';
2
3
  import { Bundler, Watcher, InDiskBundler, BundlerOutput } from './types';
3
4
  import { FileSystemReader, FileSystemWriter } from '@forge/cli-shared';
@@ -5,7 +6,7 @@ import { LintLogger } from '@forge/lint';
5
6
  import { CommonWebpackConfig, ConfigBuilder, EntryPoint, FunctionsEntryPoint } from './config/common';
6
7
  export { EntryPoint };
7
8
  export declare function handleWebpackCompilationResult(err: Error | undefined, stats: webpack.Stats | undefined): asserts stats is webpack.Stats;
8
- export declare function getInMemoryBundle(config: CommonWebpackConfig): BundlerOutput;
9
+ export declare function getInMemoryBundle(config: CommonWebpackConfig, fileSystem?: IFs): BundlerOutput;
9
10
  interface CompilerOptions {
10
11
  writeToDisk?: boolean;
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../src/webpack.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,EAAE,EAAE,QAAQ,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EACL,OAAO,EAGP,OAAO,EAEP,aAAa,EACb,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAE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8 @@ const sandbox_1 = require("./config/sandbox");
12
12
  const node_1 = require("./config/node");
13
13
  const nativeui_1 = require("./config/nativeui");
14
14
  const compilerOutputFileSystem = (0, memfs_1.createFsFromVolume)(new memfs_1.Volume());
15
- const readMemoryFileSync = (filePath) => {
16
- return compilerOutputFileSystem.readFileSync(filePath, { encoding: 'utf8' }).toString();
15
+ const readMemoryFileSync = (outputFileSystem, filePath) => {
16
+ return outputFileSystem.readFileSync(filePath, { encoding: 'utf8' }).toString();
17
17
  };
18
18
  function handleWebpackCompilationResult(err, stats) {
19
19
  if (err) {
@@ -41,11 +41,16 @@ function handleWebpackCompilationResult(err, stats) {
41
41
  }
42
42
  }
43
43
  exports.handleWebpackCompilationResult = handleWebpackCompilationResult;
44
- function getInMemoryBundle(config) {
44
+ function getInMemoryBundle(config, fileSystem) {
45
45
  const output = {}, sourceMap = {};
46
+ const outputFileSystem = fileSystem || compilerOutputFileSystem;
46
47
  for (const name in config.entry) {
47
- output[name] = readMemoryFileSync(`/${name}.js`).toString();
48
- sourceMap[name] = readMemoryFileSync(`/${name}.js.map`).toString();
48
+ output[name] = readMemoryFileSync(outputFileSystem, `/${name}.js`).toString();
49
+ try {
50
+ sourceMap[name] = readMemoryFileSync(outputFileSystem, `/${name}.js.map`);
51
+ }
52
+ catch (e) {
53
+ }
49
54
  }
50
55
  return { output, sourceMap };
51
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bundler",
3
- "version": "4.2.1-next.8",
3
+ "version": "4.3.0-next.10",
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.10.0-next.2",
22
22
  "@forge/babel-plugin-transform-ui": "1.1.0",
23
- "@forge/cli-shared": "3.5.1-next.5",
24
- "@forge/lint": "3.2.13-next.5",
23
+ "@forge/cli-shared": "3.5.1-next.6",
24
+ "@forge/lint": "3.2.13-next.6",
25
25
  "@forge/util": "1.2.0",
26
26
  "assert": "^1.1.1",
27
27
  "babel-loader": "^8.2.3",