diff --git a/data/browser.mjs b/data/browser.mjs index e05ec4a..5734e2a 100644 --- a/data/browser.mjs +++ b/data/browser.mjs @@ -515,6 +515,7 @@ export default { NodeIterator: false, NodeList: false, Notification: false, + NotifyPaintEvent: false, OfflineAudioCompletionEvent: false, OfflineAudioContext: false, offscreenBuffering: false, diff --git a/data/nodeBuiltin.mjs b/data/nodeBuiltin.mjs index 65f7b21..0bd7ad4 100644 --- a/data/nodeBuiltin.mjs +++ b/data/nodeBuiltin.mjs @@ -32,6 +32,8 @@ export default { MessageChannel: false, MessageEvent: false, MessagePort: false, + navigator: false, + Navigator: false, performance: false, Performance: false, PerformanceEntry: false, diff --git a/data/shelljs.mjs b/data/shelljs.mjs index cac0aea..bf5ad28 100644 --- a/data/shelljs.mjs +++ b/data/shelljs.mjs @@ -1,3 +1,6 @@ +// This file is autogenerated by scripts +// Do NOT modify this file manually + export default { cat: false, cd: false, @@ -12,6 +15,7 @@ export default { exit: false, find: false, grep: false, + head: false, ln: false, ls: false, mkdir: false, @@ -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, }; diff --git a/globals.json b/globals.json index 9351183..8596011 100644 --- a/globals.json +++ b/globals.json @@ -879,6 +879,7 @@ "NodeIterator": false, "NodeList": false, "Notification": false, + "NotifyPaintEvent": false, "OfflineAudioCompletionEvent": false, "OfflineAudioContext": false, "offscreenBuffering": false, @@ -1752,6 +1753,8 @@ "MessageEvent": false, "MessagePort": false, "module": false, + "navigator": false, + "Navigator": false, "performance": false, "Performance": false, "PerformanceEntry": false, @@ -1820,6 +1823,8 @@ "MessageChannel": false, "MessageEvent": false, "MessagePort": false, + "navigator": false, + "Navigator": false, "performance": false, "Performance": false, "PerformanceEntry": false, @@ -2052,6 +2057,7 @@ "exit": false, "find": false, "grep": false, + "head": false, "ln": false, "ls": false, "mkdir": false, @@ -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": { @@ -2385,6 +2394,8 @@ "MessageChannel": false, "MessageEvent": false, "MessagePort": false, + "navigator": false, + "Navigator": false, "performance": false, "Performance": false, "PerformanceEntry": false, diff --git a/package.json b/package.json index 3fe4533..31adcee 100644 --- a/package.json +++ b/package.json @@ -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" }, @@ -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" diff --git a/scripts/get-shelljs-globals.mjs b/scripts/get-shelljs-globals.mjs new file mode 100644 index 0000000..7644460 --- /dev/null +++ b/scripts/get-shelljs-globals.mjs @@ -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])); +} diff --git a/scripts/update.mjs b/scripts/update.mjs index 4af5bcb..ae60fcd 100644 --- a/scripts/update.mjs +++ b/scripts/update.mjs @@ -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 = [ @@ -23,6 +24,10 @@ const ALL_JOBS = [ environment: 'worker', getGlobals: getWebWorkerGlobals, }, + { + environment: 'shelljs', + getGlobals: getShelljsGlobals, + }, ]; async function run(options) {