Skip to content

Commit

Permalink
Merge branch 'main' into build-script
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Feb 21, 2024
2 parents f679172 + ce42309 commit d52f23e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/browser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ export default {
NodeIterator: false,
NodeList: false,
Notification: false,
NotifyPaintEvent: false,
OfflineAudioCompletionEvent: false,
OfflineAudioContext: false,
offscreenBuffering: false,
Expand Down
2 changes: 2 additions & 0 deletions data/nodeBuiltin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export default {
MessageChannel: false,
MessageEvent: false,
MessagePort: false,
navigator: false,
Navigator: false,
performance: false,
Performance: false,
PerformanceEntry: false,
Expand Down
9 changes: 8 additions & 1 deletion data/shelljs.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file is autogenerated by scripts
// Do NOT modify this file manually

export default {
cat: false,
cd: false,
Expand All @@ -12,6 +15,7 @@ export default {
exit: false,
find: false,
grep: false,
head: false,
ln: false,
ls: false,
mkdir: false,
Expand All @@ -22,9 +26,12 @@ export default {
rm: false,
sed: false,
set: false,
target: false,
ShellString: false,
sort: false,
tail: false,
tempdir: false,
test: false,
touch: false,
uniq: false,
which: false,
};
13 changes: 12 additions & 1 deletion globals.json
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@
"NodeIterator": false,
"NodeList": false,
"Notification": false,
"NotifyPaintEvent": false,
"OfflineAudioCompletionEvent": false,
"OfflineAudioContext": false,
"offscreenBuffering": false,
Expand Down Expand Up @@ -1752,6 +1753,8 @@
"MessageEvent": false,
"MessagePort": false,
"module": false,
"navigator": false,
"Navigator": false,
"performance": false,
"Performance": false,
"PerformanceEntry": false,
Expand Down Expand Up @@ -1820,6 +1823,8 @@
"MessageChannel": false,
"MessageEvent": false,
"MessagePort": false,
"navigator": false,
"Navigator": false,
"performance": false,
"Performance": false,
"PerformanceEntry": false,
Expand Down Expand Up @@ -2052,6 +2057,7 @@
"exit": false,
"find": false,
"grep": false,
"head": false,
"ln": false,
"ls": false,
"mkdir": false,
Expand All @@ -2062,10 +2068,13 @@
"rm": false,
"sed": false,
"set": false,
"target": false,
"ShellString": false,
"sort": false,
"tail": false,
"tempdir": false,
"test": false,
"touch": false,
"uniq": false,
"which": false
},
"prototypejs": {
Expand Down Expand Up @@ -2385,6 +2394,8 @@
"MessageChannel": false,
"MessageEvent": false,
"MessagePort": false,
"navigator": false,
"Navigator": false,
"performance": false,
"Performance": false,
"PerformanceEntry": false,
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"update:builtin": "node scripts/update.mjs --environment=builtin",
"update:nodeBuiltin": "node scripts/update.mjs --environment=nodeBuiltin",
"update:worker": "node scripts/update.mjs --environment=worker",
"update:shelljs": "node scripts/update.mjs --environment=shelljs",
"build": "run-s build:data build:types",
"build": "run-p \"build:*\"",
"build:data": "node scripts/generate-data.mjs",
"build:types": "node scripts/generate-types.mjs"
},
Expand All @@ -49,6 +51,7 @@
"npm-run-all2": "^6.1.2",
"outdent": "^0.8.0",
"puppeteer": "^22.1.0",
"shelljs": "^0.8.5",
"tsd": "^0.30.4",
"type-fest": "^4.10.2",
"xo": "^0.57.0"
Expand Down
6 changes: 6 additions & 0 deletions scripts/get-shelljs-globals.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import shelljs from 'shelljs';

// https://github.com/shelljs/shelljs/blob/2ff87eff00456ac5f21c67d3bb0699e5bdfa8851/global.js#L4-L6
export default function getShelljsGlobals() {
return Object.fromEntries(Object.keys(shelljs).map(name => [name, false]));
}
5 changes: 5 additions & 0 deletions scripts/update.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {execaCommand} from 'execa';
import getBuiltinGlobals from './get-builtin-globals.mjs';
import getNodeBuiltinGlobals from './get-node-builtin-globals.mjs';
import {getBrowserGlobals, getWebWorkerGlobals} from './get-browser-globals.mjs';
import getShelljsGlobals from './get-shelljs-globals.mjs';
import {updateGlobals} from './utilities.mjs';

const ALL_JOBS = [
Expand All @@ -23,6 +24,10 @@ const ALL_JOBS = [
environment: 'worker',
getGlobals: getWebWorkerGlobals,
},
{
environment: 'shelljs',
getGlobals: getShelljsGlobals,
},
];

async function run(options) {
Expand Down

0 comments on commit d52f23e

Please sign in to comment.