Skip to content

Commit

Permalink
Update patch
Browse files Browse the repository at this point in the history
  • Loading branch information
bigorn0 committed Nov 7, 2024
1 parent a0ee832 commit 37ec6c8
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 171 deletions.
171 changes: 0 additions & 171 deletions patches/@parcel+watcher+2.4.1.patch

This file was deleted.

112 changes: 112 additions & 0 deletions patches/@parcel+watcher+2.5.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
diff --git a/node_modules/@parcel/watcher/README.md b/node_modules/@parcel/watcher/README.md
index d212b93..eba1a26 100644
--- a/node_modules/@parcel/watcher/README.md
+++ b/node_modules/@parcel/watcher/README.md
@@ -1,3 +1,9 @@
+# @hackolade/watcher
+Repackaged version of @parcel/watcher
+
+This is a convenience package that will install all prebuilds for all supported platforms, to the contrary to the upstream package that constraint the installation only to the runtime platform (os/cpu).
+This typically enable cross building an Electron application.
+
# @parcel/watcher

A native C++ Node module for querying and subscribing to filesystem events. Used by [Parcel 2](https://github.com/parcel-bundler/parcel).
diff --git a/node_modules/@parcel/watcher/index.js b/node_modules/@parcel/watcher/index.js
index 8afb2b1..36a7cb5 100644
--- a/node_modules/@parcel/watcher/index.js
+++ b/node_modules/@parcel/watcher/index.js
@@ -1,31 +1,14 @@
const {createWrapper} = require('./wrapper');

-let name = `@parcel/watcher-${process.platform}-${process.arch}`;
-if (process.platform === 'linux') {
- const { MUSL, family } = require('detect-libc');
- if (family === MUSL) {
- name += '-musl';
- } else {
- name += '-glibc';
- }
-}
+const name = `@hackolade/watcher-${process.platform}-${process.arch}`;

let binding;
try {
- binding = require(name);
+ binding = require(/* webpackIgnore: true */ name);
} catch (err) {
- handleError(err);
- try {
- binding = require('./build/Release/watcher.node');
- } catch (err) {
- handleError(err);
- try {
- binding = require('./build/Debug/watcher.node');
- } catch (err) {
- 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.`);
- }
- }
+ console.error('failed to load @hackolade/watcher prebuild');
+ console.error(err);
+ throw new Error(`No prebuild or local build of @hackolade/watcher found. Tried ${name}. Please ensure it is installed. Otherwise it is possible we don't support your platform yet. If this is the case.`);
}

function handleError(err) {
diff --git a/node_modules/@parcel/watcher/package.json b/node_modules/@parcel/watcher/package.json
index 171bf8a..847be85 100644
--- a/node_modules/@parcel/watcher/package.json
+++ b/node_modules/@parcel/watcher/package.json
@@ -18,21 +18,16 @@
},
"files": [
"index.js",
- "index.js.flow",
"index.d.ts",
- "wrapper.js",
"package.json",
+ "wrapper.js",
"README.md",
- "LICENSE",
- "src",
- "scripts/build-from-source.js",
- "binding.gyp"
+ "LICENSE"
],
"scripts": {
"prebuild": "prebuildify --napi --strip --tag-libc",
"format": "prettier --write \"./**/*.{js,json,md}\"",
"build": "node-gyp rebuild",
- "install": "node scripts/build-from-source.js",
"test": "mocha"
},
"engines": {
@@ -50,10 +45,8 @@
]
},
"dependencies": {
- "detect-libc": "^1.0.3",
"is-glob": "^4.0.3",
- "micromatch": "^4.0.5",
- "node-addon-api": "^7.0.0"
+ "micromatch": "^4.0.5"
},
"devDependencies": {
"esbuild": "^0.19.8",
@@ -74,15 +67,6 @@
"@parcel/watcher-darwin-x64": "2.5.0",
"@parcel/watcher-darwin-arm64": "2.5.0",
"@parcel/watcher-win32-x64": "2.5.0",
- "@parcel/watcher-win32-arm64": "2.5.0",
- "@parcel/watcher-win32-ia32": "2.5.0",
- "@parcel/watcher-linux-x64-glibc": "2.5.0",
- "@parcel/watcher-linux-x64-musl": "2.5.0",
- "@parcel/watcher-linux-arm64-glibc": "2.5.0",
- "@parcel/watcher-linux-arm64-musl": "2.5.0",
- "@parcel/watcher-linux-arm-glibc": "2.5.0",
- "@parcel/watcher-linux-arm-musl": "2.5.0",
- "@parcel/watcher-android-arm64": "2.5.0",
- "@parcel/watcher-freebsd-x64": "2.5.0"
+ "@parcel/watcher-linux-x64-glibc": "2.5.0"
}
}

0 comments on commit 37ec6c8

Please sign in to comment.