@atlaspack/fs 2.14.5-canary.0 → 2.14.5-canary.100

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 CHANGED
@@ -1,5 +1,141 @@
1
1
  # @atlaspack/fs
2
2
 
3
+ ## 2.15.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be)]:
8
+ - @atlaspack/feature-flags@2.18.3
9
+ - @atlaspack/types-internal@2.14.13
10
+ - @atlaspack/utils@2.15.3
11
+ - @atlaspack/workers@2.14.15
12
+
13
+ ## 2.15.9
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
18
+ - @atlaspack/feature-flags@2.18.2
19
+ - @atlaspack/types-internal@2.14.12
20
+ - @atlaspack/utils@2.15.2
21
+ - @atlaspack/workers@2.14.14
22
+
23
+ ## 2.15.8
24
+
25
+ ### Patch Changes
26
+
27
+ - 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)]:
28
+ - @atlaspack/workers@2.14.13
29
+ - @atlaspack/logger@2.14.11
30
+ - @atlaspack/feature-flags@2.18.1
31
+ - @atlaspack/utils@2.15.1
32
+ - @atlaspack/types-internal@2.14.11
33
+
34
+ ## 2.15.7
35
+
36
+ ### Patch Changes
37
+
38
+ - 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)]:
39
+ - @atlaspack/feature-flags@2.18.0
40
+ - @atlaspack/utils@2.15.0
41
+ - @atlaspack/types-internal@2.14.10
42
+ - @atlaspack/workers@2.14.12
43
+
44
+ ## 2.15.6
45
+
46
+ ### Patch Changes
47
+
48
+ - Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
49
+ - @atlaspack/feature-flags@2.17.0
50
+ - @atlaspack/types-internal@2.14.9
51
+ - @atlaspack/utils@2.14.11
52
+ - @atlaspack/workers@2.14.11
53
+
54
+ ## 2.15.5
55
+
56
+ ### Patch Changes
57
+
58
+ - [#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
59
+
60
+ - 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)]:
61
+ - @atlaspack/types-internal@2.14.8
62
+ - @atlaspack/rust@3.3.5
63
+ - @atlaspack/workers@2.14.10
64
+ - @atlaspack/logger@2.14.10
65
+ - @atlaspack/utils@2.14.10
66
+
67
+ ## 2.15.4
68
+
69
+ ### Patch Changes
70
+
71
+ - [#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
72
+
73
+ - 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)]:
74
+ - @atlaspack/rust@3.3.4
75
+ - @atlaspack/feature-flags@2.16.0
76
+ - @atlaspack/logger@2.14.9
77
+ - @atlaspack/utils@2.14.9
78
+ - @atlaspack/types-internal@2.14.7
79
+ - @atlaspack/workers@2.14.9
80
+
81
+ ## 2.15.3
82
+
83
+ ### Patch Changes
84
+
85
+ - [#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
86
+
87
+ - [#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
88
+
89
+ - [#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
90
+
91
+ - 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)]:
92
+ - @atlaspack/feature-flags@2.15.1
93
+ - @atlaspack/rust@3.3.3
94
+ - @atlaspack/types-internal@2.14.6
95
+ - @atlaspack/utils@2.14.8
96
+ - @atlaspack/logger@2.14.8
97
+ - @atlaspack/workers@2.14.8
98
+
99
+ ## 2.15.2
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies [[`a1773d2`](https://github.com/atlassian-labs/atlaspack/commit/a1773d2a62d0ef7805ac7524621dcabcc1afe929), [`556d6ab`](https://github.com/atlassian-labs/atlaspack/commit/556d6ab8ede759fa7f37fcd3f4da336ef1c55e8f)]:
104
+ - @atlaspack/feature-flags@2.15.0
105
+ - @atlaspack/logger@2.14.7
106
+ - @atlaspack/rust@3.3.2
107
+ - @atlaspack/types-internal@2.14.5
108
+ - @atlaspack/utils@2.14.7
109
+ - @atlaspack/workers@2.14.7
110
+
111
+ ## 2.15.1
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [[`e0f5337`](https://github.com/atlassian-labs/atlaspack/commit/e0f533757bd1019dbd108a04952c87da15286e09)]:
116
+ - @atlaspack/feature-flags@2.14.4
117
+ - @atlaspack/rust@3.3.1
118
+ - @atlaspack/types-internal@2.14.4
119
+ - @atlaspack/utils@2.14.6
120
+ - @atlaspack/logger@2.14.6
121
+ - @atlaspack/workers@2.14.6
122
+
123
+ ## 2.15.0
124
+
125
+ ### Minor Changes
126
+
127
+ - [#534](https://github.com/atlassian-labs/atlaspack/pull/534) [`4c17141`](https://github.com/atlassian-labs/atlaspack/commit/4c1714103dab2aa9039c488f381551d2b65d1d01) Thanks [@pancaspe87](https://github.com/pancaspe87)! - Expose vcs metrics
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [[`11d6f16`](https://github.com/atlassian-labs/atlaspack/commit/11d6f16b6397dee2f217167e5c98b39edb63f7a7), [`e2ba0f6`](https://github.com/atlassian-labs/atlaspack/commit/e2ba0f69702656f3d1ce95ab1454e35062b13b39), [`d2c50c2`](https://github.com/atlassian-labs/atlaspack/commit/d2c50c2c020888b33bb25b8690d9320c2b69e2a6), [`46a90dc`](https://github.com/atlassian-labs/atlaspack/commit/46a90dccd019a26b222c878a92d23acc75dc67c5)]:
132
+ - @atlaspack/feature-flags@2.14.3
133
+ - @atlaspack/rust@3.3.0
134
+ - @atlaspack/types-internal@2.14.3
135
+ - @atlaspack/utils@2.14.5
136
+ - @atlaspack/logger@2.14.5
137
+ - @atlaspack/workers@2.14.5
138
+
3
139
  ## 2.14.4
4
140
 
5
141
  ### Patch 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-canary.0+56fd82cd5\",\"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-canary.68+56fd82cd5\",\"@atlaspack/feature-flags\":\"2.14.1-canary.68+56fd82cd5\",\"@atlaspack/logger\":\"2.14.5-canary.0+56fd82cd5\",\"@atlaspack/rust\":\"3.2.1-canary.0+56fd82cd5\",\"@atlaspack/types-internal\":\"2.14.1-canary.68+56fd82cd5\",\"@atlaspack/utils\":\"2.14.5-canary.0+56fd82cd5\",\"@atlaspack/workers\":\"2.14.5-canary.0+56fd82cd5\",\"@parcel/watcher\":\"^2.0.7\"},\"devDependencies\":{\"@atlaspack/watcher-watchman-js\":\"2.14.5-canary.0+56fd82cd5\",\"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\":\"56fd82cd544c4c9096be6ebea8261e714435de09\"}");
65
+ $a29f1902b85e3e69$exports = JSON.parse("{\"name\":\"@atlaspack/fs\",\"version\":\"2.14.5-canary.100+f609bf49f\",\"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-canary.168+f609bf49f\",\"@atlaspack/feature-flags\":\"2.14.1-canary.168+f609bf49f\",\"@atlaspack/logger\":\"2.14.5-canary.100+f609bf49f\",\"@atlaspack/rust\":\"3.2.1-canary.100+f609bf49f\",\"@atlaspack/types-internal\":\"2.14.1-canary.168+f609bf49f\",\"@atlaspack/utils\":\"2.14.5-canary.100+f609bf49f\",\"@atlaspack/workers\":\"2.14.5-canary.100+f609bf49f\",\"@parcel/watcher\":\"^2.0.7\"},\"devDependencies\":{\"@atlaspack/watcher-watchman-js\":\"2.14.5-canary.100+f609bf49f\",\"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\":\"f609bf49ffa3984c0ff81d4853a5c850aaee5fce\"}");
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
- if (event.path.startsWith(dir)) for (let watcher of watchers)watcher.trigger(events);
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,6 +1220,15 @@ 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));
1223
+ (0, ($parcel$interopDefault($jF595$atlaspacklogger))).verbose({
1224
+ origin: '@atlaspack/fs',
1225
+ message: 'Expose VCS timing metrics',
1226
+ meta: {
1227
+ trackableEvent: 'vcs_timing_metrics',
1228
+ dirtyFilesExecutionTime: vcsState?.dirtyFilesExecutionTime,
1229
+ yarnStatesExecutionTime: vcsState?.yarnStatesExecutionTime
1230
+ }
1231
+ });
1220
1232
  } catch (err) {
1221
1233
  (0, ($parcel$interopDefault($jF595$atlaspacklogger))).error({
1222
1234
  origin: '@atlaspack/fs',
@@ -1238,15 +1250,16 @@ class $80660f432e25e217$export$80de92554c03942a extends (0, $3efdc9f199571449$ex
1238
1250
 
1239
1251
 
1240
1252
  const $81d23888a9e9b3a9$var$pipeline = (0, $jF595$util.promisify)((0, ($parcel$interopDefault($jF595$stream))).pipeline);
1241
- async function $81d23888a9e9b3a9$export$d3a8044e3fef7335(sourceFS, source, destinationFS, destination) {
1253
+ async function $81d23888a9e9b3a9$export$d3a8044e3fef7335(sourceFS, source, destinationFS, destination, filter) {
1242
1254
  await destinationFS.mkdirp(destination);
1243
1255
  let files = await sourceFS.readdir(source);
1244
1256
  for (let file of files){
1257
+ if (filter && !filter(file)) continue;
1245
1258
  let sourcePath = (0, ($parcel$interopDefault($jF595$path))).join(source, file);
1246
1259
  let destPath = (0, ($parcel$interopDefault($jF595$path))).join(destination, file);
1247
1260
  let stats = await sourceFS.stat(sourcePath);
1248
1261
  if (stats.isFile()) await $81d23888a9e9b3a9$var$pipeline(sourceFS.createReadStream(sourcePath), destinationFS.createWriteStream(destPath));
1249
- 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);
1250
1263
  }
1251
1264
  }
1252
1265
  $parcel$exportWildcard(module.exports, $3efdc9f199571449$exports);