Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"packageManager": "[email protected]",
"pnpm": {
"patchedDependencies": {
"@parcel/[email protected]": "patches/@[email protected].patch",
"[email protected].0": "patches/[email protected].0.patch"
"[email protected]": "patches/[email protected].patch",
"@parcel/[email protected].0": "patches/@[email protected].0.patch"
}
}
}
2 changes: 1 addition & 1 deletion packages/@tailwindcss-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"access": "public"
},
"dependencies": {
"@parcel/watcher": "^2.4.1",
"@parcel/watcher": "^2.5.0",
"@tailwindcss/node": "workspace:^",
"@tailwindcss/oxide": "workspace:^",
"enhanced-resolve": "^5.17.1",
Expand Down
14 changes: 7 additions & 7 deletions packages/@tailwindcss-standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
},
"__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.",
"devDependencies": {
"@parcel/watcher-darwin-arm64": "^2.4.2-alpha.0",
"@parcel/watcher-darwin-x64": "^2.4.2-alpha.0",
"@parcel/watcher-linux-arm64-glibc": "^2.4.2-alpha.0",
"@parcel/watcher-linux-arm64-musl": "^2.4.2-alpha.0",
"@parcel/watcher-linux-x64-glibc": "^2.4.2-alpha.0",
"@parcel/watcher-linux-x64-musl": "^2.4.2-alpha.0",
"@parcel/watcher-win32-x64": "^2.4.2-alpha.0",
"@parcel/watcher-darwin-arm64": "^2.5.0",
"@parcel/watcher-darwin-x64": "^2.5.0",
"@parcel/watcher-linux-arm64-glibc": "^2.5.0",
"@parcel/watcher-linux-arm64-musl": "^2.5.0",
"@parcel/watcher-linux-x64-glibc": "^2.5.0",
"@parcel/watcher-linux-x64-musl": "^2.5.0",
"@parcel/watcher-win32-x64": "^2.5.0",
"@types/bun": "^1.1.11",
"bun": "1.1.29",
"lightningcss-darwin-arm64": "^1.25.1",
Expand Down
30 changes: 18 additions & 12 deletions patches/@[email protected] → patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
diff --git a/index.js b/index.js
index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea88b0dbbc 100644
index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..f3b1158eb5612235388ff5f5347f6edcbf323090 100644
--- a/index.js
+++ b/index.js
@@ -1,40 +1,26 @@
const {createWrapper} = require('./wrapper');
@@ -1,41 +1,27 @@
-const {createWrapper} = require('./wrapper');
+const { createWrapper } = require('./wrapper')

-let name = `@parcel/watcher-${process.platform}-${process.arch}`;
-if (process.platform === 'linux') {
Expand All @@ -16,7 +17,7 @@ index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea
-}
+function loadPackage() {
+ if (process.platform === 'linux') {
+ let { MUSL, GLIBC, family, familySync } = require("detect-libc");
+ let { MUSL, GLIBC, family, familySync } = require('detect-libc')
+ // Bun polyfills `detect-libc` in compiled binaries. We rely on
+ // [email protected] but the polyfilled version is 2.x. In detect-libc@2x
+ // there is a `familySync` function that we can use instead.
Expand All @@ -37,14 +38,14 @@ index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea
- handleError(err);
- 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.`);
+ if (family === MUSL) {
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-musl`);
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-musl`)
+ } else if (family === GLIBC) {
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-glibc`);
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-glibc`)
+ } else {
+ throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`);
+ throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`)
}
+ } else {
+ return require(`@parcel/watcher-${process.platform}-${process.arch}`);
+ return require(`@parcel/watcher-${process.platform}-${process.arch}`)
}
}

Expand All @@ -55,7 +56,12 @@ index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea
-}
-
-const wrapper = createWrapper(binding);
+const wrapper = createWrapper(loadPackage());
exports.writeSnapshot = wrapper.writeSnapshot;
exports.getEventsSince = wrapper.getEventsSince;
exports.subscribe = wrapper.subscribe;
-exports.writeSnapshot = wrapper.writeSnapshot;
-exports.getEventsSince = wrapper.getEventsSince;
-exports.subscribe = wrapper.subscribe;
-exports.unsubscribe = wrapper.unsubscribe;
+const wrapper = createWrapper(loadPackage())
+exports.writeSnapshot = wrapper.writeSnapshot
+exports.getEventsSince = wrapper.getEventsSince
+exports.subscribe = wrapper.subscribe
+exports.unsubscribe = wrapper.unsubscribe
Loading