@backstage/cli 0.29.5 → 0.29.6
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,22 @@
|
|
|
1
1
|
# @backstage/cli
|
|
2
2
|
|
|
3
|
+
## 0.29.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8258dfb: Treat static file assets as always being free from side effects in package builds.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-model@1.7.3
|
|
10
|
+
- @backstage/cli-common@0.1.15
|
|
11
|
+
- @backstage/cli-node@0.2.12
|
|
12
|
+
- @backstage/config@1.3.2
|
|
13
|
+
- @backstage/config-loader@1.9.5
|
|
14
|
+
- @backstage/errors@1.2.7
|
|
15
|
+
- @backstage/eslint-plugin@0.1.10
|
|
16
|
+
- @backstage/integration@1.16.1
|
|
17
|
+
- @backstage/release-manifests@0.0.12
|
|
18
|
+
- @backstage/types@1.2.1
|
|
19
|
+
|
|
3
20
|
## 0.29.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -44,6 +44,21 @@ function forwardFileImports(options) {
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
options(inputOptions) {
|
|
47
|
+
const treeshake = inputOptions.treeshake;
|
|
48
|
+
if (treeshake !== void 0 && typeof treeshake !== "object") {
|
|
49
|
+
throw new Error(
|
|
50
|
+
"Expected treeshake input config to be an object or not set"
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
if (treeshake?.moduleSideEffects) {
|
|
54
|
+
throw new Error("treeshake.moduleSideEffects must not be set");
|
|
55
|
+
}
|
|
56
|
+
const moduleSideEffects = (id) => {
|
|
57
|
+
if (filter(id)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
};
|
|
47
62
|
const origExternal = inputOptions.external;
|
|
48
63
|
const external = (id, importer, isResolved) => {
|
|
49
64
|
if (typeof origExternal === "function" && origExternal(id, importer, isResolved)) {
|
|
@@ -62,7 +77,11 @@ function forwardFileImports(options) {
|
|
|
62
77
|
exportedFiles.add(fullId);
|
|
63
78
|
return true;
|
|
64
79
|
};
|
|
65
|
-
return {
|
|
80
|
+
return {
|
|
81
|
+
...inputOptions,
|
|
82
|
+
external,
|
|
83
|
+
treeshake: { ...treeshake, moduleSideEffects }
|
|
84
|
+
};
|
|
66
85
|
}
|
|
67
86
|
};
|
|
68
87
|
}
|