@atlaspack/workers 2.14.21-typescript-08dcc1c9b.0 → 2.14.21-typescript-0c2081aca.0

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/lib/backend.js CHANGED
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.detectBackend = detectBackend;
7
7
  exports.getWorkerBackend = getWorkerBackend;
8
+ // flow-to-ts helpers
9
+
10
+ // /flow-to-ts helpers
11
+
8
12
  function detectBackend() {
9
13
  // @ts-expect-error TS2339
10
14
  if (process.browser) return 'web';
package/lib/child.js CHANGED
@@ -51,6 +51,9 @@ var _Handle2 = _interopRequireDefault(require("./Handle"));
51
51
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
52
52
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
53
53
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54
+ // flow-to-ts helpers
55
+
56
+ // /flow-to-ts helpers
54
57
  // The import of './Handle' should really be imported eagerly (with @babel/plugin-transform-modules-commonjs's lazy mode).
55
58
  const Handle = _Handle2.default;
56
59
  class Child {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/workers",
3
- "version": "2.14.21-typescript-08dcc1c9b.0",
3
+ "version": "2.14.21-typescript-0c2081aca.0",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "publishConfig": {
@@ -17,12 +17,12 @@
17
17
  "node": ">= 16.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "@atlaspack/build-cache": "2.13.4-typescript-08dcc1c9b.0",
21
- "@atlaspack/diagnostic": "2.14.2-typescript-08dcc1c9b.0",
22
- "@atlaspack/logger": "2.14.14-typescript-08dcc1c9b.0",
23
- "@atlaspack/profiler": "2.14.18-typescript-08dcc1c9b.0",
24
- "@atlaspack/types-internal": "2.15.3-typescript-08dcc1c9b.0",
25
- "@atlaspack/utils": "2.17.3-typescript-08dcc1c9b.0",
20
+ "@atlaspack/build-cache": "2.13.4-typescript-0c2081aca.0",
21
+ "@atlaspack/diagnostic": "2.14.2-typescript-0c2081aca.0",
22
+ "@atlaspack/logger": "2.14.14-typescript-0c2081aca.0",
23
+ "@atlaspack/profiler": "2.14.18-typescript-0c2081aca.0",
24
+ "@atlaspack/types-internal": "2.15.3-typescript-0c2081aca.0",
25
+ "@atlaspack/utils": "2.17.3-typescript-0c2081aca.0",
26
26
  "nullthrows": "^1.1.1"
27
27
  },
28
28
  "browser": {
@@ -33,5 +33,5 @@
33
33
  "scripts": {
34
34
  "check-ts": "tsc --noEmit"
35
35
  },
36
- "gitHead": "08dcc1c9bcdc6ab931d55e05ccc0f45669de2f22"
36
+ "gitHead": "0c2081aca1b5696646874aee2f776d43f1dbe894"
37
37
  }
package/src/backend.ts CHANGED
@@ -1,6 +1,9 @@
1
- import {Flow} from 'flow-to-typescript-codemod';
2
1
  import type {BackendType, WorkerImpl} from './types';
3
2
 
3
+ // flow-to-ts helpers
4
+ export type Class<T> = new (...args: any[]) => T;
5
+ // /flow-to-ts helpers
6
+
4
7
  export function detectBackend(): BackendType {
5
8
  // @ts-expect-error TS2339
6
9
  if (process.browser) return 'web';
@@ -19,7 +22,7 @@ export function detectBackend(): BackendType {
19
22
  }
20
23
  }
21
24
 
22
- export function getWorkerBackend(backend: BackendType): Flow.Class<WorkerImpl> {
25
+ export function getWorkerBackend(backend: BackendType): Class<WorkerImpl> {
23
26
  switch (backend) {
24
27
  case 'threads':
25
28
  return require('./threads/ThreadsWorker').default;
package/src/child.ts CHANGED
@@ -1,5 +1,3 @@
1
- import {Flow} from 'flow-to-typescript-codemod';
2
-
3
1
  import type {
4
2
  CallRequest,
5
3
  WorkerDataResponse,
@@ -21,6 +19,10 @@ import bus from './bus';
21
19
  import {SamplingProfiler, tracer} from '@atlaspack/profiler';
22
20
  import _Handle from './Handle';
23
21
 
22
+ // flow-to-ts helpers
23
+ export type Class<T> = new (...args: any[]) => T;
24
+ // /flow-to-ts helpers
25
+
24
26
  // The import of './Handle' should really be imported eagerly (with @babel/plugin-transform-modules-commonjs's lazy mode).
25
27
  const Handle = _Handle;
26
28
 
@@ -45,7 +47,7 @@ export class Child {
45
47
  sharedReferences: Map<SharedReference, unknown> = new Map();
46
48
  sharedReferencesByValue: Map<unknown, SharedReference> = new Map();
47
49
 
48
- constructor(ChildBackend: Flow.Class<ChildImpl>) {
50
+ constructor(ChildBackend: Class<ChildImpl>) {
49
51
  this.child = new ChildBackend(
50
52
  (m: WorkerMessage) => {
51
53
  this.messageListener(m);