@atlaspack/runtime-react-refresh 2.14.5-canary.17 → 2.14.5-canary.171

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,199 @@
1
1
  # @atlaspack/runtime-react-refresh
2
2
 
3
+ ## 2.15.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
8
+ - @atlaspack/feature-flags@2.23.2
9
+ - @atlaspack/utils@2.18.4
10
+ - @atlaspack/plugin@2.14.27
11
+
12
+ ## 2.15.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
17
+
18
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
19
+ - @atlaspack/feature-flags@2.23.1
20
+ - @atlaspack/plugin@2.14.26
21
+ - @atlaspack/utils@2.18.3
22
+
23
+ ## 2.15.1
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
28
+ - @atlaspack/feature-flags@2.23.0
29
+ - @atlaspack/utils@2.18.2
30
+ - @atlaspack/plugin@2.14.25
31
+
32
+ ## 2.15.0
33
+
34
+ ### Minor Changes
35
+
36
+ - [#732](https://github.com/atlassian-labs/atlaspack/pull/732) [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45) Thanks [@vykimnguyen](https://github.com/vykimnguyen)! - add tesseract context
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [[`73dd7ba`](https://github.com/atlassian-labs/atlaspack/commit/73dd7baab69456ef2f6e4a0cc7dbb04f407eb148)]:
41
+ - @atlaspack/feature-flags@2.22.0
42
+ - @atlaspack/utils@2.18.1
43
+ - @atlaspack/plugin@2.14.24
44
+
45
+ ## 2.14.23
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
50
+ - @atlaspack/feature-flags@2.21.0
51
+ - @atlaspack/utils@2.18.0
52
+ - @atlaspack/plugin@2.14.23
53
+
54
+ ## 2.14.22
55
+
56
+ ### Patch Changes
57
+
58
+ - [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
59
+
60
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94), [`12bee0e`](https://github.com/atlassian-labs/atlaspack/commit/12bee0e23f0464d7f6bd3e24fbe0d19c126d587d)]:
61
+ - @atlaspack/feature-flags@2.20.1
62
+ - @atlaspack/plugin@2.14.22
63
+ - @atlaspack/utils@2.17.4
64
+
65
+ ## 2.14.21
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
70
+ - @atlaspack/feature-flags@2.20.0
71
+ - @atlaspack/utils@2.17.3
72
+ - @atlaspack/plugin@2.14.21
73
+
74
+ ## 2.14.20
75
+
76
+ ### Patch Changes
77
+
78
+ - [#702](https://github.com/atlassian-labs/atlaspack/pull/702) [`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa) Thanks [@alshdavid](https://github.com/alshdavid)! - Fixes to Flow types
79
+
80
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa), [`1c7865a`](https://github.com/atlassian-labs/atlaspack/commit/1c7865a64451116d94015e248302435839d347c0), [`a0b959f`](https://github.com/atlassian-labs/atlaspack/commit/a0b959fbf61fc3f820ff03c7e8988945fe40a91a)]:
81
+ - @atlaspack/plugin@2.14.20
82
+ - @atlaspack/feature-flags@2.19.2
83
+ - @atlaspack/utils@2.17.2
84
+
85
+ ## 2.14.19
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies [[`13aef17`](https://github.com/atlassian-labs/atlaspack/commit/13aef177eea289a6e40d2113b5ec1ac9be18a33d)]:
90
+ - @atlaspack/feature-flags@2.19.1
91
+ - @atlaspack/utils@2.17.1
92
+ - @atlaspack/plugin@2.14.19
93
+
94
+ ## 2.14.18
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`c4415a4`](https://github.com/atlassian-labs/atlaspack/commit/c4415a455543d984ca28452c2cb87a794d22497c), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5), [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3), [`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417), [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56)]:
99
+ - @atlaspack/feature-flags@2.19.0
100
+ - @atlaspack/utils@2.17.0
101
+ - @atlaspack/plugin@2.14.18
102
+
103
+ ## 2.14.17
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies []:
108
+ - @atlaspack/utils@2.16.1
109
+ - @atlaspack/plugin@2.14.17
110
+
111
+ ## 2.14.16
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [[`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c), [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
116
+ - @atlaspack/feature-flags@2.18.4
117
+ - @atlaspack/utils@2.16.0
118
+ - @atlaspack/plugin@2.14.16
119
+
120
+ ## 2.14.15
121
+
122
+ ### Patch Changes
123
+
124
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be)]:
125
+ - @atlaspack/feature-flags@2.18.3
126
+ - @atlaspack/utils@2.15.3
127
+ - @atlaspack/plugin@2.14.15
128
+
129
+ ## 2.14.14
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
134
+ - @atlaspack/feature-flags@2.18.2
135
+ - @atlaspack/utils@2.15.2
136
+ - @atlaspack/plugin@2.14.14
137
+
138
+ ## 2.14.13
139
+
140
+ ### Patch Changes
141
+
142
+ - [#633](https://github.com/atlassian-labs/atlaspack/pull/633) [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b) Thanks [@sbhuiyan-atlassian](https://github.com/sbhuiyan-atlassian)! - Ported various HMR changes from Parcel
143
+
144
+ - Updated dependencies [[`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
145
+ - @atlaspack/feature-flags@2.18.1
146
+ - @atlaspack/utils@2.15.1
147
+ - @atlaspack/plugin@2.14.13
148
+
149
+ ## 2.14.12
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
154
+ - @atlaspack/utils@2.15.0
155
+ - @atlaspack/plugin@2.14.12
156
+
157
+ ## 2.14.11
158
+
159
+ ### Patch Changes
160
+
161
+ - Updated dependencies []:
162
+ - @atlaspack/utils@2.14.11
163
+ - @atlaspack/plugin@2.14.11
164
+
165
+ ## 2.14.10
166
+
167
+ ### Patch Changes
168
+
169
+ - Updated dependencies []:
170
+ - @atlaspack/plugin@2.14.10
171
+ - @atlaspack/utils@2.14.10
172
+
173
+ ## 2.14.9
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies []:
178
+ - @atlaspack/utils@2.14.9
179
+ - @atlaspack/plugin@2.14.9
180
+
181
+ ## 2.14.8
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies []:
186
+ - @atlaspack/utils@2.14.8
187
+ - @atlaspack/plugin@2.14.8
188
+
189
+ ## 2.14.7
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies []:
194
+ - @atlaspack/utils@2.14.7
195
+ - @atlaspack/plugin@2.14.7
196
+
3
197
  ## 2.14.6
4
198
 
5
199
  ### Patch Changes
@@ -19,7 +19,13 @@ function _utils() {
19
19
  return data;
20
20
  }
21
21
  var _package = require("react-refresh/package.json");
22
- // $FlowFixMe Package json is untyped
22
+ function _featureFlags() {
23
+ const data = require("@atlaspack/feature-flags");
24
+ _featureFlags = function () {
25
+ return data;
26
+ };
27
+ return data;
28
+ }
23
29
  const CODE = `
24
30
  var Refresh = require('react-refresh/runtime');
25
31
  var ErrorOverlay = require('react-error-overlay');
@@ -51,7 +57,13 @@ var _default = exports.default = new (_plugin().Runtime)({
51
57
  bundle,
52
58
  options
53
59
  }) {
54
- if (bundle.type !== 'js' || !options.hmrOptions || !bundle.env.isBrowser() || bundle.env.isLibrary || bundle.env.isWorker() || bundle.env.isWorklet() || options.mode !== 'development' || bundle.env.sourceType !== 'module') {
60
+ if ((0, _featureFlags().getFeatureFlag)('hmrImprovements')) {
61
+ // Note for https://jplat.atlassian.net/browse/JFP-3539:
62
+ // When cleaning up this feature flag, delete the entire
63
+ // @atlaspack/runtime-react-refresh package and remove all references to it
64
+ return;
65
+ }
66
+ if (bundle.type !== 'js' || !options.hmrOptions || !bundle.env.isBrowser() || bundle.env.isLibrary || bundle.env.isWorker() || bundle.env.isTesseract() || bundle.env.isWorklet() || options.mode !== 'development' || bundle.env.sourceType !== 'module') {
55
67
  return;
56
68
  }
57
69
  let entries = bundle.getEntryAssets();
@@ -0,0 +1,3 @@
1
+ import { Runtime } from '@atlaspack/plugin';
2
+ declare const _default: Runtime<unknown>;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/runtime-react-refresh",
3
- "version": "2.14.5-canary.17+a1773d2a6",
3
+ "version": "2.14.5-canary.171+f0349a6b9",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,17 +9,23 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/ReactRefreshRuntime.js",
13
- "source": "src/ReactRefreshRuntime.js",
12
+ "main": "./lib/ReactRefreshRuntime.js",
13
+ "source": "./src/ReactRefreshRuntime.ts",
14
+ "types": "./lib/types/ReactRefreshRuntime.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/plugin": "2.14.5-canary.17+a1773d2a6",
19
- "@atlaspack/utils": "2.14.5-canary.17+a1773d2a6",
19
+ "@atlaspack/feature-flags": "2.14.1-canary.239+f0349a6b9",
20
+ "@atlaspack/plugin": "2.14.5-canary.171+f0349a6b9",
21
+ "@atlaspack/utils": "2.14.5-canary.171+f0349a6b9",
20
22
  "react-error-overlay": "6.0.9",
21
- "react-refresh": ">=0.9 <=0.14"
23
+ "react-refresh": ">=0.9 <=0.16"
22
24
  },
23
25
  "type": "commonjs",
24
- "gitHead": "a1773d2a62d0ef7805ac7524621dcabcc1afe929"
26
+ "scripts": {
27
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
28
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
29
+ },
30
+ "gitHead": "f0349a6b9b04755088f121095ca6301a2ada3767"
25
31
  }
@@ -1,9 +1,7 @@
1
- // @flow strict-local
2
-
3
1
  import {Runtime} from '@atlaspack/plugin';
4
2
  import {loadConfig} from '@atlaspack/utils';
5
- // $FlowFixMe Package json is untyped
6
3
  import {version} from 'react-refresh/package.json';
4
+ import {getFeatureFlag} from '@atlaspack/feature-flags';
7
5
 
8
6
  const CODE = `
9
7
  var Refresh = require('react-refresh/runtime');
@@ -32,14 +30,22 @@ window.addEventListener('parcelhmraccept', () => {
32
30
  });
33
31
  `;
34
32
 
35
- export default (new Runtime({
33
+ export default new Runtime({
36
34
  async apply({bundle, options}) {
35
+ if (getFeatureFlag('hmrImprovements')) {
36
+ // Note for https://jplat.atlassian.net/browse/JFP-3539:
37
+ // When cleaning up this feature flag, delete the entire
38
+ // @atlaspack/runtime-react-refresh package and remove all references to it
39
+ return;
40
+ }
41
+
37
42
  if (
38
43
  bundle.type !== 'js' ||
39
44
  !options.hmrOptions ||
40
45
  !bundle.env.isBrowser() ||
41
46
  bundle.env.isLibrary ||
42
47
  bundle.env.isWorker() ||
48
+ bundle.env.isTesseract() ||
43
49
  bundle.env.isWorklet() ||
44
50
  options.mode !== 'development' ||
45
51
  bundle.env.sourceType !== 'module'
@@ -69,4 +75,4 @@ export default (new Runtime({
69
75
  }
70
76
  }
71
77
  },
72
- }): Runtime);
78
+ }) as Runtime<unknown>;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }