@atlaspack/runtime-js 2.12.1-canary.3587 → 2.12.1-canary.3588

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/runtime-js",
3
- "version": "2.12.1-canary.3587+8f31c246e",
3
+ "version": "2.12.1-canary.3588+c2c354003",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -12,15 +12,15 @@
12
12
  "main": "lib/JSRuntime.js",
13
13
  "source": "src/JSRuntime.js",
14
14
  "engines": {
15
- "atlaspack": "2.12.1-canary.3587+8f31c246e",
15
+ "atlaspack": "2.12.1-canary.3588+c2c354003",
16
16
  "node": ">= 16.0.0"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.12.1-canary.3587+8f31c246e",
20
- "@atlaspack/feature-flags": "2.12.1-canary.3587+8f31c246e",
21
- "@atlaspack/plugin": "2.12.1-canary.3587+8f31c246e",
22
- "@atlaspack/utils": "2.12.1-canary.3587+8f31c246e",
19
+ "@atlaspack/diagnostic": "2.12.1-canary.3588+c2c354003",
20
+ "@atlaspack/feature-flags": "2.12.1-canary.3588+c2c354003",
21
+ "@atlaspack/plugin": "2.12.1-canary.3588+c2c354003",
22
+ "@atlaspack/utils": "2.12.1-canary.3588+c2c354003",
23
23
  "nullthrows": "^1.1.1"
24
24
  },
25
- "gitHead": "8f31c246e157e2a474cda2d497f2d2144fa80be5"
25
+ "gitHead": "c2c354003cf6c999a93d60794dbce0d1a925ecbc"
26
26
  }
@@ -1,5 +1,7 @@
1
+ // @flow
1
2
  import assert from 'assert';
2
3
 
4
+ // $FlowFixMe importing TypeScript
3
5
  import {getBaseURL} from '../src/helpers/bundle-url-common';
4
6
 
5
7
  describe('getBaseUrl', () => {
@@ -1,7 +1,9 @@
1
+ // @flow
1
2
  import assert from 'assert';
2
3
 
3
4
  import {fsFixture, overlayFS, bundle} from '@atlaspack/test-utils';
4
5
 
6
+ // $FlowFixMe importing TypeScript
5
7
  import {getShardedBundleURL} from '../src/helpers/bundle-url-shards';
6
8
 
7
9
  const createErrorStack = (url) => {
@@ -25,12 +27,14 @@ Error
25
27
  describe('bundle-url-shards helper', () => {
26
28
  describe('getShardedBundleURL', () => {
27
29
  beforeEach(() => {
30
+ // $FlowFixMe
28
31
  delete globalThis.__ATLASPACK_ENABLE_DOMAIN_SHARDS;
29
32
  });
30
33
 
31
34
  it('should shard a URL if the global variable is set', () => {
32
35
  const testBundle = 'test-bundle.123abc.js';
33
36
 
37
+ // $FlowFixMe
34
38
  globalThis.__ATLASPACK_ENABLE_DOMAIN_SHARDS = true;
35
39
 
36
40
  const err = new Error();
@@ -46,6 +50,7 @@ describe('bundle-url-shards helper', () => {
46
50
  it('should re-shard a domain that has already been sharded', () => {
47
51
  const testBundle = 'TestBundle.1a2b3c.js';
48
52
 
53
+ // $FlowFixMe
49
54
  globalThis.__ATLASPACK_ENABLE_DOMAIN_SHARDS = true;
50
55
 
51
56
  const err = new Error();
@@ -113,6 +118,7 @@ describe('bundle-url-shards helper', () => {
113
118
  const mainBundle = bundleGraph
114
119
  .getBundles()
115
120
  .find((b) => b.name === 'index.js');
121
+ if (!mainBundle) return assert(mainBundle);
116
122
 
117
123
  const code = await overlayFS.readFile(mainBundle.filePath, 'utf-8');
118
124
  assert.ok(