@atlaspack/core 2.12.1-dev.3450 → 2.12.1-dev.3466

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.
Files changed (112) hide show
  1. package/lib/AssetGraph.js +5 -1
  2. package/lib/Atlaspack.js +2 -2
  3. package/lib/CommittedAsset.js +11 -5
  4. package/lib/Dependency.js +1 -1
  5. package/lib/PackagerRunner.js +53 -5
  6. package/lib/RequestTracker.js +10 -4
  7. package/lib/SymbolPropagation.js +25 -36
  8. package/lib/UncommittedAsset.js +8 -2
  9. package/lib/assetUtils.js +9 -3
  10. package/lib/atlaspack-v3/fs.js +31 -29
  11. package/lib/atlaspack-v3/index.js +2 -2
  12. package/lib/atlaspack-v3/jsCallable.js +9 -4
  13. package/lib/atlaspack-v3/worker/compat/asset-symbols.js +192 -0
  14. package/lib/atlaspack-v3/worker/compat/bitflags.js +84 -0
  15. package/lib/atlaspack-v3/worker/compat/dependency.js +44 -0
  16. package/lib/atlaspack-v3/worker/compat/environment.js +68 -0
  17. package/lib/atlaspack-v3/worker/compat/index.js +104 -0
  18. package/lib/atlaspack-v3/worker/compat/mutable-asset.js +144 -0
  19. package/lib/atlaspack-v3/worker/compat/plugin-config.js +58 -0
  20. package/lib/atlaspack-v3/worker/compat/plugin-logger.js +29 -0
  21. package/lib/atlaspack-v3/worker/compat/plugin-options.js +113 -0
  22. package/lib/atlaspack-v3/worker/compat/plugin-tracer.js +12 -0
  23. package/lib/atlaspack-v3/worker/compat/target.js +17 -0
  24. package/lib/atlaspack-v3/worker/worker.js +115 -127
  25. package/lib/index.js +0 -43
  26. package/lib/projectPath.js +12 -4
  27. package/lib/registerCoreWithSerializer.js +11 -5
  28. package/lib/requests/AtlaspackConfigRequest.js +8 -2
  29. package/lib/requests/ConfigRequest.js +9 -4
  30. package/lib/requests/DevDepRequest.js +9 -3
  31. package/lib/requests/PathRequest.js +8 -2
  32. package/lib/requests/WriteBundleRequest.js +15 -15
  33. package/lib/worker.js +8 -2
  34. package/package.json +24 -16
  35. package/src/AssetGraph.js +15 -13
  36. package/src/Atlaspack.js +5 -6
  37. package/src/AtlaspackConfig.js +11 -9
  38. package/src/AtlaspackConfig.schema.js +1 -1
  39. package/src/BundleGraph.js +83 -79
  40. package/src/CommittedAsset.js +5 -3
  41. package/src/Dependency.js +1 -1
  42. package/src/PackagerRunner.js +57 -9
  43. package/src/ReporterRunner.js +4 -4
  44. package/src/RequestTracker.js +19 -19
  45. package/src/SymbolPropagation.js +40 -52
  46. package/src/Transformation.js +12 -12
  47. package/src/UncommittedAsset.js +3 -3
  48. package/src/Validation.js +5 -5
  49. package/src/applyRuntimes.js +2 -2
  50. package/src/assetUtils.js +2 -2
  51. package/src/atlaspack-v3/AtlaspackV3.js +1 -1
  52. package/src/atlaspack-v3/fs.js +39 -25
  53. package/src/atlaspack-v3/index.js +1 -1
  54. package/src/atlaspack-v3/jsCallable.js +11 -10
  55. package/src/atlaspack-v3/worker/compat/asset-symbols.js +225 -0
  56. package/src/atlaspack-v3/worker/compat/bitflags.js +100 -0
  57. package/src/atlaspack-v3/worker/compat/dependency.js +83 -0
  58. package/src/atlaspack-v3/worker/compat/environment.js +92 -0
  59. package/src/atlaspack-v3/worker/compat/index.js +10 -0
  60. package/src/atlaspack-v3/worker/compat/mutable-asset.js +184 -0
  61. package/src/atlaspack-v3/worker/compat/plugin-config.js +94 -0
  62. package/src/atlaspack-v3/worker/compat/plugin-logger.js +47 -0
  63. package/src/atlaspack-v3/worker/compat/plugin-options.js +137 -0
  64. package/src/atlaspack-v3/worker/compat/plugin-tracer.js +11 -0
  65. package/src/atlaspack-v3/worker/compat/target.js +27 -0
  66. package/src/atlaspack-v3/worker/worker.js +148 -134
  67. package/src/dumpGraphToGraphViz.js +1 -1
  68. package/src/index.js +0 -10
  69. package/src/loadDotEnv.js +1 -1
  70. package/src/projectPath.js +12 -4
  71. package/src/public/Asset.js +1 -1
  72. package/src/public/Bundle.js +3 -3
  73. package/src/public/BundleGraph.js +20 -20
  74. package/src/public/Config.js +1 -1
  75. package/src/public/MutableBundleGraph.js +8 -8
  76. package/src/registerCoreWithSerializer.js +7 -4
  77. package/src/requests/AssetGraphRequest.js +10 -10
  78. package/src/requests/AssetGraphRequestRust.js +3 -3
  79. package/src/requests/AssetRequest.js +3 -3
  80. package/src/requests/AtlaspackConfigRequest.js +6 -4
  81. package/src/requests/BundleGraphRequest.js +6 -6
  82. package/src/requests/ConfigRequest.js +5 -6
  83. package/src/requests/DevDepRequest.js +8 -8
  84. package/src/requests/EntryRequest.js +2 -2
  85. package/src/requests/PathRequest.js +1 -1
  86. package/src/requests/TargetRequest.js +9 -8
  87. package/src/requests/ValidationRequest.js +2 -2
  88. package/src/requests/WriteBundleRequest.js +26 -20
  89. package/src/requests/WriteBundlesRequest.js +6 -6
  90. package/src/requests/asset-graph-diff.js +4 -4
  91. package/src/resolveOptions.js +3 -3
  92. package/src/serializerCore.browser.js +3 -2
  93. package/src/utils.js +2 -2
  94. package/src/worker.js +1 -1
  95. package/test/AtlaspackConfigRequest.test.js +1 -1
  96. package/test/BundleGraph.test.js +3 -3
  97. package/test/Dependency.test.js +28 -0
  98. package/test/PublicMutableBundleGraph.test.js +2 -2
  99. package/test/RequestTracker.test.js +7 -6
  100. package/test/SymbolPropagation.test.js +9 -9
  101. package/test/requests/ConfigRequest.test.js +3 -6
  102. package/test/utils.test.js +1 -1
  103. package/lib/atlaspack-v3/worker/compat.js +0 -57
  104. package/lib/buildCache.js +0 -18
  105. package/lib/serializer.js +0 -216
  106. package/lib/serializerCore.js +0 -16
  107. package/src/atlaspack-v3/worker/compat.js +0 -82
  108. package/src/buildCache.js +0 -15
  109. package/src/serializer.js +0 -255
  110. package/src/serializerCore.js +0 -5
  111. package/test/requests/WriteBundleRequest.test.js +0 -132
  112. package/test/serializer.test.js +0 -302
