@ssa-ui-kit/core 3.20.0 → 3.20.1
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/dist/index.js +18 -6
- package/dist/index.mjs +18 -6
- package/dist/tsbuildcache +1 -1
- package/dist/utils/environment.d.ts +13 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -10356,14 +10356,26 @@ __webpack_require__.d(Drawer_index_parts_namespaceObject, {
|
|
|
10356
10356
|
* `if (true) return;` in the published bundle, silently, while still firing in
|
|
10357
10357
|
* this repo's Jest runs.
|
|
10358
10358
|
*
|
|
10359
|
-
* The
|
|
10360
|
-
*
|
|
10361
|
-
*
|
|
10362
|
-
*
|
|
10359
|
+
* The expression must be a *bare* `process.env.NODE_ENV`, with nothing guarding
|
|
10360
|
+
* it. Bundlers substitute that literal token sequence and nothing else: a
|
|
10361
|
+
* `typeof process === 'undefined'` check in front of it is left untouched, so
|
|
10362
|
+
* in a browser — where there is no `process` global — the guard returns `false`
|
|
10363
|
+
* before the correctly-substituted value is ever reached, and every diagnostic
|
|
10364
|
+
* goes dark for exactly the consumers they exist for. Same bug as the one
|
|
10365
|
+
* above, entered from the other side.
|
|
10366
|
+
*
|
|
10367
|
+
* `try/catch` keeps the guarantee the guard was there for: a runtime that never
|
|
10368
|
+
* defines `process` *and* whose bundler substituted nothing (a plain
|
|
10369
|
+
* `<script type="module">`, a bare worker) throws a ReferenceError, which is
|
|
10370
|
+
* caught here as silence rather than a crash. Erring toward silence is right —
|
|
10371
|
+
* no diagnostic is worth crashing a consumer over.
|
|
10363
10372
|
*/
|
|
10364
10373
|
const isDevEnvironment = () => {
|
|
10365
|
-
|
|
10366
|
-
|
|
10374
|
+
try {
|
|
10375
|
+
return process.env.NODE_ENV !== 'production';
|
|
10376
|
+
} catch {
|
|
10377
|
+
return false;
|
|
10378
|
+
}
|
|
10367
10379
|
};
|
|
10368
10380
|
;// ./src/utils/detectDuplicateInstance.ts
|
|
10369
10381
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -10085,14 +10085,26 @@ __webpack_require__.d(Drawer_index_parts_namespaceObject, {
|
|
|
10085
10085
|
* `if (true) return;` in the published bundle, silently, while still firing in
|
|
10086
10086
|
* this repo's Jest runs.
|
|
10087
10087
|
*
|
|
10088
|
-
* The
|
|
10089
|
-
*
|
|
10090
|
-
*
|
|
10091
|
-
*
|
|
10088
|
+
* The expression must be a *bare* `process.env.NODE_ENV`, with nothing guarding
|
|
10089
|
+
* it. Bundlers substitute that literal token sequence and nothing else: a
|
|
10090
|
+
* `typeof process === 'undefined'` check in front of it is left untouched, so
|
|
10091
|
+
* in a browser — where there is no `process` global — the guard returns `false`
|
|
10092
|
+
* before the correctly-substituted value is ever reached, and every diagnostic
|
|
10093
|
+
* goes dark for exactly the consumers they exist for. Same bug as the one
|
|
10094
|
+
* above, entered from the other side.
|
|
10095
|
+
*
|
|
10096
|
+
* `try/catch` keeps the guarantee the guard was there for: a runtime that never
|
|
10097
|
+
* defines `process` *and* whose bundler substituted nothing (a plain
|
|
10098
|
+
* `<script type="module">`, a bare worker) throws a ReferenceError, which is
|
|
10099
|
+
* caught here as silence rather than a crash. Erring toward silence is right —
|
|
10100
|
+
* no diagnostic is worth crashing a consumer over.
|
|
10092
10101
|
*/
|
|
10093
10102
|
const isDevEnvironment = () => {
|
|
10094
|
-
|
|
10095
|
-
|
|
10103
|
+
try {
|
|
10104
|
+
return process.env.NODE_ENV !== 'production';
|
|
10105
|
+
} catch {
|
|
10106
|
+
return false;
|
|
10107
|
+
}
|
|
10096
10108
|
};
|
|
10097
10109
|
;// ./src/utils/detectDuplicateInstance.ts
|
|
10098
10110
|
/**
|