-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
112 additions
and
171 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |