@atlaspack/runtime-react-refresh 2.14.5-canary.19 → 2.14.5-canary.190

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,209 @@
1
1
  # @atlaspack/runtime-react-refresh
2
2
 
3
+ ## 2.15.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`830261d`](https://github.com/atlassian-labs/atlaspack/commit/830261dcf4a40293090b61cab52fd75d5683c73f)]:
8
+ - @atlaspack/feature-flags@2.24.1
9
+ - @atlaspack/utils@2.19.1
10
+ - @atlaspack/plugin@2.14.29
11
+
12
+ ## 2.15.4
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767), [`a5081c3`](https://github.com/atlassian-labs/atlaspack/commit/a5081c3f9207d28716ee4edd3841de1830ea4b80), [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579), [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579), [`8843980`](https://github.com/atlassian-labs/atlaspack/commit/88439807be20025fd3433380204ff1205079729e)]:
17
+ - @atlaspack/feature-flags@2.24.0
18
+ - @atlaspack/utils@2.19.0
19
+ - @atlaspack/plugin@2.14.28
20
+
21
+ ## 2.15.3
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
26
+ - @atlaspack/feature-flags@2.23.2
27
+ - @atlaspack/utils@2.18.4
28
+ - @atlaspack/plugin@2.14.27
29
+
30
+ ## 2.15.2
31
+
32
+ ### Patch Changes
33
+
34
+ - [#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
35
+
36
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
37
+ - @atlaspack/feature-flags@2.23.1
38
+ - @atlaspack/plugin@2.14.26
39
+ - @atlaspack/utils@2.18.3
40
+
41
+ ## 2.15.1
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
46
+ - @atlaspack/feature-flags@2.23.0
47
+ - @atlaspack/utils@2.18.2
48
+ - @atlaspack/plugin@2.14.25
49
+
50
+ ## 2.15.0
51
+
52
+ ### Minor Changes
53
+
54
+ - [#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
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [[`73dd7ba`](https://github.com/atlassian-labs/atlaspack/commit/73dd7baab69456ef2f6e4a0cc7dbb04f407eb148)]:
59
+ - @atlaspack/feature-flags@2.22.0
60
+ - @atlaspack/utils@2.18.1
61
+ - @atlaspack/plugin@2.14.24
62
+
63
+ ## 2.14.23
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
68
+ - @atlaspack/feature-flags@2.21.0
69
+ - @atlaspack/utils@2.18.0
70
+ - @atlaspack/plugin@2.14.23
71
+
72
+ ## 2.14.22
73
+
74
+ ### Patch Changes
75
+
76
+ - [#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
77
+
78
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94), [`12bee0e`](https://github.com/atlassian-labs/atlaspack/commit/12bee0e23f0464d7f6bd3e24fbe0d19c126d587d)]:
79
+ - @atlaspack/feature-flags@2.20.1
80
+ - @atlaspack/plugin@2.14.22
81
+ - @atlaspack/utils@2.17.4
82
+
83
+ ## 2.14.21
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
88
+ - @atlaspack/feature-flags@2.20.0
89
+ - @atlaspack/utils@2.17.3
90
+ - @atlaspack/plugin@2.14.21
91
+
92
+ ## 2.14.20
93
+
94
+ ### Patch Changes
95
+
96
+ - [#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
97
+
98
+ - 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)]:
99
+ - @atlaspack/plugin@2.14.20
100
+ - @atlaspack/feature-flags@2.19.2
101
+ - @atlaspack/utils@2.17.2
102
+
103
+ ## 2.14.19
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [[`13aef17`](https://github.com/atlassian-labs/atlaspack/commit/13aef177eea289a6e40d2113b5ec1ac9be18a33d)]:
108
+ - @atlaspack/feature-flags@2.19.1
109
+ - @atlaspack/utils@2.17.1
110
+ - @atlaspack/plugin@2.14.19
111
+
112
+ ## 2.14.18
113
+
114
+ ### Patch Changes
115
+
116
+ - 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)]:
117
+ - @atlaspack/feature-flags@2.19.0
118
+ - @atlaspack/utils@2.17.0
119
+ - @atlaspack/plugin@2.14.18
120
+
121
+ ## 2.14.17
122
+
123
+ ### Patch Changes
124
+
125
+ - Updated dependencies []:
126
+ - @atlaspack/utils@2.16.1
127
+ - @atlaspack/plugin@2.14.17
128
+
129
+ ## 2.14.16
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies [[`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c), [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
134
+ - @atlaspack/feature-flags@2.18.4
135
+ - @atlaspack/utils@2.16.0
136
+ - @atlaspack/plugin@2.14.16
137
+
138
+ ## 2.14.15
139
+
140
+ ### Patch Changes
141
+
142
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be)]:
143
+ - @atlaspack/feature-flags@2.18.3
144
+ - @atlaspack/utils@2.15.3
145
+ - @atlaspack/plugin@2.14.15
146
+
147
+ ## 2.14.14
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
152
+ - @atlaspack/feature-flags@2.18.2
153
+ - @atlaspack/utils@2.15.2
154
+ - @atlaspack/plugin@2.14.14
155
+
156
+ ## 2.14.13
157
+
158
+ ### Patch Changes
159
+
160
+ - [#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
161
+
162
+ - Updated dependencies [[`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
163
+ - @atlaspack/feature-flags@2.18.1
164
+ - @atlaspack/utils@2.15.1
165
+ - @atlaspack/plugin@2.14.13
166
+
167
+ ## 2.14.12
168
+
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
172
+ - @atlaspack/utils@2.15.0
173
+ - @atlaspack/plugin@2.14.12
174
+
175
+ ## 2.14.11
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies []:
180
+ - @atlaspack/utils@2.14.11
181
+ - @atlaspack/plugin@2.14.11
182
+
183
+ ## 2.14.10
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies []:
188
+ - @atlaspack/plugin@2.14.10
189
+ - @atlaspack/utils@2.14.10
190
+
191
+ ## 2.14.9
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies []:
196
+ - @atlaspack/utils@2.14.9
197
+ - @atlaspack/plugin@2.14.9
198
+
199
+ ## 2.14.8
200
+
201
+ ### Patch Changes
202
+
203
+ - Updated dependencies []:
204
+ - @atlaspack/utils@2.14.8
205
+ - @atlaspack/plugin@2.14.8
206
+
3
207
  ## 2.14.7
4
208
 
5
209
  ### 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.19+a63b1da4d",
3
+ "version": "2.14.5-canary.190+7a52bab62",
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/ReactRefreshRuntime.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/plugin": "2.14.5-canary.19+a63b1da4d",
19
- "@atlaspack/utils": "2.14.5-canary.19+a63b1da4d",
19
+ "@atlaspack/feature-flags": "2.14.1-canary.258+7a52bab62",
20
+ "@atlaspack/plugin": "2.14.5-canary.190+7a52bab62",
21
+ "@atlaspack/utils": "2.14.5-canary.190+7a52bab62",
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": "a63b1da4d98a7eda8a2130700dc844a56aa8308e"
25
- }
26
+ "scripts": {
27
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
28
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
29
+ },
30
+ "gitHead": "7a52bab6281e8edbfa66af248eb6f872c6b4b7bd"
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
+ }