@@ -16,7 +16,13 @@ function _nullthrows() {
16
16
  return data;
17
17
  }
18
18
  var _assetUtils = require("../assetUtils");
19
- var _buildCache = require("../buildCache");
19
+ function _buildCache() {
20
+ const data = require("@atlaspack/build-cache");
21
+ _buildCache = function () {
22
+ return data;
23
+ };
24
+ return data;
25
+ }
20
26
  var _utils = require("../utils");
21
27
  var _projectPath = require("../projectPath");
22
28
  var _RequestTracker = require("../RequestTracker");
@@ -98,7 +104,7 @@ async function getDevDepRequests(api) {
98
104
 
99
105
  // Tracks dev deps that have been invalidated during this build
100
106
  // so we don't invalidate the require cache more than once.
101
- const invalidatedDevDeps = (0, _buildCache.createBuildCache)();
107
+ const invalidatedDevDeps = (0, _buildCache().createBuildCache)();
102
108
  function invalidateDevDeps(invalidDevDeps, options, config) {
103
109
  for (let {
104
110
  specifier,
@@ -142,7 +148,7 @@ async function runDevDepRequest(api, devDepRequest) {
142
148
 
143
149
  // A cache of plugin dependency hashes that we've already sent to the main thread.
144
150
  // Automatically cleared before each build.
145
- const pluginCache = (0, _buildCache.createBuildCache)();
151
+ const pluginCache = (0, _buildCache().createBuildCache)();
146
152
  function getWorkerDevDepRequests(devDepRequests) {
147
153
  return devDepRequests.map(devDepRequest => {
148
154
  // If we've already sent a matching transformer + hash to the main thread during this build,
@@ -48,7 +48,13 @@ var _AtlaspackConfigRequest = _interopRequireWildcard(require("./AtlaspackConfig
48
48
  var _utils2 = require("../utils");
49
49
  var _projectPath = require("../projectPath");
50
50
  var _types = require("../types");
51
- var _buildCache = require("../buildCache");
51
+ function _buildCache() {
52
+ const data = require("@atlaspack/build-cache");
53
+ _buildCache = function () {
54
+ return data;
55
+ };
56
+ return data;
57
+ }
52
58
  var _InternalConfig = require("../InternalConfig");
53
59
  var _ConfigRequest = require("./ConfigRequest");
54
60
  var _DevDepRequest = require("./DevDepRequest");
@@ -126,7 +132,7 @@ async function run({
126
132
  throw err;
127
133
  }
128
134
  }
129
- const configCache = (0, _buildCache.createBuildCache)();
135
+ const configCache = (0, _buildCache().createBuildCache)();
130
136
  class ResolverRunner {
131
137
  constructor({
132
138
  config,
@@ -4,14 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = createWriteBundleRequest;
7
- exports.replaceStream = replaceStream;
8
- function _rust() {
9
- const data = require("@atlaspack/rust");
10
- _rust = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
7
  var _constants = require("../constants");
16
8
  function _nullthrows() {
17
9
  const data = _interopRequireDefault(require("nullthrows"));
@@ -135,8 +127,16 @@ async function run({
135
127
  let writeOptions = publicBundle.env.isBrowser() || !mainEntry ? undefined : {
136
128
  mode: (await inputFS.stat(mainEntry.filePath)).mode
137
129
  };
138
- const contents = await options.cache.getBlob(cacheKeys.content);
139
- const size = contents.byteLength;
130
+ let contentStream;
131
+ if (info.isLargeBlob) {
132
+ contentStream = options.cache.getStream(cacheKeys.content);
133
+ } else {
134
+ contentStream = (0, _utils().blobToStream)(await options.cache.getBlob(cacheKeys.content));
135
+ }
136
+ let size = 0;
137
+ contentStream = contentStream.pipe(new (_utils().TapStream)(buf => {
138
+ size += buf.length;
139
+ }));
140
140
  let configResult = (0, _nullthrows().default)(await api.runRequest((0, _AtlaspackConfigRequest.default)()));
141
141
  let config = (0, _AtlaspackConfigRequest.getCachedAtlaspackConfig)(configResult, options);
142
142
  let {
@@ -144,9 +144,9 @@ async function run({
144
144
  invalidDevDeps
145
145
  } = await (0, _DevDepRequest.getDevDepRequests)(api);
146
146
  (0, _DevDepRequest.invalidateDevDeps)(invalidDevDeps, options, config);
147
- await writeFiles(contents, info, hashRefToNameHash, options, config, outputFS, filePath, writeOptions, devDeps, api);
147
+ await writeFiles(contentStream, info, hashRefToNameHash, options, config, outputFS, filePath, writeOptions, devDeps, api);
148
148
  if (mapKey && bundle.env.sourceMap && !bundle.env.sourceMap.inline && (await options.cache.has(mapKey))) {
149
- await writeFiles(await options.cache.getBlob(mapKey), info, hashRefToNameHash, options, config, outputFS, (0, _projectPath.toProjectPathUnsafe)((0, _projectPath.fromProjectPathRelative)(filePath) + '.map'), writeOptions, devDeps, api);
149
+ await writeFiles((0, _utils().blobToStream)(await options.cache.getBlob(mapKey)), info, hashRefToNameHash, options, config, outputFS, (0, _projectPath.toProjectPathUnsafe)((0, _projectPath.fromProjectPathRelative)(filePath) + '.map'), writeOptions, devDeps, api);
150
150
  }
151
151
  let res = {
152
152
  filePath,
@@ -159,13 +159,13 @@ async function run({
159
159
  api.storeResult(res);
160
160
  return res;
161
161
  }
162
- async function writeFiles(contents, info, hashRefToNameHash, options, config, outputFS, filePath, writeOptions, devDeps, api) {
162
+ async function writeFiles(inputStream, info, hashRefToNameHash, options, config, outputFS, filePath, writeOptions, devDeps, api) {
163
163
  let compressors = await config.getCompressors((0, _projectPath.fromProjectPathRelative)(filePath));
164
164
  let fullPath = (0, _projectPath.fromProjectPath)(options.projectRoot, filePath);
165
- const stream = info.hashReferences.length ? (0, _rust().replaceHashReferences)(contents, Object.fromEntries(hashRefToNameHash.entries())) : contents;
165
+ let stream = info.hashReferences.length ? inputStream.pipe(replaceStream(hashRefToNameHash)) : inputStream;
166
166
  let promises = [];
167
167
  for (let compressor of compressors) {
168
- promises.push(runCompressor(compressor, (0, _utils().blobToStream)(stream), options, outputFS, fullPath, writeOptions, devDeps, api));
168
+ promises.push(runCompressor(compressor, cloneStream(stream), options, outputFS, fullPath, writeOptions, devDeps, api));
169
169
  }
170
170
  await Promise.all(promises);
171
171
  }
package/lib/worker.js CHANGED
@@ -37,7 +37,13 @@ var _PackagerRunner = _interopRequireDefault(require("./PackagerRunner"));
37
37
  var _Validation = _interopRequireDefault(require("./Validation"));
38
38
  var _AtlaspackConfig = _interopRequireDefault(require("./AtlaspackConfig"));
39
39
  var _registerCoreWithSerializer = require("./registerCoreWithSerializer");
40
- var _buildCache = require("./buildCache");
40
+ function _buildCache() {
41
+ const data = require("@atlaspack/build-cache");
42
+ _buildCache = function () {
43
+ return data;
44
+ };
45
+ return data;
46
+ }
41
47
  function _sourceMap() {
42
48
  const data = require("@parcel/source-map");
43
49
  _sourceMap = function () {
@@ -105,7 +111,7 @@ async function loadConfig(cachePath, options) {
105
111
  }
106
112
  function clearConfigCache() {
107
113
  _utils().loadConfig.clear();
108
- (0, _buildCache.clearBuildCaches)();
114
+ (0, _buildCache().clearBuildCaches)();
109
115
  }
110
116
  async function runTransform(workerApi, opts) {
111
117
  let {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/core",
3
- "version": "2.12.1-dev.3450+58845ef87",
3
+ "version": "2.12.1-dev.3466+9a12fb8bd",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,20 +20,21 @@
20
20
  "check-ts": "tsc --noEmit index.d.ts"
21
21
  },
22
22
  "dependencies": {
23
- "@atlaspack/cache": "2.12.1-dev.3450+58845ef87",
24
- "@atlaspack/diagnostic": "2.12.1-dev.3450+58845ef87",
25
- "@atlaspack/events": "2.12.1-dev.3450+58845ef87",
26
- "@atlaspack/feature-flags": "2.12.1-dev.3450+58845ef87",
27
- "@atlaspack/fs": "2.12.1-dev.3450+58845ef87",
28
- "@atlaspack/graph": "3.2.1-dev.3450+58845ef87",
29
- "@atlaspack/logger": "2.12.1-dev.3450+58845ef87",
30
- "@atlaspack/package-manager": "2.12.1-dev.3450+58845ef87",
31
- "@atlaspack/plugin": "2.12.1-dev.3450+58845ef87",
32
- "@atlaspack/profiler": "2.12.1-dev.3450+58845ef87",
33
- "@atlaspack/rust": "2.12.1-dev.3450+58845ef87",
34
- "@atlaspack/types": "2.12.1-dev.3450+58845ef87",
35
- "@atlaspack/utils": "2.12.1-dev.3450+58845ef87",
36
- "@atlaspack/workers": "2.12.1-dev.3450+58845ef87",
23
+ "@atlaspack/build-cache": "2.12.1-dev.3466+9a12fb8bd",
24
+ "@atlaspack/cache": "2.12.1-dev.3466+9a12fb8bd",
25
+ "@atlaspack/diagnostic": "2.12.1-dev.3466+9a12fb8bd",
26
+ "@atlaspack/events": "2.12.1-dev.3466+9a12fb8bd",
27
+ "@atlaspack/feature-flags": "2.12.1-dev.3466+9a12fb8bd",
28
+ "@atlaspack/fs": "2.12.1-dev.3466+9a12fb8bd",
29
+ "@atlaspack/graph": "3.2.1-dev.3466+9a12fb8bd",
30
+ "@atlaspack/logger": "2.12.1-dev.3466+9a12fb8bd",
31
+ "@atlaspack/package-manager": "2.12.1-dev.3466+9a12fb8bd",
32
+ "@atlaspack/plugin": "2.12.1-dev.3466+9a12fb8bd",
33
+ "@atlaspack/profiler": "2.12.1-dev.3466+9a12fb8bd",
34
+ "@atlaspack/rust": "2.12.1-dev.3466+9a12fb8bd",
35
+ "@atlaspack/types": "2.12.1-dev.3466+9a12fb8bd",
36
+ "@atlaspack/utils": "2.12.1-dev.3466+9a12fb8bd",
37
+ "@atlaspack/workers": "2.12.1-dev.3466+9a12fb8bd",
37
38
  "@mischnic/json-sourcemap": "^0.1.0",
38
39
  "@parcel/source-map": "^2.1.1",
39
40
  "base-x": "^3.0.8",
@@ -54,8 +55,15 @@
54
55
  "rfdc": "1",
55
56
  "tempy": "^0.2.1"
56
57
  },
58
+ "exports": {
59
+ ".": "./lib/index.js",
60
+ "./worker": {
61
+ "development": "./src/worker.js",
62
+ "default": "./lib/worker.js"
63
+ }
64
+ },
57
65
  "browser": {
58
66
  "./src/serializerCore.js": "./src/serializerCore.browser.js"
59
67
  },
60
- "gitHead": "58845ef87446fcedb7d7d8876440c64184645cbb"
68
+ "gitHead": "9a12fb8bd1b72e407ed043e20337dc60fbec9cbe"
61
69
  }
package/src/AssetGraph.js CHANGED
@@ -168,13 +168,15 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
168
168
  nodes.push(node);
169
169
  }
170
170
  } else if (assetGroups) {
171
- nodes.push(
172
- ...assetGroups.map(assetGroup => nodeFromAssetGroup(assetGroup)),
173
- );
171
+ for (const assetGroup of assetGroups) {
172
+ // Adding nodes individually ensures we do not encounter a range stack size exceeded error
173
+ // when there are >100000 asset groups
174
+ nodes.push(nodeFromAssetGroup(assetGroup));
175
+ }
174
176
  }
175
177
  this.replaceNodeIdsConnectedTo(
176
178
  nullthrows(this.rootNodeId),
177
- nodes.map(node => this.addNode(node)),
179
+ nodes.map((node) => this.addNode(node)),
178
180
  );
179
181
  }
180
182
 
@@ -213,7 +215,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
213
215
 
214
216
  this.replaceNodeIdsConnectedTo(
215
217
  entrySpecifierNodeId,
216
- resolved.map(file => this.addNode(nodeFromEntryFile(file))),
218
+ resolved.map((file) => this.addNode(nodeFromEntryFile(file))),
217
219
  );
218
220
  }
219
221
 
@@ -222,7 +224,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
222
224
  targets: Array<Target>,
223
225
  correspondingRequest: string,
224
226
  ) {
225
- let depNodes = targets.map(target => {
227
+ let depNodes = targets.map((target) => {
226
228
  let node = nodeFromDep(
227
229
  // The passed project path is ignored in this case, because there is no `loc`
228
230
  createDependency('', {
@@ -254,7 +256,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
254
256
 
255
257
  this.replaceNodeIdsConnectedTo(
256
258
  entryNodeId,
257
- depNodes.map(node => this.addNode(node)),
259
+ depNodes.map((node) => this.addNode(node)),
258
260
  );
259
261
  }
260
262
 
@@ -340,7 +342,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
340
342
  let traversedNode = nullthrows(this.getNode(traversedNodeId));
341
343
  if (traversedNode.type === 'asset') {
342
344
  let hasDeferred = this.getNodeIdsConnectedFrom(traversedNodeId).some(
343
- childNodeId => {
345
+ (childNodeId) => {
344
346
  let childNode = nullthrows(this.getNode(childNodeId));
345
347
  return childNode.hasDeferred == null
346
348
  ? false
@@ -417,7 +419,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
417
419
 
418
420
  let deps = this.getIncomingDependencies(resolvedAsset);
419
421
 
420
- return deps.every(d => {
422
+ return deps.every((d) => {
421
423
  // If this dependency has already been through this process, and we
422
424
  // know it's not deferrable, then there's no need to re-check
423
425
  if (this.undeferredDependencies.has(d)) {
@@ -428,7 +430,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
428
430
  d.symbols &&
429
431
  !(d.env.isLibrary && d.isEntry) &&
430
432
  !d.symbols.has('*') &&
431
- ![...d.symbols.keys()].some(symbol => {
433
+ ![...d.symbols.keys()].some((symbol) => {
432
434
  let assetSymbol = resolvedAsset.symbols?.get(symbol)?.local;
433
435
  return assetSymbol != null && symbols.has(assetSymbol);
434
436
  });
@@ -532,7 +534,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
532
534
  };
533
535
  }
534
536
  let dependentAsset = dependentAssets.find(
535
- a => a.uniqueKey === dep.specifier,
537
+ (a) => a.uniqueKey === dep.specifier,
536
538
  );
537
539
  if (dependentAsset) {
538
540
  depNode.complete = true;
@@ -593,7 +595,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
593
595
  startNodeId: ?NodeId,
594
596
  ): ?TContext {
595
597
  return this.filteredTraverse(
596
- nodeId => {
598
+ (nodeId) => {
597
599
  let node = nullthrows(this.getNode(nodeId));
598
600
  return node.type === 'asset' ? node.value : null;
599
601
  },
@@ -631,7 +633,7 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
631
633
 
632
634
  let hash = new Hash();
633
635
  // TODO: sort??
634
- this.traverse(nodeId => {
636
+ this.traverse((nodeId) => {
635
637
  let node = nullthrows(this.getNode(nodeId));
636
638
  if (node.type === 'asset') {
637
639
  hash.writeString(nullthrows(node.value.outputHash));
package/src/Atlaspack.js CHANGED
@@ -1,5 +1,4 @@
1
1
  // @flow strict-local
2
-
3
2
  import type {
4
3
  Asset,
5
4
  AsyncSubscription,
@@ -58,7 +57,7 @@ import {
58
57
  } from './projectPath';
59
58
  import {tracer} from '@atlaspack/profiler';
60
59
  import {setFeatureFlags, DEFAULT_FEATURE_FLAGS} from '@atlaspack/feature-flags';
61
- import {AtlaspackV3, toFileSystemV3} from './atlaspack-v3';
60
+ import {AtlaspackV3, FileSystemV3} from './atlaspack-v3';
62
61
 
63
62
  registerCoreWithSerializer();
64
63
 
@@ -144,7 +143,7 @@ export default class Atlaspack {
144
143
  ? undefined
145
144
  : [entries],
146
145
  env: resolvedOptions.env,
147
- fs: inputFS && toFileSystemV3(inputFS),
146
+ fs: inputFS && new FileSystemV3(inputFS),
148
147
  defaultTargetOptions: {
149
148
  // $FlowFixMe projectPath is just a string
150
149
  distDir: resolvedOptions.defaultTargetOptions.distDir,
@@ -401,7 +400,7 @@ export default class Atlaspack {
401
400
  options,
402
401
  ),
403
402
  buildTime: Date.now() - startTime,
404
- requestBundle: async bundle => {
403
+ requestBundle: async (bundle) => {
405
404
  let bundleNode = bundleGraph._graph.getNodeByContentKey(bundle.id);
406
405
  invariant(bundleNode?.type === 'bundle', 'Bundle does not exist');
407
406
 
@@ -580,7 +579,7 @@ export default class Atlaspack {
580
579
  let res = await this.#requestTracker.runRequest(request, {
581
580
  force: true,
582
581
  });
583
- return res.map(asset =>
582
+ return res.map((asset) =>
584
583
  assetFromValue(asset, nullthrows(this.#resolvedOptions)),
585
584
  );
586
585
  }
@@ -648,7 +647,7 @@ export function createWorkerFarm(
648
647
  ...options,
649
648
  // $FlowFixMe
650
649
  workerPath: process.browser
651
- ? '@atlaspack/core/src/worker.js'
650
+ ? '@atlaspack/core/worker'
652
651
  : require.resolve('./worker'),
653
652
  });
654
653
  }
@@ -154,7 +154,7 @@ export default class AtlaspackConfig {
154
154
  loadPlugins<T>(
155
155
  plugins: PureAtlaspackConfigPipeline,
156
156
  ): Promise<Array<LoadedPlugin<T>>> {
157
- return Promise.all(plugins.map(p => this.loadPlugin<T>(p)));
157
+ return Promise.all(plugins.map((p) => this.loadPlugin<T>(p)));
158
158
  }
159
159
 
160
160
  async getResolvers(): Promise<Array<LoadedPlugin<Resolver<mixed>>>> {
@@ -181,7 +181,7 @@ export default class AtlaspackConfig {
181
181
  getValidatorNames(filePath: ProjectPath): Array<string> {
182
182
  let validators: PureAtlaspackConfigPipeline =
183
183
  this._getValidatorNodes(filePath);
184
- return validators.map(v => v.packageName);
184
+ return validators.map((v) => v.packageName);
185
185
  }
186
186
 
187
187
  getValidators(
@@ -193,8 +193,8 @@ export default class AtlaspackConfig {
193
193
 
194
194
  getNamedPipelines(): $ReadOnlyArray<string> {
195
195
  return Object.keys(this.transformers)
196
- .filter(glob => glob.includes(':'))
197
- .map(glob => glob.split(':')[0]);
196
+ .filter((glob) => glob.includes(':'))
197
+ .map((glob) => glob.split(':')[0]);
198
198
  }
199
199
 
200
200
  async getTransformers(
@@ -278,7 +278,9 @@ export default class AtlaspackConfig {
278
278
  // Pipelines for bundles come from their entry assets, so the pipeline likely exists in transformers.
279
279
  if (pipeline) {
280
280
  let prefix = pipeline + ':';
281
- if (!Object.keys(this.optimizers).some(glob => glob.startsWith(prefix))) {
281
+ if (
282
+ !Object.keys(this.optimizers).some((glob) => glob.startsWith(prefix))
283
+ ) {
282
284
  pipeline = null;
283
285
  }
284
286
  }
@@ -294,7 +296,7 @@ export default class AtlaspackConfig {
294
296
 
295
297
  getOptimizerNames(filePath: FilePath, pipeline: ?string): Array<string> {
296
298
  let optimizers = this._getOptimizerNodes(filePath, pipeline);
297
- return optimizers.map(o => o.packageName);
299
+ return optimizers.map((o) => o.packageName);
298
300
  }
299
301
 
300
302
  getOptimizers(
@@ -435,7 +437,7 @@ export default class AtlaspackConfig {
435
437
  configsWithPlugin = new Set(getConfigPaths(this.options, plugins));
436
438
  } else {
437
439
  configsWithPlugin = new Set(
438
- Object.keys(plugins).flatMap(k =>
440
+ Object.keys(plugins).flatMap((k) =>
439
441
  Array.isArray(plugins[k])
440
442
  ? getConfigPaths(this.options, plugins[k])
441
443
  : [getConfigPath(this.options, plugins[k])],
@@ -451,7 +453,7 @@ export default class AtlaspackConfig {
451
453
 
452
454
  let seenKey = false;
453
455
  let codeFrames = await Promise.all(
454
- [...configsWithPlugin].map(async filePath => {
456
+ [...configsWithPlugin].map(async (filePath) => {
455
457
  let configContents = await this.options.inputFS.readFile(
456
458
  filePath,
457
459
  'utf8',
@@ -481,7 +483,7 @@ export default class AtlaspackConfig {
481
483
 
482
484
  function getConfigPaths(options, nodes) {
483
485
  return nodes
484
- .map(node => (node !== '...' ? getConfigPath(options, node) : null))
486
+ .map((node) => (node !== '...' ? getConfigPath(options, node) : null))
485
487
  .filter(Boolean);
486
488
  }
487
489
 
@@ -96,7 +96,7 @@ export default {
96
96
  },
97
97
  bundler: {
98
98
  type: 'string',
99
- __validate: (validatePluginName('bundler', 'bundler'): string => void),
99
+ __validate: (validatePluginName('bundler', 'bundler'): (string) => void),
100
100
  },
101
101
  resolvers: (pipelineSchema('resolver', 'resolvers'): SchemaEntity),
102
102
  transformers: (mapPipelineSchema(