@atlaspack/utils 2.15.3-alshdevreleasescript.0 → 2.15.3-alshintegrationtestslib.0
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/lib/index.js +15 -4
- package/lib/index.js.map +1 -1
- package/package.json +9 -9
package/lib/index.js
CHANGED
|
@@ -33887,7 +33887,7 @@ async function $d8ed9adb8bea7573$export$2e2bcd8739ae039(diagnostic, options, ter
|
|
|
33887
33887
|
let { origin: origin, message: message, stack: stack, codeFrames: codeFrames, hints: hints, skipFormatting: skipFormatting, documentationURL: documentationURL } = diagnostic;
|
|
33888
33888
|
const md = format === 'ansi' ? (0, ($parcel$interopDefault($iBiQ5$atlaspackmarkdownansi))) : (0, $96d5d01cd0db6227$export$2e2bcd8739ae039);
|
|
33889
33889
|
const terminalLink = format === 'ansi' ? (0, (/*@__PURE__*/$parcel$interopDefault($b071885206b3ac48$exports))) : // eslint-disable-next-line no-unused-vars
|
|
33890
|
-
(text, url)=>`<a href="${url}">${text}</a>`;
|
|
33890
|
+
(text, url, _)=>`<a href="${url}">${text}</a>`;
|
|
33891
33891
|
const chalk = format === 'ansi' ? (0, ($parcel$interopDefault($iBiQ5$chalk))) : {
|
|
33892
33892
|
gray: {
|
|
33893
33893
|
underline: (v)=>`<span style="color: grey; text-decoration: underline;">${v}</span>`
|
|
@@ -33975,13 +33975,14 @@ class $8b0b2852bcb1a5b2$export$2e2bcd8739ae039 {
|
|
|
33975
33975
|
add(fn) {
|
|
33976
33976
|
new Promise((resolve, reject)=>{
|
|
33977
33977
|
let i = this._count++;
|
|
33978
|
-
|
|
33978
|
+
let wrapped = ()=>fn().then((result)=>{
|
|
33979
33979
|
this._results[i] = result;
|
|
33980
33980
|
resolve(result);
|
|
33981
33981
|
}, (err)=>{
|
|
33982
33982
|
reject(err);
|
|
33983
33983
|
throw err;
|
|
33984
|
-
})
|
|
33984
|
+
});
|
|
33985
|
+
this._queue.push(wrapped);
|
|
33985
33986
|
for (const addFn of this._addSubscriptions)addFn();
|
|
33986
33987
|
if (this._numRunning > 0 && this._numRunning < this._maxConcurrent) this._next();
|
|
33987
33988
|
}).catch(()=>{});
|
|
@@ -34492,7 +34493,7 @@ function $7eb0d819da9341a5$export$2e2bcd8739ae039(fn, delay) {
|
|
|
34492
34493
|
|
|
34493
34494
|
function $3817081e001856b1$export$2e2bcd8739ae039(fn, delay) {
|
|
34494
34495
|
let lastCalled;
|
|
34495
|
-
return function(...args) {
|
|
34496
|
+
return function throttled(...args) {
|
|
34496
34497
|
if (lastCalled == null || lastCalled + delay <= Date.now()) {
|
|
34497
34498
|
fn.call(this, ...args);
|
|
34498
34499
|
lastCalled = Date.now();
|
|
@@ -36813,6 +36814,16 @@ function $1e1fa42764ee5f95$export$3477f9615e12f61d(obj) {
|
|
|
36813
36814
|
let $1e1fa42764ee5f95$var$testCache = {
|
|
36814
36815
|
};
|
|
36815
36816
|
function $1e1fa42764ee5f95$export$42462553d605d8cd(fs, filePath) {
|
|
36817
|
+
if (process.env.ATLASPACK_BUILD_ENV === 'test') // Development builds of these native modules are especially big and slow to hash.
|
|
36818
|
+
{
|
|
36819
|
+
if (/parcel-swc\.[^\\/]+\.node$|lightningcss.[^\\/]+.node$/.test(filePath)) {
|
|
36820
|
+
let cacheEntry = $1e1fa42764ee5f95$var$testCache[filePath];
|
|
36821
|
+
if (cacheEntry) return cacheEntry;
|
|
36822
|
+
let v = $1e1fa42764ee5f95$export$8a9ede1a78d6a1fe(fs.createReadStream(filePath));
|
|
36823
|
+
$1e1fa42764ee5f95$var$testCache[filePath] = v;
|
|
36824
|
+
return v;
|
|
36825
|
+
}
|
|
36826
|
+
}
|
|
36816
36827
|
return $1e1fa42764ee5f95$export$8a9ede1a78d6a1fe(fs.createReadStream(filePath));
|
|
36817
36828
|
}
|
|
36818
36829
|
|