Skip to content

Commit c62422f

Browse files
Upgrade @parcel/watcher to 2.5.0 (#14978)
This PR upgrades parcel watcher to 2.5.0. Closes #14957 Closes #14958 Closes #14969 Closes #14970 Closes #14971
1 parent bc6f7e2 commit c62422f

File tree

5 files changed

+388
-157
lines changed

5 files changed

+388
-157
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"packageManager": "[email protected]",
6464
"pnpm": {
6565
"patchedDependencies": {
66-
"@parcel/[email protected]": "patches/@[email protected].patch",
67-
"[email protected].0": "patches/[email protected].0.patch"
66+
67+
"@parcel/[email protected].0": "patches/@[email protected].0.patch"
6868
}
6969
}
7070
}

packages/@tailwindcss-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"access": "public"
3030
},
3131
"dependencies": {
32-
"@parcel/watcher": "^2.4.1",
32+
"@parcel/watcher": "^2.5.0",
3333
"@tailwindcss/node": "workspace:^",
3434
"@tailwindcss/oxide": "workspace:^",
3535
"enhanced-resolve": "^5.17.1",

packages/@tailwindcss-standalone/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
},
3333
"__notes": "These binary packages must be included so Bun can build the CLI for all supported platforms. We also rely on Lightning CSS and Parcel being patched so Bun can statically analyze the executables.",
3434
"devDependencies": {
35-
"@parcel/watcher-darwin-arm64": "^2.4.2-alpha.0",
36-
"@parcel/watcher-darwin-x64": "^2.4.2-alpha.0",
37-
"@parcel/watcher-linux-arm64-glibc": "^2.4.2-alpha.0",
38-
"@parcel/watcher-linux-arm64-musl": "^2.4.2-alpha.0",
39-
"@parcel/watcher-linux-x64-glibc": "^2.4.2-alpha.0",
40-
"@parcel/watcher-linux-x64-musl": "^2.4.2-alpha.0",
41-
"@parcel/watcher-win32-x64": "^2.4.2-alpha.0",
35+
"@parcel/watcher-darwin-arm64": "^2.5.0",
36+
"@parcel/watcher-darwin-x64": "^2.5.0",
37+
"@parcel/watcher-linux-arm64-glibc": "^2.5.0",
38+
"@parcel/watcher-linux-arm64-musl": "^2.5.0",
39+
"@parcel/watcher-linux-x64-glibc": "^2.5.0",
40+
"@parcel/watcher-linux-x64-musl": "^2.5.0",
41+
"@parcel/watcher-win32-x64": "^2.5.0",
4242
"@types/bun": "^1.1.11",
4343
"bun": "1.1.29",
4444
"lightningcss-darwin-arm64": "^1.25.1",
Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
diff --git a/index.js b/index.js
2-
index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea88b0dbbc 100644
2+
index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..f3b1158eb5612235388ff5f5347f6edcbf323090 100644
33
--- a/index.js
44
+++ b/index.js
5-
@@ -1,40 +1,26 @@
6-
const {createWrapper} = require('./wrapper');
5+
@@ -1,41 +1,27 @@
6+
-const {createWrapper} = require('./wrapper');
7+
+const { createWrapper } = require('./wrapper')
78

89
-let name = `@parcel/watcher-${process.platform}-${process.arch}`;
910
-if (process.platform === 'linux') {
@@ -16,7 +17,7 @@ index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea
1617
-}
1718
+function loadPackage() {
1819
+ if (process.platform === 'linux') {
19-
+ let { MUSL, GLIBC, family, familySync } = require("detect-libc");
20+
+ let { MUSL, GLIBC, family, familySync } = require('detect-libc')
2021
+ // Bun polyfills `detect-libc` in compiled binaries. We rely on
2122
+ // [email protected] but the polyfilled version is 2.x. In detect-libc@2x
2223
+ // there is a `familySync` function that we can use instead.
@@ -37,14 +38,14 @@ index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea
3738
- handleError(err);
3839
- throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`);
3940
+ if (family === MUSL) {
40-
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-musl`);
41+
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-musl`)
4142
+ } else if (family === GLIBC) {
42-
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-glibc`);
43+
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-glibc`)
4344
+ } else {
44-
+ throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`);
45+
+ throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`)
4546
}
4647
+ } else {
47-
+ return require(`@parcel/watcher-${process.platform}-${process.arch}`);
48+
+ return require(`@parcel/watcher-${process.platform}-${process.arch}`)
4849
}
4950
}
5051

@@ -55,7 +56,12 @@ index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea
5556
-}
5657
-
5758
-const wrapper = createWrapper(binding);
58-
+const wrapper = createWrapper(loadPackage());
59-
exports.writeSnapshot = wrapper.writeSnapshot;
60-
exports.getEventsSince = wrapper.getEventsSince;
61-
exports.subscribe = wrapper.subscribe;
59+
-exports.writeSnapshot = wrapper.writeSnapshot;
60+
-exports.getEventsSince = wrapper.getEventsSince;
61+
-exports.subscribe = wrapper.subscribe;
62+
-exports.unsubscribe = wrapper.unsubscribe;
63+
+const wrapper = createWrapper(loadPackage())
64+
+exports.writeSnapshot = wrapper.writeSnapshot
65+
+exports.getEventsSince = wrapper.getEventsSince
66+
+exports.subscribe = wrapper.subscribe
67+
+exports.unsubscribe = wrapper.unsubscribe

0 commit comments

Comments
 (0)