-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
1 parent
f0aecbe
commit f52bd28
Showing
14 changed files
with
147 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,19 @@ | |
}, | ||
"./shims/banner": { | ||
"require": "./shims/banner/dist/index.cjs", | ||
"import": "./shims/banner/dist/index.cjs" | ||
"import": "./shims/banner/dist/index.js" | ||
}, | ||
"./shims/buffer": { | ||
"require": "./shims/buffer/dist/index.cjs", | ||
"import": "./shims/buffer/dist/index.js" | ||
}, | ||
"./shims/global": { | ||
"require": "./shims/global/dist/index.cjs", | ||
"import": "./shims/global/dist/index.js" | ||
}, | ||
"./shims/process": { | ||
"require": "./shims/process/dist/index.cjs", | ||
"import": "./shims/process/dist/index.js" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
|
@@ -44,10 +56,13 @@ | |
"shims" | ||
], | ||
"scripts": { | ||
"build": "run-s build:core build:shims build:shims:banner build:types", | ||
"build": "run-s build:core build:shims build:banner build:types", | ||
"build:banner": "vite-node ./shims/banner/build.ts", | ||
"build:core": "vite build", | ||
"build:shims": "vite build ./shims", | ||
"build:shims:banner": "vite-node ./shims/banner/build.ts", | ||
"build:shims": "run-p build:shims:*", | ||
"build:shims:buffer": "vite build -c ./shims/vite.config.ts ./shims/buffer", | ||
"build:shims:global": "vite build -c ./shims/vite.config.ts ./shims/global", | ||
"build:shims:process": "vite build -c ./shims/vite.config.ts ./shims/process", | ||
"build:types": "run-s typecheck", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix .", | ||
|
@@ -70,16 +85,16 @@ | |
}, | ||
"dependencies": { | ||
"@rollup/plugin-inject": "^5.0.5", | ||
"buffer-polyfill": "npm:buffer@^6.0.3", | ||
"node-stdlib-browser": "^1.2.0", | ||
"process": "^0.11.10" | ||
"node-stdlib-browser": "^1.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.18.8", | ||
"buffer": "6.0.3", | ||
"esbuild": "^0.19.8", | ||
"eslint": "^8.54.0", | ||
"eslint-config-artisan": "^0.2.1", | ||
"npm-run-all": "^4.1.5", | ||
"process": "^0.11.10", | ||
"rollup": "^4.6.0", | ||
"typescript": "4.8.3", | ||
"vite": "^5.0.2", | ||
|
@@ -92,6 +107,9 @@ | |
"access": "public" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"buffer": "6.0.3" | ||
}, | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,5 @@ | ||
{ | ||
"type": "module", | ||
"sideEffects": false, | ||
"main": "./dist/index.cjs" | ||
} |
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,5 @@ | ||
// eslint-disable-next-line unicorn/prefer-node-protocol | ||
import { Buffer } from 'buffer' | ||
|
||
export { Buffer } | ||
export default Buffer |
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,12 @@ | ||
{ | ||
"type": "module", | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js" | ||
} |
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,5 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-this | ||
const global = globalThis || this || self | ||
|
||
export { global } | ||
export default global |
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,12 @@ | ||
{ | ||
"type": "module", | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js" | ||
} |
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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-this | ||
const global = globalThis || this || self | ||
|
||
export { Buffer } from 'buffer-polyfill' | ||
// We cannot use `process-polyfill` as the package name due to a bug in Yarn v1. The errors results in a dependency | ||
// conflict with `node-stdlib-browser` which fails to import `process/browser.js`. | ||
// https://github.com/yarnpkg/yarn/issues/6907 | ||
// eslint-disable-next-line unicorn/prefer-node-protocol | ||
export { default as process } from 'process' | ||
export { global } | ||
import process from 'process' | ||
|
||
export { process } | ||
export default process |
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,12 @@ | ||
{ | ||
"type": "module", | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js" | ||
} |
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.