@rspack/dev-server 0.1.1 → 0.1.3

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/server.d.ts.map +1 -1
  3. package/dist/server.js +26 -40
  4. package/dist/server.js.map +1 -1
  5. package/package.json +6 -6
  6. package/src/server.ts +35 -52
  7. package/tests/__snapshots__/normalizeOptions.test.ts.snap +6 -8
  8. package/tests/normalizeOptions.test.ts +6 -1
  9. package/tsconfig.tsbuildinfo +1 -1
  10. package/tests/e2e/hot-reaload.test.ts +0 -115
  11. package/tests/e2e-fixtures/react/app.jsx +0 -14
  12. package/tests/e2e-fixtures/react/index.css +0 -3
  13. package/tests/e2e-fixtures/react/index.html +0 -12
  14. package/tests/e2e-fixtures/react/index.jsx +0 -6
  15. package/tests/e2e-fixtures/react/node_modules/react/LICENSE +0 -21
  16. package/tests/e2e-fixtures/react/node_modules/react/README.md +0 -37
  17. package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-dev-runtime.development.js +0 -1296
  18. package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +0 -10
  19. package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +0 -10
  20. package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-runtime.development.js +0 -1314
  21. package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -11
  22. package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +0 -11
  23. package/tests/e2e-fixtures/react/node_modules/react/cjs/react.development.js +0 -2739
  24. package/tests/e2e-fixtures/react/node_modules/react/cjs/react.production.min.js +0 -26
  25. package/tests/e2e-fixtures/react/node_modules/react/cjs/react.shared-subset.development.js +0 -20
  26. package/tests/e2e-fixtures/react/node_modules/react/cjs/react.shared-subset.production.min.js +0 -10
  27. package/tests/e2e-fixtures/react/node_modules/react/index.js +0 -7
  28. package/tests/e2e-fixtures/react/node_modules/react/jsx-dev-runtime.js +0 -7
  29. package/tests/e2e-fixtures/react/node_modules/react/jsx-runtime.js +0 -7
  30. package/tests/e2e-fixtures/react/node_modules/react/package.json +0 -47
  31. package/tests/e2e-fixtures/react/node_modules/react/react.shared-subset.js +0 -7
  32. package/tests/e2e-fixtures/react/node_modules/react/umd/react.development.js +0 -3342
  33. package/tests/e2e-fixtures/react/node_modules/react/umd/react.production.min.js +0 -31
  34. package/tests/e2e-fixtures/react/node_modules/react/umd/react.profiling.min.js +0 -31
  35. package/tests/e2e-fixtures/react/node_modules/react-dom/LICENSE +0 -21
  36. package/tests/e2e-fixtures/react/node_modules/react-dom/README.md +0 -60
  37. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -7018
  38. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0 -93
  39. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js +0 -7078
  40. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js +0 -101
  41. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -7003
  42. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +0 -96
  43. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.node.development.js +0 -7059
  44. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.node.production.min.js +0 -102
  45. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-test-utils.development.js +0 -1741
  46. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +0 -40
  47. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom.development.js +0 -29868
  48. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom.production.min.js +0 -323
  49. package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom.profiling.min.js +0 -367
  50. package/tests/e2e-fixtures/react/node_modules/react-dom/client.js +0 -25
  51. package/tests/e2e-fixtures/react/node_modules/react-dom/index.js +0 -38
  52. package/tests/e2e-fixtures/react/node_modules/react-dom/package.json +0 -62
  53. package/tests/e2e-fixtures/react/node_modules/react-dom/profiling.js +0 -38
  54. package/tests/e2e-fixtures/react/node_modules/react-dom/server.browser.js +0 -17
  55. package/tests/e2e-fixtures/react/node_modules/react-dom/server.js +0 -3
  56. package/tests/e2e-fixtures/react/node_modules/react-dom/server.node.js +0 -17
  57. package/tests/e2e-fixtures/react/node_modules/react-dom/test-utils.js +0 -7
  58. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server-legacy.browser.development.js +0 -7015
  59. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server-legacy.browser.production.min.js +0 -75
  60. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server.browser.development.js +0 -7000
  61. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server.browser.production.min.js +0 -76
  62. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-test-utils.development.js +0 -1737
  63. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-test-utils.production.min.js +0 -33
  64. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom.development.js +0 -29869
  65. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom.production.min.js +0 -267
  66. package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom.profiling.min.js +0 -285
  67. package/tests/e2e-fixtures/react/node_modules/scheduler/LICENSE +0 -21
  68. package/tests/e2e-fixtures/react/node_modules/scheduler/README.md +0 -9
  69. package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +0 -700
  70. package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +0 -20
  71. package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +0 -207
  72. package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.min.js +0 -14
  73. package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler.development.js +0 -634
  74. package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler.production.min.js +0 -19
  75. package/tests/e2e-fixtures/react/node_modules/scheduler/index.js +0 -7
  76. package/tests/e2e-fixtures/react/node_modules/scheduler/package.json +0 -36
  77. package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +0 -699
  78. package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +0 -19
  79. package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler.development.js +0 -152
  80. package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler.production.min.js +0 -146
  81. package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler.profiling.min.js +0 -146
  82. package/tests/e2e-fixtures/react/node_modules/scheduler/unstable_mock.js +0 -7
  83. package/tests/e2e-fixtures/react/node_modules/scheduler/unstable_post_task.js +0 -7
  84. package/tests/e2e-fixtures/react/package.json +0 -8
  85. package/tests/e2e-fixtures/react/webpack.config.js +0 -26
  86. package/tests/helpers/emitFile.ts +0 -69
  87. package/tests/helpers/runBrowser.ts +0 -85
  88. package/tests/helpers/tempDir.ts +0 -58
