@atlaspack/utils 2.16.1-unified-e330ff3d9.0 → 2.16.2-noselfbuild-3f2849b52.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/CHANGELOG.md +8 -0
- package/lib/index.js +15 -4
- package/lib/index.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaspack/utils
|
|
2
2
|
|
|
3
|
+
## 2.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c75bf55`](https://github.com/atlassian-labs/atlaspack/commit/c75bf553fff4decc285b5fd499a275853b18f8f2)]:
|
|
8
|
+
- @atlaspack/rust@3.4.0
|
|
9
|
+
- @atlaspack/logger@2.14.12
|
|
10
|
+
|
|
3
11
|
## 2.16.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/lib/index.js
CHANGED
|
@@ -33888,7 +33888,7 @@ async function $d8ed9adb8bea7573$export$2e2bcd8739ae039(diagnostic, options, ter
|
|
|
33888
33888
|
let { origin: origin, message: message, stack: stack, codeFrames: codeFrames, hints: hints, skipFormatting: skipFormatting, documentationURL: documentationURL } = diagnostic;
|
|
33889
33889
|
const md = format === 'ansi' ? (0, ($parcel$interopDefault($iBiQ5$atlaspackmarkdownansi))) : (0, $96d5d01cd0db6227$export$2e2bcd8739ae039);
|
|
33890
33890
|
const terminalLink = format === 'ansi' ? (0, (/*@__PURE__*/$parcel$interopDefault($b071885206b3ac48$exports))) : // eslint-disable-next-line no-unused-vars
|
|
33891
|
-
(text, url)=>`<a href="${url}">${text}</a>`;
|
|
33891
|
+
(text, url, _)=>`<a href="${url}">${text}</a>`;
|
|
33892
33892
|
const chalk = format === 'ansi' ? (0, ($parcel$interopDefault($iBiQ5$chalk))) : {
|
|
33893
33893
|
gray: {
|
|
33894
33894
|
underline: (v)=>`<span style="color: grey; text-decoration: underline;">${v}</span>`
|
|
@@ -33976,13 +33976,14 @@ class $8b0b2852bcb1a5b2$export$2e2bcd8739ae039 {
|
|
|
33976
33976
|
add(fn) {
|
|
33977
33977
|
new Promise((resolve, reject)=>{
|
|
33978
33978
|
let i = this._count++;
|
|
33979
|
-
|
|
33979
|
+
let wrapped = ()=>fn().then((result)=>{
|
|
33980
33980
|
this._results[i] = result;
|
|
33981
33981
|
resolve(result);
|
|
33982
33982
|
}, (err)=>{
|
|
33983
33983
|
reject(err);
|
|
33984
33984
|
throw err;
|
|
33985
|
-
})
|
|
33985
|
+
});
|
|
33986
|
+
this._queue.push(wrapped);
|
|
33986
33987
|
for (const addFn of this._addSubscriptions)addFn();
|
|
33987
33988
|
if (this._numRunning > 0 && this._numRunning < this._maxConcurrent) this._next();
|
|
33988
33989
|
}).catch(()=>{});
|
|
@@ -34493,7 +34494,7 @@ function $7eb0d819da9341a5$export$2e2bcd8739ae039(fn, delay) {
|
|
|
34493
34494
|
|
|
34494
34495
|
function $3817081e001856b1$export$2e2bcd8739ae039(fn, delay) {
|
|
34495
34496
|
let lastCalled;
|
|
34496
|
-
return function(...args) {
|
|
34497
|
+
return function throttled(...args) {
|
|
34497
34498
|
if (lastCalled == null || lastCalled + delay <= Date.now()) {
|
|
34498
34499
|
fn.call(this, ...args);
|
|
34499
34500
|
lastCalled = Date.now();
|
|
@@ -36839,6 +36840,16 @@ function $1e1fa42764ee5f95$export$3477f9615e12f61d(obj) {
|
|
|
36839
36840
|
let $1e1fa42764ee5f95$var$testCache = {
|
|
36840
36841
|
};
|
|
36841
36842
|
function $1e1fa42764ee5f95$export$42462553d605d8cd(fs, filePath) {
|
|
36843
|
+
if (process.env.ATLASPACK_BUILD_ENV === 'test') // Development builds of these native modules are especially big and slow to hash.
|
|
36844
|
+
{
|
|
36845
|
+
if (/parcel-swc\.[^\\/]+\.node$|lightningcss.[^\\/]+.node$/.test(filePath)) {
|
|
36846
|
+
let cacheEntry = $1e1fa42764ee5f95$var$testCache[filePath];
|
|
36847
|
+
if (cacheEntry) return cacheEntry;
|
|
36848
|
+
let v = $1e1fa42764ee5f95$export$8a9ede1a78d6a1fe(fs.createReadStream(filePath));
|
|
36849
|
+
$1e1fa42764ee5f95$var$testCache[filePath] = v;
|
|
36850
|
+
return v;
|
|
36851
|
+
}
|
|
36852
|
+
}
|
|
36842
36853
|
return $1e1fa42764ee5f95$export$8a9ede1a78d6a1fe(fs.createReadStream(filePath));
|
|
36843
36854
|
}
|
|
36844
36855
|
|