@forge/bundler 4.2.1-next.7 → 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 +20 -0
- package/out/webpack.d.ts +2 -1
- package/out/webpack.d.ts.map +1 -1
- package/out/webpack.js +10 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
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
|
+
|
|
16
|
+
## 4.2.1-next.8
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- @forge/cli-shared@3.5.1-next.5
|
|
21
|
+
- @forge/lint@3.2.13-next.5
|
|
22
|
+
|
|
3
23
|
## 4.2.1-next.7
|
|
4
24
|
|
|
5
25
|
### 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
|
}
|
package/out/webpack.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../src/webpack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../src/webpack.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,GAAG,EAAU,MAAM,OAAO,CAAC;AACxD,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,EAEL,gBAAgB,EAGhB,gBAAgB,EAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2B,UAAU,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAKtG,OAAO,EAAE,UAAU,EAAE,CAAC;AAQtB,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,KAAK,GAAG,SAAS,EACtB,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,SAAS,GAC/B,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAiChC;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,aAAa,CAiB9F;AAED,UAAU,eAAe;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,kBAAmB,aAAa,YAAY,eAAe,KAAG,QAOrF,CAAC;AA6BF,eAAO,MAAM,SAAS,YAEZ,UAAU,+EAGjB,QAAQ,IAAI,CAuBd,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,OAwBnB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,SAAS,UAAU,GAAG,UAAU,EAC9D,cAAc,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,aAAa,KAAK,mBAAmB,GACvF,OAAO,CAAC,EAAE,CAAC,CA8Bb;AAED,eAAO,MAAM,aAAa,EAAE,OAAuD,CAAC;AAEpF,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,mBAAmB,CAA4C,CAAC;AAEjG,eAAO,MAAM,cAAc,EAAE,aAkB5B,CAAC"}
|
package/out/webpack.js
CHANGED
|
@@ -12,8 +12,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
|
|
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
|
-
|
|
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.
|
|
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.
|
|
24
|
-
"@forge/lint": "3.2.13-next.
|
|
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",
|