@atlaspack/core 2.19.0 → 2.19.1

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,21 @@
1
1
  # @atlaspack/core
2
2
 
3
+ ## 2.19.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`13aef17`](https://github.com/atlassian-labs/atlaspack/commit/13aef177eea289a6e40d2113b5ec1ac9be18a33d)]:
8
+ - @atlaspack/feature-flags@2.19.1
9
+ - @atlaspack/cache@3.2.14
10
+ - @atlaspack/fs@2.15.14
11
+ - @atlaspack/graph@3.5.8
12
+ - @atlaspack/utils@2.17.1
13
+ - @atlaspack/package-manager@2.14.19
14
+ - @atlaspack/profiler@2.14.16
15
+ - @atlaspack/types@2.15.9
16
+ - @atlaspack/workers@2.14.19
17
+ - @atlaspack/plugin@2.14.19
18
+
3
19
  ## 2.19.0
4
20
 
5
21
  ### Minor Changes
package/lib/Atlaspack.js CHANGED
@@ -128,32 +128,23 @@ const INTERNAL_TRANSFORM = exports.INTERNAL_TRANSFORM = Symbol('internal_transfo
128
128
  const INTERNAL_RESOLVE = exports.INTERNAL_RESOLVE = Symbol('internal_resolve');
129
129
  const WORKER_PATH = exports.WORKER_PATH = _path().default.join(__dirname, 'worker.js');
130
130
  class Atlaspack {
131
- #requestTracker /*: RequestTracker*/;
132
- #config /*: AtlaspackConfig*/;
133
- #farm /*: WorkerFarm*/;
134
- #initialized /*: boolean*/ = false;
135
- #disposable /*: Disposable */;
136
- #initialOptions /*: InitialAtlaspackOptions */;
137
- #reporterRunner /*: ReporterRunner*/;
138
- #resolvedOptions /*: ?AtlaspackOptions*/ = null;
139
- #optionsRef /*: SharedReference */;
140
- #watchAbortController /*: AbortController*/;
141
- #watchQueue /*: PromiseQueue<?BuildEvent>*/ = new (_utils2().PromiseQueue)({
131
+ #requestTracker;
132
+ #config;
133
+ #farm;
134
+ #initialized = false;
135
+ #disposable;
136
+ #initialOptions;
137
+ #reporterRunner;
138
+ #resolvedOptions = null;
139
+ #optionsRef;
140
+ #watchAbortController;
141
+ #watchQueue = new (_utils2().PromiseQueue)({
142
142
  maxConcurrent: 1
143
143
  });
144
- #watchEvents /*: ValueEmitter<
145
- | {|
146
- +error: Error,
147
- +buildEvent?: void,
148
- |}
149
- | {|
150
- +buildEvent: BuildEvent,
151
- +error?: void,
152
- |},
153
- > */;
154
- #watcherSubscription /*: ?AsyncSubscription*/;
155
- #watcherCount /*: number*/ = 0;
156
- #requestedAssetIds /*: Set<string>*/ = new Set();
144
+ #watchEvents;
145
+ #watcherSubscription;
146
+ #watcherCount = 0;
147
+ #requestedAssetIds = new Set();
157
148
  constructor(options) {
158
149
  this.#initialOptions = options;
159
150
  }
@@ -45,8 +45,7 @@ function assetFromValue(value, options) {
45
45
  }
