-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: replace
patch-package
with git apply
- yarn patch-commit is used to generate patches. patch-package cannot be used to apply those patches on install due to directory mismatches (e.g. a/index.js vs a/node_modules/globby/index.js). patches cannot be created with patch-package either - ds300/patch-package#272 - https://git-scm.com/docs/git-apply - https://yarnpkg.com/cli/patch-commit - https://yarnpkg.com/cli/patch Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
a7209bf
commit bfa7a1e
Showing
8 changed files
with
93 additions
and
192 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
|
@@ -92,7 +92,6 @@ | |
"fs-extra": "10.1.0", | ||
"globby": "13.1.2", | ||
"mlly": "0.5.14", | ||
"patch-package": "6.4.7", | ||
"pathe": "0.3.5", | ||
"postinstall-postinstall": "2.1.0" | ||
}, | ||
|
@@ -176,7 +175,9 @@ | |
}, | ||
"resolutions": { | ||
"@ardatan/sync-fetch": "larsgw/sync-fetch#head=worker_threads", | ||
"graphql-config": "patch:[email protected]#patches/graphql-config+4.3.5.dev.patch" | ||
"globby@npm:13.1.2": "patch:globby@npm%3A13.1.2#patches/globby+13.1.2.patch", | ||
"graphql-config": "patch:graphql-config@npm%3A4.3.5#patches/graphql-config+4.3.5.dev.patch", | ||
"mlly": "patch:mlly@npm%3A0.5.14#patches/mlly+0.5.14.patch" | ||
}, | ||
"engines": { | ||
"yarn": "4.0.0-rc.14" | ||
|
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,13 @@ | ||
diff --git a/index.js b/index.js | ||
index ce5a65639d49b3fc665b35d4b0d162e092c9d612..445bbadf62a85b4aab4728c3aafa34fd30c3caf9 100644 | ||
--- a/index.js | ||
+++ b/index.js | ||
@@ -29,7 +29,7 @@ const checkCwdOption = options => { | ||
|
||
let stat; | ||
try { | ||
- stat = fs.statSync(options.cwd); | ||
+ stat = (options?.fs ?? fs).statSync(options.cwd); | ||
} catch { | ||
return; | ||
} |
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,30 @@ | ||
diff --git a/dist/index.cjs b/dist/index.cjs | ||
index 887890308b948028ddde32ae180f3d0ca4519f39..7fc5b3459971de6cf6ada18934f676717badcf24 100644 | ||
--- a/dist/index.cjs | ||
+++ b/dist/index.cjs | ||
@@ -1096,8 +1096,8 @@ function createResolve(defaults) { | ||
|
||
const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm; | ||
const DYNAMIC_IMPORT_RE = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm; | ||
-const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class))\s+(?<name>[\w$_]+)/g; | ||
-const EXPORT_NAMED_RE = /\bexport\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; | ||
+const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class|type))\s+(?<name>[\w$_]+)/g; | ||
+const EXPORT_NAMED_RE = /\bexport( type)?\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; | ||
const EXPORT_STAR_RE = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; | ||
const EXPORT_DEFAULT_RE = /\bexport\s+default\s+/g; | ||
function findStaticImports(code) { | ||
diff --git a/dist/index.mjs b/dist/index.mjs | ||
index 2114bf00092fc74642243b3ded5a718183a01039..e9409fc1187a9579eeb5129113f226625798b95c 100644 | ||
--- a/dist/index.mjs | ||
+++ b/dist/index.mjs | ||
@@ -1086,8 +1086,8 @@ function createResolve(defaults) { | ||
|
||
const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm; | ||
const DYNAMIC_IMPORT_RE = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm; | ||
-const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class))\s+(?<name>[\w$_]+)/g; | ||
-const EXPORT_NAMED_RE = /\bexport\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; | ||
+const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class|type))\s+(?<name>[\w$_]+)/g; | ||
+const EXPORT_NAMED_RE = /\bexport( type)?\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; | ||
const EXPORT_STAR_RE = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; | ||
const EXPORT_DEFAULT_RE = /\bexport\s+default\s+/g; | ||
function findStaticImports(code) { |
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
Oops, something went wrong.