@@ -1,19 +0,0 @@
1
- /**
2
- * @license React
3
- * scheduler-unstable_mock.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
- (function(){'use strict';(function(a,p){"object"===typeof exports&&"undefined"!==typeof module?p(exports):"function"===typeof define&&define.amd?define(["exports"],p):(a=a||self,p(a.SchedulerMock={}))})(this,function(a){function p(b,k){var c=b.length;b.push(k);a:for(;0<c;){var a=c-1>>>1,v=b[a];if(0<z(v,k))b[a]=k,b[c]=v,c=a;else break a}}function m(b){return 0===b.length?null:b[0]}function A(b){if(0===b.length)return null;var k=b[0],c=b.pop();if(c!==k){b[0]=c;a:for(var a=0,v=b.length,f=v>>>1;a<f;){var d=2*(a+
11
- 1)-1,g=b[d],e=d+1,h=b[e];if(0>z(g,c))e<v&&0>z(h,g)?(b[a]=h,b[e]=c,a=e):(b[a]=g,b[d]=c,a=d);else if(e<v&&0>z(h,c))b[a]=h,b[e]=c,a=e;else break a}}return k}function z(b,a){var k=b.sortIndex-a.sortIndex;return 0!==k?k:b.id-a.id}function D(b){for(var a=m(r);null!==a;){if(null===a.callback)A(r);else if(a.startTime<=b)A(r),a.sortIndex=a.expirationTime,p(n,a);else break;a=m(r)}}function E(b){y=!1;D(b);if(!u)if(null!==m(n))u=!0,f=F;else{var a=m(r);null!==a&&(b=a.startTime-b,q=E,t=g+b)}}function F(b,a){u=
12
- !1;y&&(y=!1,q=null,t=-1);B=!0;var c=d;try{D(a);for(h=m(n);null!==h&&(!(h.expirationTime>a)||b&&!I());){var k=h.callback;if("function"===typeof k){h.callback=null;d=h.priorityLevel;var e=k(h.expirationTime<=a);a=g;"function"===typeof e?h.callback=e:h===m(n)&&A(n);D(a)}else A(n);h=m(n)}if(null!==h)var f=!0;else{var l=m(r);if(null!==l){var p=l.startTime-a;q=E;t=g+p}f=!1}return f}finally{h=null,d=c,B=!1}}function I(){return 0===w&&null===l||-1!==w&&null!==l&&l.length>=w||G&&C?x=!0:!1}function J(){if(e)throw Error("Already flushing work.");
13
- if(null!==f){var b=f;e=!0;try{var a=!0;do a=b(!0,g);while(a);a||(f=null);return!0}finally{e=!1}}else return!1}var n=[],r=[],K=1,h=null,d=3,B=!1,u=!1,y=!1,g=0,f=null,q=null,t=-1,l=null,w=-1,x=!1,e=!1,C=!1,G=!1,H=!1;a.reset=function(){if(e)throw Error("Cannot reset while already flushing work.");g=0;q=f=null;t=-1;l=null;w=-1;C=e=x=!1};a.unstable_IdlePriority=5;a.unstable_ImmediatePriority=1;a.unstable_LowPriority=4;a.unstable_NormalPriority=3;a.unstable_Profiling=null;a.unstable_UserBlockingPriority=
14
- 2;a.unstable_advanceTime=function(b){"disabledLog"===console.log.name||H||(g+=b,null!==q&&t<=g&&(q(g),t=-1,q=null))};a.unstable_cancelCallback=function(b){b.callback=null};a.unstable_clearYields=function(){if(null===l)return[];var b=l;l=null;return b};a.unstable_continueExecution=function(){u||B||(u=!0,f=F)};a.unstable_flushAll=function(){if(null!==l)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");J();if(null!==l)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");
15
- };a.unstable_flushAllWithoutAsserting=J;a.unstable_flushExpired=function(){if(e)throw Error("Already flushing work.");if(null!==f){e=!0;try{f(!1,g)||(f=null)}finally{e=!1}}};a.unstable_flushNumberOfYields=function(b){if(e)throw Error("Already flushing work.");if(null!==f){var a=f;w=b;e=!0;try{b=!0;do b=a(!0,g);while(b&&!x);b||(f=null)}finally{w=-1,e=x=!1}}};a.unstable_flushUntilNextPaint=function(){if(e)throw Error("Already flushing work.");if(null!==f){var a=f;G=!0;C=!1;e=!0;try{var k=!0;do k=a(!0,
16
- g);while(k&&!x);k||(f=null)}finally{e=x=G=!1}}};a.unstable_forceFrameRate=function(){};a.unstable_getCurrentPriorityLevel=function(){return d};a.unstable_getFirstCallbackNode=function(){return m(n)};a.unstable_next=function(a){switch(d){case 1:case 2:case 3:var b=3;break;default:b=d}var c=d;d=b;try{return a()}finally{d=c}};a.unstable_now=function(){return g};a.unstable_pauseExecution=function(){};a.unstable_requestPaint=function(){C=!0};a.unstable_runWithPriority=function(a,e){switch(a){case 1:case 2:case 3:case 4:case 5:break;
17
- default:a=3}var b=d;d=a;try{return e()}finally{d=b}};a.unstable_scheduleCallback=function(a,e,c){var b=g;"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?b+c:b):c=b;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:K++,callback:e,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>b?(a.sortIndex=c,p(r,a),null===m(n)&&a===m(r)&&(y?(q=null,t=-1):y=!0,q=E,t=g+(c-b))):(a.sortIndex=d,p(n,a),u||B||(u=!0,
18
- f=F));return a};a.unstable_setDisableYieldValue=function(a){H=a};a.unstable_shouldYield=I;a.unstable_wrapCallback=function(a){var b=d;return function(){var c=d;d=b;try{return a.apply(this,arguments)}finally{d=c}}};a.unstable_yieldValue=function(a){"disabledLog"===console.log.name||H||(null===l?l=[a]:l.push(a))}});
19
- })();
@@ -1,152 +0,0 @@
1
- /**
2
- * @license React
3
- *
4
- * Copyright (c) Facebook, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
- /* eslint-disable max-len */
11
-
12
- 'use strict';
13
-
14
- (function(global, factory) {
15
- // eslint-disable-next-line no-unused-expressions
16
- typeof exports === 'object' && typeof module !== 'undefined'
17
- ? (module.exports = factory(require('react')))
18
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
19
- ? define(['react'], factory) // eslint-disable-line no-undef
20
- : (global.Scheduler = factory(global));
21
- })(this, function(global) {
22
- function unstable_now() {
23
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
24
- this,
25
- arguments
26
- );
27
- }
28
-
29
- function unstable_scheduleCallback() {
30
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
31
- this,
32
- arguments
33
- );
34
- }
35
-
36
- function unstable_cancelCallback() {
37
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
38
- this,
39
- arguments
40
- );
41
- }
42
-
43
- function unstable_shouldYield() {
44
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
45
- this,
46
- arguments
47
- );
48
- }
49
-
50
- function unstable_requestPaint() {
51
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
52
- this,
53
- arguments
54
- );
55
- }
56
-
57
- function unstable_runWithPriority() {
58
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
59
- this,
60
- arguments
61
- );
62
- }
63
-
64
- function unstable_next() {
65
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
66
- this,
67
- arguments
68
- );
69
- }
70
-
71
- function unstable_wrapCallback() {
72
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
73
- this,
74
- arguments
75
- );
76
- }
77
-
78
- function unstable_getCurrentPriorityLevel() {
79
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
80
- this,
81
- arguments
82
- );
83
- }
84
-
85
- function unstable_getFirstCallbackNode() {
86
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
87
- this,
88
- arguments
89
- );
90
- }
91
-
92
- function unstable_pauseExecution() {
93
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_pauseExecution.apply(
94
- this,
95
- arguments
96
- );
97
- }
98
-
99
- function unstable_continueExecution() {
100
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_continueExecution.apply(
101
- this,
102
- arguments
103
- );
104
- }
105
-
106
- function unstable_forceFrameRate() {
107
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
108
- this,
109
- arguments
110
- );
111
- }
112
-
113
- return Object.freeze({
114
- unstable_now: unstable_now,
115
- unstable_scheduleCallback: unstable_scheduleCallback,
116
- unstable_cancelCallback: unstable_cancelCallback,
117
- unstable_shouldYield: unstable_shouldYield,
118
- unstable_requestPaint: unstable_requestPaint,
119
- unstable_runWithPriority: unstable_runWithPriority,
120
- unstable_next: unstable_next,
121
- unstable_wrapCallback: unstable_wrapCallback,
122
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
123
- unstable_continueExecution: unstable_continueExecution,
124
- unstable_pauseExecution: unstable_pauseExecution,
125
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
126
- unstable_forceFrameRate: unstable_forceFrameRate,
127
- get unstable_IdlePriority() {
128
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
129
- .Scheduler.unstable_IdlePriority;
130
- },
131
- get unstable_ImmediatePriority() {
132
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
133
- .Scheduler.unstable_ImmediatePriority;
134
- },
135
- get unstable_LowPriority() {
136
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
137
- .Scheduler.unstable_LowPriority;
138
- },
139
- get unstable_NormalPriority() {
140
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
141
- .Scheduler.unstable_NormalPriority;
142
- },
143
- get unstable_UserBlockingPriority() {
144
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
145
- .Scheduler.unstable_UserBlockingPriority;
146
- },
147
- get unstable_Profiling() {
148
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
149
- .Scheduler.unstable_Profiling;
150
- },
151
- });
152
- });
@@ -1,146 +0,0 @@
1
- /**
2
- * @license React
3
- *
4
- * Copyright (c) Facebook, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
- /* eslint-disable max-len */
11
-
12
- 'use strict';
13
-
14
- (function(global, factory) {
15
- // eslint-disable-next-line no-unused-expressions
16
- typeof exports === 'object' && typeof module !== 'undefined'
17
- ? (module.exports = factory(require('react')))
18
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
19
- ? define(['react'], factory) // eslint-disable-line no-undef
20
- : (global.Scheduler = factory(global));
21
- })(this, function(global) {
22
- function unstable_now() {
23
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
24
- this,
25
- arguments
26
- );
27
- }
28
-
29
- function unstable_scheduleCallback() {
30
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
31
- this,
32
- arguments
33
- );
34
- }
35
-
36
- function unstable_cancelCallback() {
37
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
38
- this,
39
- arguments
40
- );
41
- }
42
-
43
- function unstable_shouldYield() {
44
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
45
- this,
46
- arguments
47
- );
48
- }
49
-
50
- function unstable_requestPaint() {
51
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
52
- this,
53
- arguments
54
- );
55
- }
56
-
57
- function unstable_runWithPriority() {
58
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
59
- this,
60
- arguments
61
- );
62
- }
63
-
64
- function unstable_next() {
65
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
66
- this,
67
- arguments
68
- );
69
- }
70
-
71
- function unstable_wrapCallback() {
72
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
73
- this,
74
- arguments
75
- );
76
- }
77
-
78
- function unstable_getCurrentPriorityLevel() {
79
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
80
- this,
81
- arguments
82
- );
83
- }
84
-
85
- function unstable_getFirstCallbackNode() {
86
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
87
- this,
88
- arguments
89
- );
90
- }
91
-
92
- function unstable_pauseExecution() {
93
- return undefined;
94
- }
95
-
96
- function unstable_continueExecution() {
97
- return undefined;
98
- }
99
-
100
- function unstable_forceFrameRate() {
101
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
102
- this,
103
- arguments
104
- );
105
- }
106
-
107
- return Object.freeze({
108
- unstable_now: unstable_now,
109
- unstable_scheduleCallback: unstable_scheduleCallback,
110
- unstable_cancelCallback: unstable_cancelCallback,
111
- unstable_shouldYield: unstable_shouldYield,
112
- unstable_requestPaint: unstable_requestPaint,
113
- unstable_runWithPriority: unstable_runWithPriority,
114
- unstable_next: unstable_next,
115
- unstable_wrapCallback: unstable_wrapCallback,
116
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
117
- unstable_continueExecution: unstable_continueExecution,
118
- unstable_pauseExecution: unstable_pauseExecution,
119
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
120
- unstable_forceFrameRate: unstable_forceFrameRate,
121
- get unstable_IdlePriority() {
122
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
123
- .Scheduler.unstable_IdlePriority;
124
- },
125
- get unstable_ImmediatePriority() {
126
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
127
- .Scheduler.unstable_ImmediatePriority;
128
- },
129
- get unstable_LowPriority() {
130
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
131
- .Scheduler.unstable_LowPriority;
132
- },
133
- get unstable_NormalPriority() {
134
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
135
- .Scheduler.unstable_NormalPriority;
136
- },
137
- get unstable_UserBlockingPriority() {
138
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
139
- .Scheduler.unstable_UserBlockingPriority;
140
- },
141
- get unstable_Profiling() {
142
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
143
- .Scheduler.unstable_Profiling;
144
- },
145
- });
146
- });
@@ -1,146 +0,0 @@
1
- /**
2
- * @license React
3
- *
4
- * Copyright (c) Facebook, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
- /* eslint-disable max-len */
11
-
12
- 'use strict';
13
-
14
- (function(global, factory) {
15
- // eslint-disable-next-line no-unused-expressions
16
- typeof exports === 'object' && typeof module !== 'undefined'
17
- ? (module.exports = factory(require('react')))
18
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
19
- ? define(['react'], factory) // eslint-disable-line no-undef
20
- : (global.Scheduler = factory(global));
21
- })(this, function(global) {
22
- function unstable_now() {
23
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
24
- this,
25
- arguments
26
- );
27
- }
28
-
29
- function unstable_scheduleCallback() {
30
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
31
- this,
32
- arguments
33
- );
34
- }
35
-
36
- function unstable_cancelCallback() {
37
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
38
- this,
39
- arguments
40
- );
41
- }
42
-
43
- function unstable_shouldYield() {
44
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
45
- this,
46
- arguments
47
- );
48
- }
49
-
50
- function unstable_requestPaint() {
51
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
52
- this,
53
- arguments
54
- );
55
- }
56
-
57
- function unstable_runWithPriority() {
58
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
59
- this,
60
- arguments
61
- );
62
- }
63
-
64
- function unstable_next() {
65
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
66
- this,
67
- arguments
68
- );
69
- }
70
-
71
- function unstable_wrapCallback() {
72
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
73
- this,
74
- arguments
75
- );
76
- }
77
-
78
- function unstable_getCurrentPriorityLevel() {
79
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
80
- this,
81
- arguments
82
- );
83
- }
84
-
85
- function unstable_getFirstCallbackNode() {
86
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
87
- this,
88
- arguments
89
- );
90
- }
91
-
92
- function unstable_pauseExecution() {
93
- return undefined;
94
- }
95
-
96
- function unstable_continueExecution() {
97
- return undefined;
98
- }
99
-
100
- function unstable_forceFrameRate() {
101
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
102
- this,
103
- arguments
104
- );
105
- }
106
-
107
- return Object.freeze({
108
- unstable_now: unstable_now,
109
- unstable_scheduleCallback: unstable_scheduleCallback,
110
- unstable_cancelCallback: unstable_cancelCallback,
111
- unstable_shouldYield: unstable_shouldYield,
112
- unstable_requestPaint: unstable_requestPaint,
113
- unstable_runWithPriority: unstable_runWithPriority,
114
- unstable_next: unstable_next,
115
- unstable_wrapCallback: unstable_wrapCallback,
116
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
117
- unstable_continueExecution: unstable_continueExecution,
118
- unstable_pauseExecution: unstable_pauseExecution,
119
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
120
- unstable_forceFrameRate: unstable_forceFrameRate,
121
- get unstable_IdlePriority() {
122
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
123
- .Scheduler.unstable_IdlePriority;
124
- },
125
- get unstable_ImmediatePriority() {
126
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
127
- .Scheduler.unstable_ImmediatePriority;
128
- },
129
- get unstable_LowPriority() {
130
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
131
- .Scheduler.unstable_LowPriority;
132
- },
133
- get unstable_NormalPriority() {
134
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
135
- .Scheduler.unstable_NormalPriority;
136
- },
137
- get unstable_UserBlockingPriority() {
138
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
139
- .Scheduler.unstable_UserBlockingPriority;
140
- },
141
- get unstable_Profiling() {
142
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
143
- .Scheduler.unstable_Profiling;
144
- },
145
- });
146
- });
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./cjs/scheduler-unstable_mock.production.min.js');
5
- } else {
6
- module.exports = require('./cjs/scheduler-unstable_mock.development.js');
7
- }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./cjs/scheduler-unstable_post_task.production.min.js');
5
- } else {
6
- module.exports = require('./cjs/scheduler-unstable_post_task.development.js');
7
- }
@@ -1,8 +0,0 @@
1
- {
2
- "name": "fixtures-react",
3
- "private": true,
4
- "dependencies": {
5
- "react": "18.2.0",
6
- "react-dom": "18.2.0"
7
- }
8
- }
@@ -1,26 +0,0 @@
1
- /** @type { import('@rspack/core').RspackOptions } */
2
- module.exports = {
3
- mode: "development",
4
- entry: "./index.jsx",
5
- devServer: {
6
- hot: true
7
- },
8
- caches: false,
9
- stats: "none",
10
- infrastructureLogging: {
11
- debug: false
12
- },
13
- builtins: {
14
- html: [
15
- {
16
- template: "./index.html"
17
- }
18
- ],
19
- define: {
20
- "process.env.NODE_ENV": JSON.stringify("development")
21
- }
22
- },
23
- watchOptions: {
24
- poll: true
25
- }
26
- };
@@ -1,69 +0,0 @@
1
- import fs from "node:fs";
2
- import WebSocket from "ws";
3
-
4
- async function waiting(ms: number): Promise<void> {
5
- return new Promise(resolve => {
6
- setTimeout(() => {
7
- resolve(undefined);
8
- }, ms);
9
- });
10
- }
11
-
12
- export async function editFile(
13
- filename: string,
14
- replacer: (str: string) => string
15
- ): Promise<void> {
16
- const content = fs.readFileSync(filename, "utf-8");
17
- const modified = replacer(content);
18
- fs.writeFileSync(filename, modified);
19
- return waiting(1000);
20
- }
21
-
22
- export async function waitingForBuild(port: number | string) {
23
- await new Promise(resolve => {
24
- const ws = new WebSocket(`ws://127.0.0.1:${port}/ws`, {
25
- headers: {
26
- host: `127.0.0.1:${port}`,
27
- origin: `http://127.0.0.1:${port}`
28
- }
29
- });
30
-
31
- let opened = false;
32
- let received = false;
33
- let errored = false;
34
-
35
- ws.on("error", error => {
36
- // @ts-ignore
37
- if (/404/.test(error)) {
38
- errored = true;
39
- } else {
40
- errored = true;
41
- }
42
-
43
- ws.close();
44
- });
45
-
46
- ws.on("open", () => {
47
- opened = true;
48
- });
49
-
50
- ws.on("message", data => {
51
- // @ts-ignore
52
- const message = JSON.parse(data);
53
-
54
- if (message.type === "ok") {
55
- received = true;
56
-
57
- ws.close();
58
- }
59
- });
60
-
61
- ws.on("close", () => {
62
- if (opened && received && !errored) {
63
- resolve(undefined);
64
- } else if (errored) {
65
- resolve(undefined);
66
- }
67
- });
68
- });
69
- }
@@ -1,85 +0,0 @@
1
- import puppeteer from "puppeteer";
2
- import type { Browser, Page } from "puppeteer";
3
-
4
- const puppeteerArgs = [
5
- "--disable-background-timer-throttling",
6
- "--disable-breakpad",
7
- "--disable-client-side-phishing-detection",
8
- "--disable-cloud-import",
9
- "--disable-default-apps",
10
- "--disable-dev-shm-usage",
11
- "--disable-extensions",
12
- "--disable-gesture-typing",
13
- "--disable-hang-monitor",
14
- "--disable-infobars",
15
- "--disable-notifications",
16
- "--disable-offer-store-unmasked-wallet-cards",
17
- "--disable-offer-upload-credit-cards",
18
- "--disable-popup-blocking",
19
- "--disable-print-preview",
20
- "--disable-prompt-on-repost",
21
- "--disable-setuid-sandbox",
22
- "--disable-speech-api",
23
- "--disable-sync",
24
- "--disable-tab-for-desktop-share",
25
- "--disable-translate",
26
- "--disable-voice-input",
27
- "--disable-wake-on-wifi",
28
- "--enable-async-dns",
29
- "--enable-simple-cache-backend",
30
- "--enable-tcp-fast-open",
31
- "--enable-webgl",
32
- "--hide-scrollbars",
33
- "--ignore-gpu-blacklist",
34
- "--media-cache-size=33554432",
35
- "--metrics-recording-only",
36
- "--mute-audio",
37
- "--no-default-browser-check",
38
- "--no-first-run",
39
- "--no-pings",
40
- "--no-sandbox",
41
- "--no-zygote",
42
- "--password-store=basic",
43
- "--prerender-from-omnibox=disabled",
44
- "--use-gl=swiftshader",
45
- "--use-mock-keychain"
46
- ];
47
-
48
- async function runBrowser(
49
- config?: any
50
- ): Promise<{ page: Page; browser: Browser }> {
51
- const options = {
52
- viewport: {
53
- width: 500,
54
- height: 500
55
- },
56
- userAgent: "",
57
- ...config
58
- };
59
-
60
- return new Promise((resolve, reject) => {
61
- let page: Page;
62
- let browser: Browser;
63
-
64
- puppeteer
65
- .launch({
66
- headless: true,
67
- ignoreHTTPSErrors: true,
68
- args: puppeteerArgs
69
- })
70
- .then(launchedBrowser => {
71
- browser = launchedBrowser;
72
-
73
- return browser.newPage();
74
- })
75
- .then(newPage => {
76
- page = newPage;
77
- page.emulate(options);
78
-
79
- resolve({ page, browser });
80
- })
81
- .catch(reject);
82
- });
83
- }
84
-
85
- export default runBrowser;