46
46
  class BaseAsset {
47
47
  #asset;
48
- #query /*: ?URLSearchParams */;
49
-
48
+ #query;
50
49
  constructor(asset) {
51
50
  this.#asset = asset;
52
51
  _assetToAssetValue.set(this, asset.value);
@@ -128,9 +127,8 @@ class BaseAsset {
128
127
  }
129
128
  }
130
129
  class Asset extends BaseAsset {
131
- #asset /*: CommittedAsset | UncommittedAsset */;
132
- #env /*: ?Environment */;
133
-
130
+ #asset;
131
+ #env;
134
132
  constructor(asset) {
135
133
  let assetValueToAsset = asset.value.committed ? committedAssetValueToAsset : uncommittedAssetValueToAsset;
136
134
  let existing = assetValueToAsset.get(asset.value);
@@ -152,8 +150,7 @@ class Asset extends BaseAsset {
152
150
  }
153
151
  exports.Asset = Asset;
154
152
  class MutableAsset extends BaseAsset {
155
- #asset /*: UncommittedAsset */;
156
-
153
+ #asset;
157
154
  constructor(asset) {
158
155
  let existing = assetValueToMutableAsset.get(asset.value);
159
156
  if (existing != null) {
@@ -62,9 +62,9 @@ function bundleToInternalBundleGraph(bundle) {
62
62
  // preventing others from using them. They should use the static `get` method.
63
63
  let _private = {};
64
64
  class Bundle {
65
- #bundle /*: InternalBundle */;
66
- #bundleGraph /*: BundleGraph */;
67
- #options /*: AtlaspackOptions */;
65
+ #bundle;
66
+ #bundleGraph;
67
+ #options;
68
68
 
69
69
  // $FlowFixMe
70
70
  [inspect]() {
@@ -159,10 +159,9 @@ class Bundle {
159
159
  }
160
160
  exports.Bundle = Bundle;
161
161
  class NamedBundle extends Bundle {
162
- #bundle /*: InternalBundle */;
163
- #bundleGraph /*: BundleGraph */;
164
- #options /*: AtlaspackOptions */;
165
-
162
+ #bundle;
163
+ #bundleGraph;
164
+ #options;
166
165
  constructor(sentinel, bundle, bundleGraph, options) {
167
166
  super(sentinel, bundle, bundleGraph, options);
168
167
  this.#bundle = bundle; // Repeating for flow
@@ -193,11 +192,10 @@ class NamedBundle extends Bundle {
193
192
  }
194
193
  exports.NamedBundle = NamedBundle;
195
194
  class PackagedBundle extends NamedBundle {
196
- #bundle /*: InternalBundle */;
197
- #bundleGraph /*: BundleGraph */;
198
- #options /*: AtlaspackOptions */;
199
- #bundleInfo /*: ?PackagedBundleInfo */;
200
-
195
+ #bundle;
196
+ #bundleGraph;
197
+ #options;
198
+ #bundleInfo;
201
199
  constructor(sentinel, bundle, bundleGraph, options) {
202
200
  super(sentinel, bundle, bundleGraph, options);
203
201
  this.#bundle = bundle; // Repeating for flow
@@ -21,9 +21,8 @@ function bundleGroupToInternalBundleGroup(target) {
21
21
  }
22
22
  const inspect = Symbol.for('nodejs.util.inspect.custom');
23
23
  class BundleGroup {
24
- #bundleGroup /*: InternalBundleGroup */;
25
- #options /*: AtlaspackOptions */;
26
-
24
+ #bundleGroup;
25
+ #options;
27
26
  constructor(bundleGroup, options) {
28
27
  let existing = internalBundleGroupToBundleGroup.get(bundleGroup);
29
28
  if (existing != null) {
@@ -97,11 +97,10 @@ function makeConfigProxy(onRead, config) {
97
97
  return makeProxy(config, []);
98
98
  }
99
99
  class PublicConfig {
100
- #config /*: Config */;
101
- #pkg /*: ?PackageJSON */;
102
- #pkgFilePath /*: ?FilePath */;
103
- #options /*: AtlaspackOptions */;
104
-
100
+ #config;
101
+ #pkg;
102
+ #pkgFilePath;
103
+ #options;
105
104
  constructor(config, options) {
106
105
  let existing = internalConfigToConfig.get(options).get(config);
107
106
  if (existing != null) {
@@ -37,9 +37,8 @@ function getPublicDependency(dep, options) {
37
37
  return new Dependency(dep, options);
38
38
  }
39
39
  class Dependency {
40
- #dep /*: InternalDependency */;
41
- #options /*: AtlaspackOptions */;
42
-
40
+ #dep;
41
+ #options;
43
42
  constructor(dep, options) {
44
43
  this.#dep = dep;
45
44
  this.#options = options;
@@ -127,9 +127,8 @@ function environmentToInternalEnvironment(environment) {
127
127
  return (0, _nullthrows().default)(_environmentToInternalEnvironment.get(environment));
128
128
  }
129
129
  class Environment {
130
- #environment /*: InternalEnvironment */;
131
- #options /*: AtlaspackOptions */;
132
-
130
+ #environment;
131
+ #options;
133
132
  constructor(env, options) {
134
133
  let existing = internalEnvironmentToEnvironment.get(env);
135
134
  if (existing != null) {
@@ -54,9 +54,9 @@ function createBundleId(data) {
54
54
  return id;
55
55
  }
56
56
  class MutableBundleGraph extends _BundleGraph.default {
57
- #graph /*: InternalBundleGraph */;
58
- #options /*: AtlaspackOptions */;
59
- #bundlePublicIds /*: Set<string> */ = new Set();
57
+ #graph;
58
+ #options;
59
+ #bundlePublicIds = new Set();
60
60
  constructor(graph, options) {
61
61
  super(graph, _Bundle.Bundle.get.bind(_Bundle.Bundle), options);
62
62
  this.#graph = graph;
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  let parcelOptionsToPluginOptions = new WeakMap();
8
8
  class PluginOptions {
9
- #options /*: AtlaspackOptions */;
10
-
9
+ #options;
11
10
  constructor(options) {
12
11
  let existing = parcelOptionsToPluginOptions.get(options);
13
12
  if (existing != null) {
@@ -24,9 +24,8 @@ function targetToInternalTarget(target) {
24
24
  return (0, _nullthrows().default)(_targetToInternalTarget.get(target));
25
25
  }
26
26
  class Target {
27
- #target /*: TargetValue */;
28
- #options /*: AtlaspackOptions */;
29
-
27
+ #target;
28
+ #options;
30
29
  constructor(target, options) {
31
30
  let existing = internalTargetToTarget.get(target);
32
31
  if (existing != null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/core",
3
- "version": "2.19.0",
3
+ "version": "2.19.1",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,20 +23,20 @@
23
23
  "dependencies": {
24
24
  "@mischnic/json-sourcemap": "^0.1.0",
25
25
  "@atlaspack/build-cache": "2.13.3",
26
- "@atlaspack/cache": "3.2.13",
26
+ "@atlaspack/cache": "3.2.14",
27
27
  "@atlaspack/diagnostic": "2.14.1",
28
28
  "@atlaspack/events": "2.14.1",
29
- "@atlaspack/feature-flags": "2.19.0",
30
- "@atlaspack/fs": "2.15.13",
31
- "@atlaspack/graph": "3.5.7",
29
+ "@atlaspack/feature-flags": "2.19.1",
30
+ "@atlaspack/fs": "2.15.14",
31
+ "@atlaspack/graph": "3.5.8",
32
32
  "@atlaspack/logger": "2.14.13",
33
- "@atlaspack/package-manager": "2.14.18",
34
- "@atlaspack/plugin": "2.14.18",
35
- "@atlaspack/profiler": "2.14.15",
33
+ "@atlaspack/package-manager": "2.14.19",
34
+ "@atlaspack/plugin": "2.14.19",
35
+ "@atlaspack/profiler": "2.14.16",
36
36
  "@atlaspack/rust": "3.4.1",
37
- "@atlaspack/types": "2.15.8",
38
- "@atlaspack/utils": "2.17.0",
39
- "@atlaspack/workers": "2.14.18",
37
+ "@atlaspack/types": "2.15.9",
38
+ "@atlaspack/utils": "2.17.1",
39
+ "@atlaspack/workers": "2.14.19",
40
40
  "@parcel/source-map": "^2.1.1",
41
41
  "base-x": "^3.0.8",
42
42
  "browserslist": "^4.6.6",
package/src/Atlaspack.js CHANGED
@@ -72,20 +72,20 @@ export const INTERNAL_RESOLVE: symbol = Symbol('internal_resolve');
72
72
  export const WORKER_PATH: string = path.join(__dirname, 'worker.js');
73
73
 
74
74
  export default class Atlaspack {
75
- #requestTracker /*: RequestTracker*/;
76
- #config /*: AtlaspackConfig*/;
77
- #farm /*: WorkerFarm*/;
78
- #initialized /*: boolean*/ = false;
79
- #disposable /*: Disposable */;
80
- #initialOptions /*: InitialAtlaspackOptions */;
81
- #reporterRunner /*: ReporterRunner*/;
82
- #resolvedOptions /*: ?AtlaspackOptions*/ = null;
83
- #optionsRef /*: SharedReference */;
84
- #watchAbortController /*: AbortController*/;
85
- #watchQueue /*: PromiseQueue<?BuildEvent>*/ = new PromiseQueue<?BuildEvent>({
75
+ #requestTracker: RequestTracker;
76
+ #config: AtlaspackConfig;
77
+ #farm: WorkerFarm;
78
+ #initialized: boolean = false;
79
+ #disposable: Disposable;
80
+ #initialOptions: InitialAtlaspackOptions;
81
+ #reporterRunner: ReporterRunner;
82
+ #resolvedOptions: ?AtlaspackOptions = null;
83
+ #optionsRef: SharedReference;
84
+ #watchAbortController: AbortController;
85
+ #watchQueue: PromiseQueue<?BuildEvent> = new PromiseQueue<?BuildEvent>({
86
86
  maxConcurrent: 1,
87
87
  });
88
- #watchEvents /*: ValueEmitter<
88
+ #watchEvents: ValueEmitter<
89
89
  | {|
90
90
  +error: Error,
91
91
  +buildEvent?: void,
@@ -94,14 +94,14 @@ export default class Atlaspack {
94
94
  +buildEvent: BuildEvent,
95
95
  +error?: void,
96
96
  |},
97
- > */;
98
- #watcherSubscription /*: ?AsyncSubscription*/;
99
- #watcherCount /*: number*/ = 0;
100
- #requestedAssetIds /*: Set<string>*/ = new Set();
97
+ >;
98
+ #watcherSubscription: ?AsyncSubscription;
99
+ #watcherCount: number = 0;
100
+ #requestedAssetIds: Set<string> = new Set();
101
101
 
102
102
  rustAtlaspack: AtlaspackV3 | null | void;
103
103
 
104
- isProfiling /*: boolean */;
104
+ isProfiling: boolean;
105
105
 
106
106
  constructor(options: InitialAtlaspackOptions) {
107
107
  this.#initialOptions = options;
@@ -81,7 +81,7 @@ export function assetFromValue(
81
81
 
82
82
  class BaseAsset {
83
83
  #asset: CommittedAsset | UncommittedAsset;
84
- #query /*: ?URLSearchParams */;
84
+ #query: ?URLSearchParams;
85
85
 
86
86
  constructor(asset: CommittedAsset | UncommittedAsset) {
87
87
  this.#asset = asset;
@@ -195,8 +195,8 @@ class BaseAsset {
195
195
  }
196
196
 
197
197
  export class Asset extends BaseAsset implements IAsset {
198
- #asset /*: CommittedAsset | UncommittedAsset */;
199
- #env /*: ?Environment */;
198
+ #asset: CommittedAsset | UncommittedAsset;
199
+ #env: ?Environment;
200
200
 
201
201
  constructor(asset: CommittedAsset | UncommittedAsset): Asset {
202
202
  let assetValueToAsset = asset.value.committed
@@ -227,7 +227,7 @@ export class Asset extends BaseAsset implements IAsset {
227
227
  }
228
228
 
229
229
  export class MutableAsset extends BaseAsset implements IMutableAsset {
230
- #asset /*: UncommittedAsset */;
230
+ #asset: UncommittedAsset;
231
231
 
232
232
  constructor(asset: UncommittedAsset): MutableAsset {
233
233
  let existing = assetValueToMutableAsset.get(asset.value);
@@ -68,9 +68,9 @@ export function bundleToInternalBundleGraph(bundle: IBundle): BundleGraph {
68
68
  let _private = {};
69
69
 
70
70
  export class Bundle implements IBundle {
71
- #bundle /*: InternalBundle */;
72
- #bundleGraph /*: BundleGraph */;
73
- #options /*: AtlaspackOptions */;
71
+ #bundle: InternalBundle;
72
+ #bundleGraph: BundleGraph;
73
+ #options: AtlaspackOptions;
74
74
 
75
75
  // $FlowFixMe
76
76
  [inspect]() {
@@ -214,9 +214,9 @@ export class Bundle implements IBundle {
214
214
  }
215
215
 
216
216
  export class NamedBundle extends Bundle implements INamedBundle {
217
- #bundle /*: InternalBundle */;
218
- #bundleGraph /*: BundleGraph */;
219
- #options /*: AtlaspackOptions */;
217
+ #bundle: InternalBundle;
218
+ #bundleGraph: BundleGraph;
219
+ #options: AtlaspackOptions;
220
220
 
221
221
  constructor(
222
222
  sentinel: mixed,
@@ -268,10 +268,10 @@ export class NamedBundle extends Bundle implements INamedBundle {
268
268
  }
269
269
 
270
270
  export class PackagedBundle extends NamedBundle implements IPackagedBundle {
271
- #bundle /*: InternalBundle */;
272
- #bundleGraph /*: BundleGraph */;
273
- #options /*: AtlaspackOptions */;
274
- #bundleInfo /*: ?PackagedBundleInfo */;
271
+ #bundle: InternalBundle;
272
+ #bundleGraph: BundleGraph;
273
+ #options: AtlaspackOptions;
274
+ #bundleInfo: ?PackagedBundleInfo;
275
275
 
276
276
  constructor(
277
277
  sentinel: mixed,
@@ -28,8 +28,8 @@ export function bundleGroupToInternalBundleGroup(
28
28
  const inspect = Symbol.for('nodejs.util.inspect.custom');
29
29
 
30
30
  export default class BundleGroup implements IBundleGroup {
31
- #bundleGroup /*: InternalBundleGroup */;
32
- #options /*: AtlaspackOptions */;
31
+ #bundleGroup: InternalBundleGroup;
32
+ #options: AtlaspackOptions;
33
33
 
34
34
  constructor(
35
35
  bundleGroup: InternalBundleGroup,
@@ -104,10 +104,10 @@ export function makeConfigProxy<T>(
104
104
  }
105
105
 
106
106
  export default class PublicConfig implements IConfig {
107
- #config /*: Config */;
108
- #pkg /*: ?PackageJSON */;
109
- #pkgFilePath /*: ?FilePath */;
110
- #options /*: AtlaspackOptions */;
107
+ #config: Config;
108
+ #pkg: ?PackageJSON;
109
+ #pkgFilePath: ?FilePath;
110
+ #options: AtlaspackOptions;
111
111
 
112
112
  constructor(config: Config, options: AtlaspackOptions): PublicConfig {
113
113
  let existing = internalConfigToConfig.get(options).get(config);
@@ -59,8 +59,8 @@ export function getPublicDependency(
59
59
  }
60
60
 
61
61
  export default class Dependency implements IDependency {
62
- #dep /*: InternalDependency */;
63
- #options /*: AtlaspackOptions */;
62
+ #dep: InternalDependency;
63
+ #options: AtlaspackOptions;
64
64
 
65
65
  constructor(dep: InternalDependency, options: AtlaspackOptions): Dependency {
66
66
  this.#dep = dep;
@@ -156,8 +156,8 @@ export function environmentToInternalEnvironment(
156
156
  }
157
157
 
158
158
  export default class Environment implements IEnvironment {
159
- #environment /*: InternalEnvironment */;
160
- #options /*: AtlaspackOptions */;
159
+ #environment: InternalEnvironment;
160
+ #options: AtlaspackOptions;
161
161
 
162
162
  constructor(
163
163
  env: InternalEnvironment,
@@ -55,9 +55,9 @@ export default class MutableBundleGraph
55
55
  extends BundleGraph<IBundle>
56
56
  implements IMutableBundleGraph
57
57
  {
58
- #graph /*: InternalBundleGraph */;
59
- #options /*: AtlaspackOptions */;
60
- #bundlePublicIds /*: Set<string> */ = new Set<string>();
58
+ #graph: InternalBundleGraph;
59
+ #options: AtlaspackOptions;
60
+ #bundlePublicIds: Set<string> = new Set<string>();
61
61
 
62
62
  constructor(graph: InternalBundleGraph, options: AtlaspackOptions) {
63
63
  super(graph, Bundle.get.bind(Bundle), options);
@@ -18,7 +18,7 @@ let parcelOptionsToPluginOptions: WeakMap<AtlaspackOptions, PluginOptions> =
18
18
  new WeakMap();
19
19
 
20
20
  export default class PluginOptions implements IPluginOptions {
21
- #options /*: AtlaspackOptions */;
21
+ #options: AtlaspackOptions;
22
22
 
23
23
  constructor(options: AtlaspackOptions): PluginOptions {
24
24
  let existing = parcelOptionsToPluginOptions.get(options);
@@ -22,8 +22,8 @@ export function targetToInternalTarget(target: ITarget): TargetValue {
22
22
  }
23
23
 
24
24
  export default class Target implements ITarget {
25
- #target /*: TargetValue */;
26
- #options /*: AtlaspackOptions */;
25
+ #target: TargetValue;
26
+ #options: AtlaspackOptions;
27
27
 
28
28
  constructor(target: TargetValue, options: AtlaspackOptions): Target {
29
29
  let existing = internalTargetToTarget.get(target);