@atlaspack/fs 2.14.5-dev.14 → 2.14.5-dev.1c70d50f9.99
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 +110 -0
- package/index.d.ts +8 -2
- package/lib/browser.js +9 -5
- package/lib/browser.js.map +1 -1
- package/lib/index.js +10 -5
- package/lib/index.js.map +1 -1
- package/package.json +10 -10
- package/src/MemoryFS.js +6 -2
- package/src/NodeFS.js +1 -0
- package/src/NodeVCSAwareFS.js +2 -1
- package/src/index.js +6 -1
- package/test/OverlayFS.test.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,115 @@
|
|
|
1
1
|
# @atlaspack/fs
|
|
2
2
|
|
|
3
|
+
## 2.15.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
|
|
8
|
+
- @atlaspack/feature-flags@2.18.2
|
|
9
|
+
- @atlaspack/types-internal@2.14.12
|
|
10
|
+
- @atlaspack/utils@2.15.2
|
|
11
|
+
- @atlaspack/workers@2.14.14
|
|
12
|
+
|
|
13
|
+
## 2.15.8
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb), [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
|
|
18
|
+
- @atlaspack/workers@2.14.13
|
|
19
|
+
- @atlaspack/logger@2.14.11
|
|
20
|
+
- @atlaspack/feature-flags@2.18.1
|
|
21
|
+
- @atlaspack/utils@2.15.1
|
|
22
|
+
- @atlaspack/types-internal@2.14.11
|
|
23
|
+
|
|
24
|
+
## 2.15.7
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [[`10fbcfb`](https://github.com/atlassian-labs/atlaspack/commit/10fbcfbfa49c7a83da5d7c40983e36e87f524a75), [`85c52d3`](https://github.com/atlassian-labs/atlaspack/commit/85c52d3f7717b3c84a118d18ab98cfbfd71dcbd2), [`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
|
|
29
|
+
- @atlaspack/feature-flags@2.18.0
|
|
30
|
+
- @atlaspack/utils@2.15.0
|
|
31
|
+
- @atlaspack/types-internal@2.14.10
|
|
32
|
+
- @atlaspack/workers@2.14.12
|
|
33
|
+
|
|
34
|
+
## 2.15.6
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
|
|
39
|
+
- @atlaspack/feature-flags@2.17.0
|
|
40
|
+
- @atlaspack/types-internal@2.14.9
|
|
41
|
+
- @atlaspack/utils@2.14.11
|
|
42
|
+
- @atlaspack/workers@2.14.11
|
|
43
|
+
|
|
44
|
+
## 2.15.5
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- [#597](https://github.com/atlassian-labs/atlaspack/pull/597) [`0999fb7`](https://github.com/atlassian-labs/atlaspack/commit/0999fb78da519a6c7582d212883e515fcf6c1252) Thanks [@yamadapc](https://github.com/yamadapc)! - Reduce verbosity of logging
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
|
|
51
|
+
- @atlaspack/types-internal@2.14.8
|
|
52
|
+
- @atlaspack/rust@3.3.5
|
|
53
|
+
- @atlaspack/workers@2.14.10
|
|
54
|
+
- @atlaspack/logger@2.14.10
|
|
55
|
+
- @atlaspack/utils@2.14.10
|
|
56
|
+
|
|
57
|
+
## 2.15.4
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- [#591](https://github.com/atlassian-labs/atlaspack/pull/591) [`e4d966c`](https://github.com/atlassian-labs/atlaspack/commit/e4d966c3c9c4292c5013372ae65b10d19d4bacc6) Thanks [@yamadapc](https://github.com/yamadapc)! - Fix bug where renames would not get handled correctly
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [[`124b7ff`](https://github.com/atlassian-labs/atlaspack/commit/124b7fff44f71aac9fbad289a9a9509b3dfc9aaa), [`e052521`](https://github.com/atlassian-labs/atlaspack/commit/e0525210850ed1606146eb86991049cf567c5dec), [`15c6d70`](https://github.com/atlassian-labs/atlaspack/commit/15c6d7000bd89da876bc590aa75b17a619a41896), [`e4d966c`](https://github.com/atlassian-labs/atlaspack/commit/e4d966c3c9c4292c5013372ae65b10d19d4bacc6), [`209692f`](https://github.com/atlassian-labs/atlaspack/commit/209692ffb11eae103a0d65c5e1118a5aa1625818), [`42a775d`](https://github.com/atlassian-labs/atlaspack/commit/42a775de8eec638ad188f3271964170d8c04d84b), [`29c2f10`](https://github.com/atlassian-labs/atlaspack/commit/29c2f106de9679adfb5afa04e1910471dc65a427), [`f4da1e1`](https://github.com/atlassian-labs/atlaspack/commit/f4da1e120e73eeb5e8b8927f05e88f04d6148c7b), [`1ef91fc`](https://github.com/atlassian-labs/atlaspack/commit/1ef91fcc863fdd2831511937083dbbc1263b3d9d)]:
|
|
64
|
+
- @atlaspack/rust@3.3.4
|
|
65
|
+
- @atlaspack/feature-flags@2.16.0
|
|
66
|
+
- @atlaspack/logger@2.14.9
|
|
67
|
+
- @atlaspack/utils@2.14.9
|
|
68
|
+
- @atlaspack/types-internal@2.14.7
|
|
69
|
+
- @atlaspack/workers@2.14.9
|
|
70
|
+
|
|
71
|
+
## 2.15.3
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- [#550](https://github.com/atlassian-labs/atlaspack/pull/550) [`3a3e8e7`](https://github.com/atlassian-labs/atlaspack/commit/3a3e8e7be9e2dffd7304436d792f0f595d59665a) Thanks [@yamadapc](https://github.com/yamadapc)! - Fix typescript declaration files
|
|
76
|
+
|
|
77
|
+
- [#558](https://github.com/atlassian-labs/atlaspack/pull/558) [`1ab0a27`](https://github.com/atlassian-labs/atlaspack/commit/1ab0a275aeca40350415e2b03e7440d1dddc6228) Thanks [@yamadapc](https://github.com/yamadapc)! - Fix bug handling dirty deleted git files
|
|
78
|
+
|
|
79
|
+
- [#559](https://github.com/atlassian-labs/atlaspack/pull/559) [`b8a4ae8`](https://github.com/atlassian-labs/atlaspack/commit/b8a4ae8f83dc0a83d8b145c5f729936ce52080a3) Thanks [@yamadapc](https://github.com/yamadapc)! - Fix bugs in VCS cache invalidation
|
|
80
|
+
|
|
81
|
+
- Updated dependencies [[`30f6017`](https://github.com/atlassian-labs/atlaspack/commit/30f60175ba4d272c5fc193973c63bc298584775b), [`1ab0a27`](https://github.com/atlassian-labs/atlaspack/commit/1ab0a275aeca40350415e2b03e7440d1dddc6228), [`b8a4ae8`](https://github.com/atlassian-labs/atlaspack/commit/b8a4ae8f83dc0a83d8b145c5f729936ce52080a3)]:
|
|
82
|
+
- @atlaspack/feature-flags@2.15.1
|
|
83
|
+
- @atlaspack/rust@3.3.3
|
|
84
|
+
- @atlaspack/types-internal@2.14.6
|
|
85
|
+
- @atlaspack/utils@2.14.8
|
|
86
|
+
- @atlaspack/logger@2.14.8
|
|
87
|
+
- @atlaspack/workers@2.14.8
|
|
88
|
+
|
|
89
|
+
## 2.15.2
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [[`a1773d2`](https://github.com/atlassian-labs/atlaspack/commit/a1773d2a62d0ef7805ac7524621dcabcc1afe929), [`556d6ab`](https://github.com/atlassian-labs/atlaspack/commit/556d6ab8ede759fa7f37fcd3f4da336ef1c55e8f)]:
|
|
94
|
+
- @atlaspack/feature-flags@2.15.0
|
|
95
|
+
- @atlaspack/logger@2.14.7
|
|
96
|
+
- @atlaspack/rust@3.3.2
|
|
97
|
+
- @atlaspack/types-internal@2.14.5
|
|
98
|
+
- @atlaspack/utils@2.14.7
|
|
99
|
+
- @atlaspack/workers@2.14.7
|
|
100
|
+
|
|
101
|
+
## 2.15.1
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [[`e0f5337`](https://github.com/atlassian-labs/atlaspack/commit/e0f533757bd1019dbd108a04952c87da15286e09)]:
|
|
106
|
+
- @atlaspack/feature-flags@2.14.4
|
|
107
|
+
- @atlaspack/rust@3.3.1
|
|
108
|
+
- @atlaspack/types-internal@2.14.4
|
|
109
|
+
- @atlaspack/utils@2.14.6
|
|
110
|
+
- @atlaspack/logger@2.14.6
|
|
111
|
+
- @atlaspack/workers@2.14.6
|
|
112
|
+
|
|
3
113
|
## 2.15.0
|
|
4
114
|
|
|
5
115
|
### Minor Changes
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {FileSystem} from '@atlaspack/types-internal';
|
|
1
|
+
import type {FileSystem, FilePath} from '@atlaspack/types-internal';
|
|
2
|
+
import type {Event} from '@parcel/watcher';
|
|
2
3
|
import type WorkerFarm from '@atlaspack/workers';
|
|
3
|
-
import type {NodeVCSAwareFSOptions} from './src/NodeVCSAwareFS';
|
|
4
4
|
|
|
5
5
|
export type {
|
|
6
6
|
FileSystem,
|
|
@@ -23,6 +23,12 @@ export const OverlayFS: {
|
|
|
23
23
|
new (writable: FileSystem, readable: FileSystem): FileSystem;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
interface NodeVCSAwareFSOptions {
|
|
27
|
+
gitRepoPath: null | FilePath;
|
|
28
|
+
excludePatterns: Array<string>;
|
|
29
|
+
logEventDiff: null | ((watcherEvents: Event[], vcsEvents: Event[]) => void);
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
export const NodeVCSAwareFS: {
|
|
27
33
|
new (options: NodeVCSAwareFSOptions): FileSystem;
|
|
28
34
|
};
|
package/lib/browser.js
CHANGED
|
@@ -62,7 +62,7 @@ $parcel$export($ce546cd73efa5b9e$exports, "File", () => $ce546cd73efa5b9e$export
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
var $a29f1902b85e3e69$exports = {};
|
|
65
|
-
$a29f1902b85e3e69$exports = JSON.parse("{\"name\":\"@atlaspack/fs\",\"version\":\"2.14.5-dev.
|
|
65
|
+
$a29f1902b85e3e69$exports = JSON.parse("{\"name\":\"@atlaspack/fs\",\"version\":\"2.14.5-dev.1c70d50f9.99+1c70d50f9\",\"description\":\"Blazing fast, zero configuration web application bundler\",\"license\":\"(MIT OR Apache-2.0)\",\"publishConfig\":{\"access\":\"public\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/atlassian-labs/atlaspack.git\"},\"main\":\"lib/index.js\",\"source\":\"src/index.js\",\"types\":\"index.d.ts\",\"engines\":{\"node\":\">= 16.0.0\"},\"targets\":{\"types\":false,\"main\":{\"includeNodeModules\":{\"@atlaspack/build-cache\":false,\"@atlaspack/diagnostic\":false,\"@atlaspack/feature-flags\":false,\"@atlaspack/logger\":false,\"@atlaspack/rust\":false,\"@atlaspack/types-internal\":false,\"@atlaspack/utils\":false,\"@atlaspack/watcher-watchman-js\":false,\"@parcel/watcher\":false,\"@atlaspack/workers\":false}},\"browser\":{\"includeNodeModules\":{\"@atlaspack/build-cache\":false,\"@atlaspack/diagnostic\":false,\"@atlaspack/feature-flags\":false,\"@atlaspack/logger\":false,\"@atlaspack/rust\":false,\"@atlaspack/types-internal\":false,\"@atlaspack/utils\":false,\"@atlaspack/watcher-watchman-js\":false,\"@parcel/watcher\":false,\"@atlaspack/workers\":false}}},\"scripts\":{\"build-ts\":\"mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts\",\"check-ts\":\"tsc --noEmit index.d.ts\"},\"dependencies\":{\"@atlaspack/build-cache\":\"2.13.3-dev.1c70d50f9.167+1c70d50f9\",\"@atlaspack/feature-flags\":\"2.14.1-dev.1c70d50f9.167+1c70d50f9\",\"@atlaspack/logger\":\"2.14.5-dev.1c70d50f9.99+1c70d50f9\",\"@atlaspack/rust\":\"3.2.1-dev.1c70d50f9.99+1c70d50f9\",\"@atlaspack/types-internal\":\"2.14.1-dev.1c70d50f9.167+1c70d50f9\",\"@atlaspack/utils\":\"2.14.5-dev.1c70d50f9.99+1c70d50f9\",\"@atlaspack/workers\":\"2.14.5-dev.1c70d50f9.99+1c70d50f9\",\"@parcel/watcher\":\"^2.0.7\"},\"devDependencies\":{\"@atlaspack/watcher-watchman-js\":\"2.14.5-dev.1c70d50f9.99+1c70d50f9\",\"graceful-fs\":\"^4.2.4\",\"ncp\":\"^2.0.0\",\"nullthrows\":\"^1.1.1\",\"utility-types\":\"^3.10.0\"},\"browser\":{\"@atlaspack/fs\":\"./lib/browser.js\",\"./src/NodeFS.js\":\"./src/NodeFS.browser.js\"},\"type\":\"commonjs\",\"gitHead\":\"1c70d50f914cb662515b0b61053e51a06f3af234\"}");
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -438,6 +438,7 @@ class $ce546cd73efa5b9e$export$3048eb7ec07c2c4e {
|
|
|
438
438
|
return new $ce546cd73efa5b9e$var$ReadStream(this, filePath);
|
|
439
439
|
}
|
|
440
440
|
createWriteStream(filePath, options) {
|
|
441
|
+
this.mkdirp((0, ($parcel$interopDefault($jF595$path))).dirname(filePath));
|
|
441
442
|
return new $ce546cd73efa5b9e$var$WriteStream(this, filePath, options);
|
|
442
443
|
}
|
|
443
444
|
realpathSync(filePath) {
|
|
@@ -476,7 +477,8 @@ class $ce546cd73efa5b9e$export$3048eb7ec07c2c4e {
|
|
|
476
477
|
this._eventQueue = [];
|
|
477
478
|
for (let [dir, watchers] of this.watchers){
|
|
478
479
|
if (!dir.endsWith((0, ($parcel$interopDefault($jF595$path))).sep)) dir += (0, ($parcel$interopDefault($jF595$path))).sep;
|
|
479
|
-
|
|
480
|
+
const relevantEvents = events.filter((event)=>event.path.startsWith(dir));
|
|
481
|
+
if (relevantEvents.length > 0) for (let watcher of watchers)watcher.trigger(relevantEvents);
|
|
480
482
|
}
|
|
481
483
|
}, 50);
|
|
482
484
|
}
|
|
@@ -1209,6 +1211,7 @@ class $80660f432e25e217$export$80de92554c03942a extends (0, $3efdc9f199571449$ex
|
|
|
1209
1211
|
return;
|
|
1210
1212
|
}
|
|
1211
1213
|
const snapshotDirectory = (0, ($parcel$interopDefault($jF595$path))).dirname(snapshot);
|
|
1214
|
+
await this.mkdirp(snapshotDirectory);
|
|
1212
1215
|
const filename = (0, ($parcel$interopDefault($jF595$path))).basename(snapshot, '.txt');
|
|
1213
1216
|
const nativeSnapshotPath = (0, ($parcel$interopDefault($jF595$path))).join(snapshotDirectory, `${filename}.native-snapshot.txt`);
|
|
1214
1217
|
if ((0, $jF595$atlaspackfeatureflags.getFeatureFlagValue)('vcsMode') !== 'NEW') await (0, $jF595$atlaspacklogger.instrumentAsync)('NodeVCSAwareFS::watchman.writeSnapshot', async ()=>{
|
|
@@ -1217,7 +1220,7 @@ class $80660f432e25e217$export$80de92554c03942a extends (0, $3efdc9f199571449$ex
|
|
|
1217
1220
|
let vcsState = null;
|
|
1218
1221
|
try {
|
|
1219
1222
|
vcsState = await (0, $jF595$atlaspacklogger.instrumentAsync)('NodeVCSAwareFS::getVcsStateSnapshot', ()=>(0, $jF595$atlaspackrust.getVcsStateSnapshot)(gitRepoPath, this.#excludePatterns));
|
|
1220
|
-
(0, ($parcel$interopDefault($jF595$atlaspacklogger))).
|
|
1223
|
+
(0, ($parcel$interopDefault($jF595$atlaspacklogger))).verbose({
|
|
1221
1224
|
origin: '@atlaspack/fs',
|
|
1222
1225
|
message: 'Expose VCS timing metrics',
|
|
1223
1226
|
meta: {
|
|
@@ -1247,15 +1250,16 @@ class $80660f432e25e217$export$80de92554c03942a extends (0, $3efdc9f199571449$ex
|
|
|
1247
1250
|
|
|
1248
1251
|
|
|
1249
1252
|
const $81d23888a9e9b3a9$var$pipeline = (0, $jF595$util.promisify)((0, ($parcel$interopDefault($jF595$stream))).pipeline);
|
|
1250
|
-
async function $81d23888a9e9b3a9$export$d3a8044e3fef7335(sourceFS, source, destinationFS, destination) {
|
|
1253
|
+
async function $81d23888a9e9b3a9$export$d3a8044e3fef7335(sourceFS, source, destinationFS, destination, filter) {
|
|
1251
1254
|
await destinationFS.mkdirp(destination);
|
|
1252
1255
|
let files = await sourceFS.readdir(source);
|
|
1253
1256
|
for (let file of files){
|
|
1257
|
+
if (filter && !filter(file)) continue;
|
|
1254
1258
|
let sourcePath = (0, ($parcel$interopDefault($jF595$path))).join(source, file);
|
|
1255
1259
|
let destPath = (0, ($parcel$interopDefault($jF595$path))).join(destination, file);
|
|
1256
1260
|
let stats = await sourceFS.stat(sourcePath);
|
|
1257
1261
|
if (stats.isFile()) await $81d23888a9e9b3a9$var$pipeline(sourceFS.createReadStream(sourcePath), destinationFS.createWriteStream(destPath));
|
|
1258
|
-
else if (stats.isDirectory()) await $81d23888a9e9b3a9$export$d3a8044e3fef7335(sourceFS, sourcePath, destinationFS, destPath);
|
|
1262
|
+
else if (stats.isDirectory()) await $81d23888a9e9b3a9$export$d3a8044e3fef7335(sourceFS, sourcePath, destinationFS, destPath, filter);
|
|
1259
1263
|
}
|
|
1260
1264
|
}
|
|
1261
1265
|
$parcel$exportWildcard(module.exports, $3efdc9f199571449$exports);
|