diff --git a/.pnp.cjs b/.pnp.cjs index e0f91f8..7687996 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -1,5 +1,6 @@ #!/usr/bin/env node /* eslint-disable */ +// @ts-nocheck "use strict"; const RAW_RUNTIME_STATE = @@ -30,8 +31,8 @@ const RAW_RUNTIME_STATE = ["@arcanis/slice-ansi", "npm:2.0.1"],\ ["@reduxjs/toolkit", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:2.5.0"],\ ["@types/node", "npm:20.11.24"],\ - ["@types/react", "npm:18.2.61"],\ - ["@types/react-reconciler", "npm:0.28.2"],\ + ["@types/react", "npm:19.0.10"],\ + ["@types/react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.28.9"],\ ["@types/react-refresh", "npm:0.14.0"],\ ["@types/zen-observable", "npm:0.8.3"],\ ["@xterm/addon-fit", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.9.0"],\ @@ -42,14 +43,14 @@ const RAW_RUNTIME_STATE = ["mono-layout", "npm:0.14.3"],\ ["node-pty", "npm:1.1.0-beta27"],\ ["ollama", "npm:0.5.12"],\ - ["react", "npm:18.2.0"],\ - ["react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.29.0"],\ + ["react", "npm:19.0.0"],\ + ["react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.31.0"],\ ["react-redux", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:9.2.0"],\ ["react-refresh", "npm:0.14.0"],\ ["tailwindcss", "npm:3.4.1"],\ ["term-strings", "npm:0.16.2"],\ ["tsx", "npm:4.7.1"],\ - ["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7"],\ + ["typescript", "patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5"],\ ["vitest", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:1.3.1"],\ ["vscode-oniguruma", "npm:1.7.0"],\ ["vscode-textmate", "npm:8.0.0"],\ @@ -663,10 +664,10 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/__virtual__/@reduxjs-toolkit-virtual-513ac655d0/2/.yarn/berry/cache/@reduxjs-toolkit-npm-2.5.0-9bdc99574d-10c0.zip/node_modules/@reduxjs/toolkit/",\ "packageDependencies": [\ ["@reduxjs/toolkit", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:2.5.0"],\ - ["@types/react", "npm:18.2.61"],\ + ["@types/react", "npm:19.0.10"],\ ["@types/react-redux", null],\ ["immer", "npm:10.1.1"],\ - ["react", "npm:18.2.0"],\ + ["react", "npm:19.0.0"],\ ["react-redux", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:9.2.0"],\ ["redux", "npm:5.0.1"],\ ["redux-thunk", "virtual:513ac655d0d8ec3e6cdd86bede468a55df9180e3281c7dcb89c67497e123515cecafc5040ad953896533739f296e7c1f234ff88589565f90ee62e0c30788a2ac#npm:3.1.0"],\ @@ -898,33 +899,32 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["@types/prop-types", [\ - ["npm:15.7.5", {\ - "packageLocation": "../.yarn/berry/cache/@types-prop-types-npm-15.7.5-2aa48aa177-10c0.zip/node_modules/@types/prop-types/",\ - "packageDependencies": [\ - ["@types/prop-types", "npm:15.7.5"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["@types/react", [\ - ["npm:18.2.61", {\ - "packageLocation": "../.yarn/berry/cache/@types-react-npm-18.2.61-fd35c6cee7-10c0.zip/node_modules/@types/react/",\ + ["npm:19.0.10", {\ + "packageLocation": "../.yarn/berry/cache/@types-react-npm-19.0.10-ad7744c06a-10c0.zip/node_modules/@types/react/",\ "packageDependencies": [\ - ["@types/react", "npm:18.2.61"],\ - ["@types/prop-types", "npm:15.7.5"],\ - ["@types/scheduler", "npm:0.16.3"],\ + ["@types/react", "npm:19.0.10"],\ ["csstype", "npm:3.1.1"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@types/react-reconciler", [\ - ["npm:0.28.2", {\ - "packageLocation": "../.yarn/berry/cache/@types-react-reconciler-npm-0.28.2-694fc46c5c-10c0.zip/node_modules/@types/react-reconciler/",\ + ["npm:0.28.9", {\ + "packageLocation": "../.yarn/berry/cache/@types-react-reconciler-npm-0.28.9-8c562f42b4-10c0.zip/node_modules/@types/react-reconciler/",\ + "packageDependencies": [\ + ["@types/react-reconciler", "npm:0.28.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.28.9", {\ + "packageLocation": "./.yarn/__virtual__/@types-react-reconciler-virtual-402613db36/2/.yarn/berry/cache/@types-react-reconciler-npm-0.28.9-8c562f42b4-10c0.zip/node_modules/@types/react-reconciler/",\ "packageDependencies": [\ - ["@types/react-reconciler", "npm:0.28.2"],\ - ["@types/react", "npm:18.2.61"]\ + ["@types/react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.28.9"],\ + ["@types/react", "npm:19.0.10"]\ + ],\ + "packagePeers": [\ + "@types/react"\ ],\ "linkType": "HARD"\ }]\ @@ -940,15 +940,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["@types/scheduler", [\ - ["npm:0.16.3", {\ - "packageLocation": "../.yarn/berry/cache/@types-scheduler-npm-0.16.3-887bfc0086-10c0.zip/node_modules/@types/scheduler/",\ - "packageDependencies": [\ - ["@types/scheduler", "npm:0.16.3"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["@types/use-sync-external-store", [\ ["npm:0.0.6", {\ "packageLocation": "../.yarn/berry/cache/@types-use-sync-external-store-npm-0.0.6-9e5c635381-10c0.zip/node_modules/@types/use-sync-external-store/",\ @@ -2135,13 +2126,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["js-tokens", [\ - ["npm:4.0.0", {\ - "packageLocation": "../.yarn/berry/cache/js-tokens-npm-4.0.0-0ac852e9e2-10c0.zip/node_modules/js-tokens/",\ - "packageDependencies": [\ - ["js-tokens", "npm:4.0.0"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:8.0.3", {\ "packageLocation": "../.yarn/berry/cache/js-tokens-npm-8.0.3-d841c22eba-10c0.zip/node_modules/js-tokens/",\ "packageDependencies": [\ @@ -2204,16 +2188,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["loose-envify", [\ - ["npm:1.4.0", {\ - "packageLocation": "../.yarn/berry/cache/loose-envify-npm-1.4.0-6307b72ccf-10c0.zip/node_modules/loose-envify/",\ - "packageDependencies": [\ - ["loose-envify", "npm:1.4.0"],\ - ["js-tokens", "npm:4.0.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["lorem-ipsum", [\ ["npm:2.0.8", {\ "packageLocation": "../.yarn/berry/cache/lorem-ipsum-npm-2.0.8-a5c19f179a-10c0.zip/node_modules/lorem-ipsum/",\ @@ -2959,11 +2933,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["react", [\ - ["npm:18.2.0", {\ - "packageLocation": "../.yarn/berry/cache/react-npm-18.2.0-1eae08fee2-10c0.zip/node_modules/react/",\ + ["npm:19.0.0", {\ + "packageLocation": "../.yarn/berry/cache/react-npm-19.0.0-e33c9aa1c0-10c0.zip/node_modules/react/",\ "packageDependencies": [\ - ["react", "npm:18.2.0"],\ - ["loose-envify", "npm:1.4.0"]\ + ["react", "npm:19.0.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -2978,21 +2951,20 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["react-reconciler", [\ - ["npm:0.29.0", {\ - "packageLocation": "../.yarn/berry/cache/react-reconciler-npm-0.29.0-57f1460fdd-10c0.zip/node_modules/react-reconciler/",\ + ["npm:0.31.0", {\ + "packageLocation": "../.yarn/berry/cache/react-reconciler-npm-0.31.0-8f5bda4868-10c0.zip/node_modules/react-reconciler/",\ "packageDependencies": [\ - ["react-reconciler", "npm:0.29.0"]\ + ["react-reconciler", "npm:0.31.0"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.29.0", {\ - "packageLocation": "./.yarn/__virtual__/react-reconciler-virtual-21ea241e84/2/.yarn/berry/cache/react-reconciler-npm-0.29.0-57f1460fdd-10c0.zip/node_modules/react-reconciler/",\ + ["virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.31.0", {\ + "packageLocation": "./.yarn/__virtual__/react-reconciler-virtual-da845114da/2/.yarn/berry/cache/react-reconciler-npm-0.31.0-8f5bda4868-10c0.zip/node_modules/react-reconciler/",\ "packageDependencies": [\ - ["react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.29.0"],\ - ["@types/react", "npm:18.2.61"],\ - ["loose-envify", "npm:1.4.0"],\ - ["react", "npm:18.2.0"],\ - ["scheduler", "npm:0.23.0"]\ + ["react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.31.0"],\ + ["@types/react", "npm:19.0.10"],\ + ["react", "npm:19.0.0"],\ + ["scheduler", "npm:0.25.0"]\ ],\ "packagePeers": [\ "@types/react",\ @@ -3013,10 +2985,10 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/__virtual__/react-redux-virtual-02d52350aa/2/.yarn/berry/cache/react-redux-npm-9.2.0-d87bb27c82-10c0.zip/node_modules/react-redux/",\ "packageDependencies": [\ ["react-redux", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:9.2.0"],\ - ["@types/react", "npm:18.2.61"],\ + ["@types/react", "npm:19.0.10"],\ ["@types/redux", null],\ ["@types/use-sync-external-store", "npm:0.0.6"],\ - ["react", "npm:18.2.0"],\ + ["react", "npm:19.0.0"],\ ["redux", null],\ ["use-sync-external-store", "virtual:02d52350aa1f766fd414968e10b8ef7379e27ac584528548d529aa2b10eb0a7defdfca7198dd0590c7e3d49907e81041c0e9e8ec4e98a024a329f7dd9f181b81#npm:1.4.0"]\ ],\ @@ -3181,11 +3153,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["scheduler", [\ - ["npm:0.23.0", {\ - "packageLocation": "../.yarn/berry/cache/scheduler-npm-0.23.0-a379a6bc3b-10c0.zip/node_modules/scheduler/",\ + ["npm:0.25.0", {\ + "packageLocation": "../.yarn/berry/cache/scheduler-npm-0.25.0-f89e6cad04-10c0.zip/node_modules/scheduler/",\ "packageDependencies": [\ - ["scheduler", "npm:0.23.0"],\ - ["loose-envify", "npm:1.4.0"]\ + ["scheduler", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -3466,8 +3437,8 @@ const RAW_RUNTIME_STATE = ["@arcanis/slice-ansi", "npm:2.0.1"],\ ["@reduxjs/toolkit", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:2.5.0"],\ ["@types/node", "npm:20.11.24"],\ - ["@types/react", "npm:18.2.61"],\ - ["@types/react-reconciler", "npm:0.28.2"],\ + ["@types/react", "npm:19.0.10"],\ + ["@types/react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.28.9"],\ ["@types/react-refresh", "npm:0.14.0"],\ ["@types/zen-observable", "npm:0.8.3"],\ ["@xterm/addon-fit", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.9.0"],\ @@ -3478,14 +3449,14 @@ const RAW_RUNTIME_STATE = ["mono-layout", "npm:0.14.3"],\ ["node-pty", "npm:1.1.0-beta27"],\ ["ollama", "npm:0.5.12"],\ - ["react", "npm:18.2.0"],\ - ["react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.29.0"],\ + ["react", "npm:19.0.0"],\ + ["react-reconciler", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:0.31.0"],\ ["react-redux", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:9.2.0"],\ ["react-refresh", "npm:0.14.0"],\ ["tailwindcss", "npm:3.4.1"],\ ["term-strings", "npm:0.16.2"],\ ["tsx", "npm:4.7.1"],\ - ["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7"],\ + ["typescript", "patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5"],\ ["vitest", "virtual:94d85169d29260b76ffb0219eec7ea8a47862ee24c417cc67801a50351aabc75e3f1a8e4fb27a447fea9891b861552e01dce89d0e4e10725cf4ae6f3f194f720#npm:1.3.1"],\ ["vscode-oniguruma", "npm:1.7.0"],\ ["vscode-textmate", "npm:8.0.0"],\ @@ -3610,10 +3581,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["typescript", [\ - ["patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7", {\ - "packageLocation": "../.yarn/berry/cache/typescript-patch-4778c7998b-10c0.zip/node_modules/typescript/",\ + ["patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5", {\ + "packageLocation": "../.yarn/berry/cache/typescript-patch-6da68bae26-10c0.zip/node_modules/typescript/",\ "packageDependencies": [\ - ["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7"]\ + ["typescript", "patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5"]\ ],\ "linkType": "HARD"\ }]\ @@ -3675,8 +3646,8 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/__virtual__/use-sync-external-store-virtual-b2a522ebb1/2/.yarn/berry/cache/use-sync-external-store-npm-1.4.0-176448bea1-10c0.zip/node_modules/use-sync-external-store/",\ "packageDependencies": [\ ["use-sync-external-store", "virtual:02d52350aa1f766fd414968e10b8ef7379e27ac584528548d529aa2b10eb0a7defdfca7198dd0590c7e3d49907e81041c0e9e8ec4e98a024a329f7dd9f181b81#npm:1.4.0"],\ - ["@types/react", "npm:18.2.61"],\ - ["react", "npm:18.2.0"]\ + ["@types/react", "npm:19.0.10"],\ + ["react", "npm:19.0.0"]\ ],\ "packagePeers": [\ "@types/react",\ @@ -4120,26 +4091,24 @@ function ERR_DIR_CLOSED() { const DEFAULT_MODE = S_IFREG | 420; class StatEntry { - constructor() { - this.uid = 0; - this.gid = 0; - this.size = 0; - this.blksize = 0; - this.atimeMs = 0; - this.mtimeMs = 0; - this.ctimeMs = 0; - this.birthtimeMs = 0; - this.atime = new Date(0); - this.mtime = new Date(0); - this.ctime = new Date(0); - this.birthtime = new Date(0); - this.dev = 0; - this.ino = 0; - this.mode = DEFAULT_MODE; - this.nlink = 1; - this.rdev = 0; - this.blocks = 1; - } + uid = 0; + gid = 0; + size = 0; + blksize = 0; + atimeMs = 0; + mtimeMs = 0; + ctimeMs = 0; + birthtimeMs = 0; + atime = /* @__PURE__ */ new Date(0); + mtime = /* @__PURE__ */ new Date(0); + ctime = /* @__PURE__ */ new Date(0); + birthtime = /* @__PURE__ */ new Date(0); + dev = 0; + ino = 0; + mode = DEFAULT_MODE; + nlink = 1; + rdev = 0; + blocks = 1; isBlockDevice() { return false; } @@ -4163,30 +4132,28 @@ class StatEntry { } } class BigIntStatsEntry { - constructor() { - this.uid = BigInt(0); - this.gid = BigInt(0); - this.size = BigInt(0); - this.blksize = BigInt(0); - this.atimeMs = BigInt(0); - this.mtimeMs = BigInt(0); - this.ctimeMs = BigInt(0); - this.birthtimeMs = BigInt(0); - this.atimeNs = BigInt(0); - this.mtimeNs = BigInt(0); - this.ctimeNs = BigInt(0); - this.birthtimeNs = BigInt(0); - this.atime = new Date(0); - this.mtime = new Date(0); - this.ctime = new Date(0); - this.birthtime = new Date(0); - this.dev = BigInt(0); - this.ino = BigInt(0); - this.mode = BigInt(DEFAULT_MODE); - this.nlink = BigInt(1); - this.rdev = BigInt(0); - this.blocks = BigInt(1); - } + uid = BigInt(0); + gid = BigInt(0); + size = BigInt(0); + blksize = BigInt(0); + atimeMs = BigInt(0); + mtimeMs = BigInt(0); + ctimeMs = BigInt(0); + birthtimeMs = BigInt(0); + atimeNs = BigInt(0); + mtimeNs = BigInt(0); + ctimeNs = BigInt(0); + birthtimeNs = BigInt(0); + atime = /* @__PURE__ */ new Date(0); + mtime = /* @__PURE__ */ new Date(0); + ctime = /* @__PURE__ */ new Date(0); + birthtime = /* @__PURE__ */ new Date(0); + dev = BigInt(0); + ino = BigInt(0); + mode = BigInt(DEFAULT_MODE); + nlink = BigInt(1); + rdev = BigInt(0); + blocks = BigInt(1); isBlockDevice() { return false; } @@ -4221,7 +4188,7 @@ function clearStats(stats) { } else if (typeof element === `bigint`) { stats[key] = BigInt(0); } else if (nodeUtils__namespace.types.isDate(element)) { - stats[key] = new Date(0); + stats[key] = /* @__PURE__ */ new Date(0); } } } @@ -4312,6 +4279,9 @@ const Filename = { manifest: `package.json`, lockfile: `yarn.lock`, virtual: `__virtual__`, + /** + * @deprecated + */ pnpJs: `.pnp.js`, pnpCjs: `.pnp.cjs`, pnpData: `.pnp.data.json`, @@ -4593,8 +4563,8 @@ class CustomDir { this.path = path; this.nextDirent = nextDirent; this.opts = opts; - this.closed = false; } + closed = false; throwIfClosed() { if (this.closed) { throw ERR_DIR_CLOSED(); @@ -4652,21 +4622,25 @@ function assertStatus(current, expected) { } } class CustomStatWatcher extends events.EventEmitter { + fakeFs; + path; + bigint; + status = "ready" /* Ready */; + changeListeners = /* @__PURE__ */ new Map(); + lastStats; + startTimeout = null; + static create(fakeFs, path, opts) { + const statWatcher = new CustomStatWatcher(fakeFs, path, opts); + statWatcher.start(); + return statWatcher; + } constructor(fakeFs, path, { bigint = false } = {}) { super(); - this.status = "ready" /* Ready */; - this.changeListeners = /* @__PURE__ */ new Map(); - this.startTimeout = null; this.fakeFs = fakeFs; this.path = path; this.bigint = bigint; this.lastStats = this.stat(); } - static create(fakeFs, path, opts) { - const statWatcher = new CustomStatWatcher(fakeFs, path, opts); - statWatcher.start(); - return statWatcher; - } start() { assertStatus(this.status, "ready" /* Ready */); this.status = "running" /* Running */; @@ -4694,6 +4668,11 @@ class CustomStatWatcher extends events.EventEmitter { return clearStats(statInstance); } } + /** + * Creates an interval whose callback compares the current stats with the previous stats and notifies all listeners in case of changes. + * + * @param opts.persistent Decides whether the interval should be immediately unref-ed. + */ makeInterval(opts) { const interval = setInterval(() => { const currentStats = this.stat(); @@ -4705,10 +4684,16 @@ class CustomStatWatcher extends events.EventEmitter { }, opts.interval); return opts.persistent ? interval : interval.unref(); } + /** + * Registers a listener and assigns it an interval. + */ registerChangeListener(listener, opts) { this.addListener("change" /* Change */, listener); this.changeListeners.set(listener, this.makeInterval(opts)); } + /** + * Unregisters the listener and clears the assigned interval. + */ unregisterChangeListener(listener) { this.removeListener("change" /* Change */, listener); const interval = this.changeListeners.get(listener); @@ -4716,6 +4701,9 @@ class CustomStatWatcher extends events.EventEmitter { clearInterval(interval); this.changeListeners.delete(listener); } + /** + * Unregisters all listeners and clears all assigned intervals. + */ unregisterAllChangeListeners() { for (const listener of this.changeListeners.keys()) { this.unregisterChangeListener(listener); @@ -4724,11 +4712,17 @@ class CustomStatWatcher extends events.EventEmitter { hasChangeListeners() { return this.changeListeners.size > 0; } + /** + * Refs all stored intervals. + */ ref() { for (const interval of this.changeListeners.values()) interval.ref(); return this; } + /** + * Unrefs all stored intervals. + */ unref() { for (const interval of this.changeListeners.values()) interval.unref(); @@ -4799,6 +4793,7 @@ function unwatchAllFiles(fakeFs) { } class FakeFS { + pathUtils; constructor(pathUtils) { this.pathUtils = pathUtils; } @@ -5346,6 +5341,12 @@ class ProxiedFS extends FakeFS { rmdirSync(p, opts) { return this.baseFs.rmdirSync(this.mapToBase(p), opts); } + async rmPromise(p, opts) { + return this.baseFs.rmPromise(this.mapToBase(p), opts); + } + rmSync(p, opts) { + return this.baseFs.rmSync(this.mapToBase(p), opts); + } async linkPromise(existingP, newP) { return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); } @@ -5401,6 +5402,7 @@ class ProxiedFS extends FakeFS { watch(p, a, b) { return this.baseFs.watch( this.mapToBase(p), + // @ts-expect-error a, b ); @@ -5408,6 +5410,7 @@ class ProxiedFS extends FakeFS { watchFile(p, a, b) { return this.baseFs.watchFile( this.mapToBase(p), + // @ts-expect-error a, b ); @@ -5431,6 +5434,7 @@ function direntToPortable(dirent) { return portableDirent; } class NodeFS extends BasePortableFakeFS { + realFs; constructor(realFs = fs__default.default) { super(); this.realFs = realFs; @@ -5727,6 +5731,18 @@ class NodeFS extends BasePortableFakeFS { rmdirSync(p, opts) { return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); } + async rmPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rm(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rm(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmSync(p, opts) { + return this.realFs.rmSync(npath.fromPortablePath(p), opts); + } async linkPromise(existingP, newP) { return await new Promise((resolve, reject) => { this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); @@ -5814,6 +5830,7 @@ class NodeFS extends BasePortableFakeFS { watch(p, a, b) { return this.realFs.watch( npath.fromPortablePath(p), + // @ts-expect-error a, b ); @@ -5821,6 +5838,7 @@ class NodeFS extends BasePortableFakeFS { watchFile(p, a, b) { return this.realFs.watchFile( npath.fromPortablePath(p), + // @ts-expect-error a, b ); @@ -5841,16 +5859,25 @@ class NodeFS extends BasePortableFakeFS { const MOUNT_MASK = 4278190080; class MountFS extends BasePortableFakeFS { + baseFs; + mountInstances; + fdMap = /* @__PURE__ */ new Map(); + nextFd = 3; + factoryPromise; + factorySync; + filter; + getMountPoint; + magic; + maxAge; + maxOpenFiles; + typeCheck; + isMount = /* @__PURE__ */ new Set(); + notMount = /* @__PURE__ */ new Set(); + realPaths = /* @__PURE__ */ new Map(); constructor({ baseFs = new NodeFS(), filter = null, magicByte = 42, maxOpenFiles = Infinity, useCache = true, maxAge = 5e3, typeCheck = fs.constants.S_IFREG, getMountPoint, factoryPromise, factorySync }) { if (Math.floor(magicByte) !== magicByte || !(magicByte > 1 && magicByte <= 127)) throw new Error(`The magic byte must be set to a round value between 1 and 127 included`); super(); - this.fdMap = /* @__PURE__ */ new Map(); - this.nextFd = 3; - this.isMount = /* @__PURE__ */ new Set(); - this.notMount = /* @__PURE__ */ new Set(); - this.realPaths = /* @__PURE__ */ new Map(); - this.limitOpenFilesTimeout = null; this.baseFs = baseFs; this.mountInstances = useCache ? /* @__PURE__ */ new Map() : null; this.factoryPromise = factoryPromise; @@ -6382,6 +6409,20 @@ class MountFS extends BasePortableFakeFS { return mountFs.rmdirSync(subPath, opts); }); } + async rmPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.rmPromise(p, opts); + }, async (mountFs, { subPath }) => { + return await mountFs.rmPromise(subPath, opts); + }); + } + rmSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.rmSync(p, opts); + }, (mountFs, { subPath }) => { + return mountFs.rmSync(subPath, opts); + }); + } async linkPromise(existingP, newP) { return await this.makeCallPromise(newP, async () => { return await this.baseFs.linkPromise(existingP, newP); @@ -6492,12 +6533,14 @@ class MountFS extends BasePortableFakeFS { return this.makeCallSync(p, () => { return this.baseFs.watch( p, + // @ts-expect-error a, b ); }, (mountFs, { subPath }) => { return mountFs.watch( subPath, + // @ts-expect-error a, b ); @@ -6507,6 +6550,7 @@ class MountFS extends BasePortableFakeFS { return this.makeCallSync(p, () => { return this.baseFs.watchFile( p, + // @ts-expect-error a, b ); @@ -6557,7 +6601,7 @@ class MountFS extends BasePortableFakeFS { if (this.notMount.has(filePath)) continue; try { - if (this.typeCheck !== null && (this.baseFs.lstatSync(filePath).mode & fs.constants.S_IFMT) !== this.typeCheck) { + if (this.typeCheck !== null && (this.baseFs.statSync(filePath).mode & fs.constants.S_IFMT) !== this.typeCheck) { this.notMount.add(filePath); continue; } @@ -6572,6 +6616,7 @@ class MountFS extends BasePortableFakeFS { }; } } + limitOpenFilesTimeout = null; limitOpenFiles(max) { if (this.mountInstances === null) return; @@ -6661,6 +6706,7 @@ class MountFS extends BasePortableFakeFS { } class PosixFS extends ProxiedFS { + baseFs; constructor(baseFs) { super(npath); this.baseFs = baseFs; @@ -6677,10 +6723,7 @@ const NUMBER_REGEXP = /^[0-9]+$/; const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; class VirtualFS extends ProxiedFS { - constructor({ baseFs = new NodeFS() } = {}) { - super(ppath); - this.baseFs = baseFs; - } + baseFs; static makeVirtualPath(base, component, to) { if (ppath.basename(base) !== `__virtual__`) throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); @@ -6710,6 +6753,10 @@ class VirtualFS extends ProxiedFS { const subpath = match[5] || `.`; return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath)); } + constructor({ baseFs = new NodeFS() } = {}) { + super(ppath); + this.baseFs = baseFs; + } getExtractHint(hints) { return this.baseFs.getExtractHint(hints); } @@ -6751,6 +6798,7 @@ class VirtualFS extends ProxiedFS { const URL = Number(process.versions.node.split('.', 1)[0]) < 20 ? url.URL : globalThis.URL; class NodePathFS extends ProxiedFS { + baseFs; constructor(baseFs) { super(npath); this.baseFs = baseFs; @@ -6778,7 +6826,6 @@ function isUtf8(buf, str) { return Buffer.byteLength(str) === buf.byteLength; } -var _a, _b, _c, _d; const kBaseFs = Symbol(`kBaseFs`); const kFd = Symbol(`kFd`); const kClosePromise = Symbol(`kClosePromise`); @@ -6788,11 +6835,13 @@ const kRefs = Symbol(`kRefs`); const kRef = Symbol(`kRef`); const kUnref = Symbol(`kUnref`); class FileHandle { + [kBaseFs]; + [kFd]; + [kRefs] = 1; + [kClosePromise] = void 0; + [kCloseResolve] = void 0; + [kCloseReject] = void 0; constructor(fd, baseFs) { - this[_a] = 1; - this[_b] = void 0; - this[_c] = void 0; - this[_d] = void 0; this[kBaseFs] = baseFs; this[kFd] = fd; } @@ -6830,9 +6879,11 @@ class FileHandle { createWriteStream(options) { return this[kBaseFs].createWriteStream(null, { ...options, fd: this.fd }); } + // FIXME: Missing FakeFS version datasync() { throw new Error(`Method not implemented.`); } + // FIXME: Missing FakeFS version sync() { throw new Error(`Method not implemented.`); } @@ -6897,6 +6948,7 @@ class FileHandle { this[kUnref](); } } + // FIXME: Missing FakeFS version utimes(atime, mtime) { throw new Error(`Method not implemented.`); } @@ -6925,6 +6977,7 @@ class FileHandle { this[kUnref](); } } + // TODO: Use writev from FakeFS when that is implemented async writev(buffers, position) { try { this[kRef](this.writev); @@ -6949,14 +7002,13 @@ class FileHandle { this[kUnref](); } } + // FIXME: Missing FakeFS version readv(buffers, position) { throw new Error(`Method not implemented.`); } close() { - if (this[kFd] === -1) - return Promise.resolve(); - if (this[kClosePromise]) - return this[kClosePromise]; + if (this[kFd] === -1) return Promise.resolve(); + if (this[kClosePromise]) return this[kClosePromise]; this[kRefs]--; if (this[kRefs] === 0) { const fd = this[kFd]; @@ -6976,7 +7028,7 @@ class FileHandle { } return this[kClosePromise]; } - [(_a = kRefs, _b = kClosePromise, _c = kCloseResolve, _d = kCloseReject, kRef)](caller) { + [kRef](caller) { if (this[kFd] === -1) { const err = new Error(`file closed`); err.code = `EBADF`; @@ -7020,6 +7072,7 @@ const SYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `realpathSync`, `renameSync`, `rmdirSync`, + `rmSync`, `statSync`, `symlinkSync`, `truncateSync`, @@ -7055,6 +7108,7 @@ const ASYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `readlinkPromise`, `renamePromise`, `rmdirPromise`, + `rmPromise`, `statPromise`, `symlinkPromise`, `truncatePromise`, @@ -7234,8 +7288,7 @@ var libzipSync = {exports: {}}; var frozenFs = Object.assign({}, fs__default.default); var createModule = function() { var _scriptDir = void 0; - if (typeof __filename !== "undefined") - _scriptDir = _scriptDir || __filename; + if (typeof __filename !== "undefined") _scriptDir = _scriptDir || __filename; return function(createModule2) { createModule2 = createModule2 || {}; var Module = typeof createModule2 !== "undefined" ? createModule2 : {}; @@ -7270,10 +7323,8 @@ var createModule = function() { if (ret) { return binary ? ret : ret.toString(); } - if (!nodeFS) - nodeFS = frozenFs; - if (!nodePath) - nodePath = path__default.default; + if (!nodeFS) nodeFS = frozenFs; + if (!nodePath) nodePath = path__default.default; filename = nodePath["normalize"](filename); return nodeFS["readFileSync"](filename, binary ? null : "utf8"); }; @@ -7301,23 +7352,18 @@ var createModule = function() { } } moduleOverrides = null; - if (Module["arguments"]) - ; - if (Module["thisProgram"]) - ; - if (Module["quit"]) - ; + if (Module["arguments"]) ; + if (Module["thisProgram"]) ; + if (Module["quit"]) ; var wasmBinary; - if (Module["wasmBinary"]) - wasmBinary = Module["wasmBinary"]; + if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; Module["noExitRuntime"] || true; if (typeof WebAssembly !== "object") { abort("no native wasm support detected"); } function getValue(ptr, type, noSafe) { type = type || "i8"; - if (type.charAt(type.length - 1) === "*") - type = "i32"; + if (type.charAt(type.length - 1) === "*") type = "i32"; switch (type) { case "i1": return HEAP8[ptr >> 0]; @@ -7371,10 +7417,8 @@ var createModule = function() { } }; function convertReturnValue(ret2) { - if (returnType === "string") - return UTF8ToString(ret2); - if (returnType === "boolean") - return Boolean(ret2); + if (returnType === "string") return UTF8ToString(ret2); + if (returnType === "boolean") return Boolean(ret2); return ret2; } var func = getCFunc(ident); @@ -7384,8 +7428,7 @@ var createModule = function() { for (var i = 0; i < args.length; i++) { var converter = toC[argTypes[i]]; if (converter) { - if (stack === 0) - stack = stackSave(); + if (stack === 0) stack = stackSave(); cArgs[i] = converter(args[i]); } else { cArgs[i] = args[i]; @@ -7394,8 +7437,7 @@ var createModule = function() { } var ret = func.apply(null, cArgs); ret = convertReturnValue(ret); - if (stack !== 0) - stackRestore(stack); + if (stack !== 0) stackRestore(stack); return ret; } function cwrap(ident, returnType, argTypes, opts) { @@ -7413,16 +7455,13 @@ var createModule = function() { } var UTF8Decoder = new TextDecoder("utf8"); function UTF8ToString(ptr, maxBytesToRead) { - if (!ptr) - return ""; + if (!ptr) return ""; var maxPtr = ptr + maxBytesToRead; - for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; ) - ++end; + for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; ) ++end; return UTF8Decoder.decode(HEAPU8.subarray(ptr, end)); } function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { - if (!(maxBytesToWrite > 0)) - return 0; + if (!(maxBytesToWrite > 0)) return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; for (var i = 0; i < str.length; ++i) { @@ -7432,23 +7471,19 @@ var createModule = function() { u = 65536 + ((u & 1023) << 10) | u1 & 1023; } if (u <= 127) { - if (outIdx >= endIdx) - break; + if (outIdx >= endIdx) break; heap[outIdx++] = u; } else if (u <= 2047) { - if (outIdx + 1 >= endIdx) - break; + if (outIdx + 1 >= endIdx) break; heap[outIdx++] = 192 | u >> 6; heap[outIdx++] = 128 | u & 63; } else if (u <= 65535) { - if (outIdx + 2 >= endIdx) - break; + if (outIdx + 2 >= endIdx) break; heap[outIdx++] = 224 | u >> 12; heap[outIdx++] = 128 | u >> 6 & 63; heap[outIdx++] = 128 | u & 63; } else { - if (outIdx + 3 >= endIdx) - break; + if (outIdx + 3 >= endIdx) break; heap[outIdx++] = 240 | u >> 18; heap[outIdx++] = 128 | u >> 12 & 63; heap[outIdx++] = 128 | u >> 6 & 63; @@ -7467,22 +7502,17 @@ var createModule = function() { var u = str.charCodeAt(i); if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; - if (u <= 127) - ++len; - else if (u <= 2047) - len += 2; - else if (u <= 65535) - len += 3; - else - len += 4; + if (u <= 127) ++len; + else if (u <= 2047) len += 2; + else if (u <= 65535) len += 3; + else len += 4; } return len; } function allocateUTF8(str) { var size = lengthBytesUTF8(str) + 1; var ret = _malloc(size); - if (ret) - stringToUTF8Array(str, HEAP8, ret, size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); return ret; } function writeArrayToMemory(array, buffer2) { @@ -7699,8 +7729,7 @@ var createModule = function() { var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0; LE_HEAP_STORE_I32((tmPtr + 28 >> 2) * 4, yday); - if (!_gmtime_r.GMTString) - _gmtime_r.GMTString = allocateUTF8("GMT"); + if (!_gmtime_r.GMTString) _gmtime_r.GMTString = allocateUTF8("GMT"); LE_HEAP_STORE_I32((tmPtr + 40 >> 2) * 4, _gmtime_r.GMTString); return tmPtr; } @@ -7752,10 +7781,9 @@ var createModule = function() { return ret; } function _tzset() { - if (_tzset.called) - return; + if (_tzset.called) return; _tzset.called = true; - var currentYear = new Date().getFullYear(); + var currentYear = (/* @__PURE__ */ new Date()).getFullYear(); var winter = new Date(currentYear, 0, 1); var summer = new Date(currentYear, 6, 1); var winterOffset = winter.getTimezoneOffset(); @@ -7883,10 +7911,8 @@ var createModule = function() { Module["getValue"] = getValue; var calledRun; dependenciesFulfilled = function runCaller() { - if (!calledRun) - run(); - if (!calledRun) - dependenciesFulfilled = runCaller; + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; }; function run(args) { if (runDependencies > 0) { @@ -7897,16 +7923,13 @@ var createModule = function() { return; } function doRun() { - if (calledRun) - return; + if (calledRun) return; calledRun = true; Module["calledRun"] = true; - if (ABORT) - return; + if (ABORT) return; initRuntime(); readyPromiseResolve(Module); - if (Module["onRuntimeInitialized"]) - Module["onRuntimeInitialized"](); + if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"](); postRun(); } if (Module["setStatus"]) { @@ -7940,7 +7963,9 @@ const createModule = libzipSync.exports; const number64 = [ `number`, + // low `number` + // high ]; var Errors = /* @__PURE__ */ ((Errors2) => { Errors2[Errors2["ZIP_ER_OK"] = 0] = "ZIP_ER_OK"; @@ -7978,6 +8003,7 @@ var Errors = /* @__PURE__ */ ((Errors2) => { return Errors2; })(Errors || {}); const makeInterface = (emZip) => ({ + // Those are getters because they can change after memory growth get HEAPU8() { return emZip.HEAPU8; }, @@ -8180,6 +8206,7 @@ function makeEmptyArchive() { ]); } class LibzipError extends Error { + code; constructor(message, code) { super(message); this.name = `Libzip Error`; @@ -8187,15 +8214,28 @@ class LibzipError extends Error { } } class ZipFS extends BasePortableFakeFS { + libzip; + baseFs; + path; + stats; + zip; + lzSource; + level; + listings = /* @__PURE__ */ new Map(); + entries = /* @__PURE__ */ new Map(); + /** + * A cache of indices mapped to file sources. + * Populated by `setFileSource` calls. + * Required for supporting read after write. + */ + fileSources = /* @__PURE__ */ new Map(); + symlinkCount; + fds = /* @__PURE__ */ new Map(); + nextFd = 0; + ready = false; + readOnly = false; constructor(source, opts = {}) { super(); - this.listings = /* @__PURE__ */ new Map(); - this.entries = /* @__PURE__ */ new Map(); - this.fileSources = /* @__PURE__ */ new Map(); - this.fds = /* @__PURE__ */ new Map(); - this.nextFd = 0; - this.ready = false; - this.readOnly = false; const pathOptions = opts; this.level = typeof pathOptions.level !== `undefined` ? pathOptions.level : DEFAULT_COMPRESSION_LEVEL; source ??= makeEmptyArchive(); @@ -8444,6 +8484,7 @@ class ZipFS extends BasePortableFakeFS { }, bytesRead: 0, path: p, + // "This property is `true` if the underlying file has not been opened yet" pending: false } ); @@ -8490,6 +8531,7 @@ class ZipFS extends BasePortableFakeFS { }, bytesWritten: 0, path: p, + // "This property is `true` if the underlying file has not been opened yet" pending: false } ); @@ -9080,6 +9122,27 @@ class ZipFS extends BasePortableFakeFS { throw EINVAL(`rmdir '${p}'`); this.deleteEntry(p, index); } + async rmPromise(p, opts) { + return this.rmSync(p, opts); + } + rmSync(p, { recursive = false } = {}) { + if (this.readOnly) + throw EROFS(`rm '${p}'`); + if (recursive) { + this.removeSync(p); + return; + } + const resolvedP = this.resolveFilename(`rm '${p}'`, p); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw ENOTDIR(`rm '${p}'`); + if (directoryListing.size > 0) + throw ENOTEMPTY(`rm '${p}'`); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw EINVAL(`rm '${p}'`); + this.deleteEntry(p, index); + } hydrateDirectory(resolvedP) { const index = this.libzip.dir.add(this.zip, ppath.relative(PortablePath.root, resolvedP)); if (index === -1) @@ -9551,18 +9614,20 @@ Require stack: } return false; }; - const originalExtensionJSFunction = require$$0.Module._extensions[`.js`]; - require$$0.Module._extensions[`.js`] = function(module, filename) { - if (filename.endsWith(`.js`)) { - const pkg = readPackageScope(filename); - if (pkg && pkg.data?.type === `module`) { - const err = ERR_REQUIRE_ESM(filename, module.parent?.filename); - Error.captureStackTrace(err); - throw err; + if (!process.features.require_module) { + const originalExtensionJSFunction = require$$0.Module._extensions[`.js`]; + require$$0.Module._extensions[`.js`] = function(module, filename) { + if (filename.endsWith(`.js`)) { + const pkg = readPackageScope(filename); + if (pkg && pkg.data?.type === `module`) { + const err = ERR_REQUIRE_ESM(filename, module.parent?.filename); + Error.captureStackTrace(err); + throw err; + } } - } - originalExtensionJSFunction.call(this, module, filename); - }; + originalExtensionJSFunction.call(this, module, filename); + }; + } const originalDlopen = process.dlopen; process.dlopen = function(...args) { const [module, filename, ...rest] = args; @@ -9608,6 +9673,8 @@ function hydrateRuntimeState(data, { basePath }) { packagePeers: new Set(packageInformationData.packagePeers), linkType: packageInformationData.linkType, discardFromLookup, + // we only need this for packages that are used by the currently running script + // this is a lazy getter because `ppath.join` has some overhead get packageLocation() { return resolvedPackageLocation || (resolvedPackageLocation = ppath.join(absolutePortablePath, packageInformationData.packageLocation)); } @@ -9869,8 +9936,7 @@ function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base const packagePath = new URL(".", packageJSONUrl).pathname; if (!StringPrototypeStartsWith(resolvedPath, packagePath)) throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - if (subpath === "") - return resolved; + if (subpath === "") return resolved; if (RegExpPrototypeExec(invalidSegmentRegEx, subpath) !== null) { const request = pattern ? StringPrototypeReplace(match, "*", () => subpath) : match + subpath; throwInvalidSubpath(request, packageJSONUrl, internal, base); @@ -9884,8 +9950,7 @@ function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base } function isArrayIndex(key) { const keyNum = +key; - if (`${keyNum}` !== key) - return false; + if (`${keyNum}` !== key) return false; return keyNum >= 0 && keyNum < 4294967295; } function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) { @@ -9962,8 +10027,7 @@ function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, b internal, conditions ); - if (resolveResult === void 0) - continue; + if (resolveResult === void 0) continue; return resolveResult; } } @@ -9984,25 +10048,17 @@ function patternKeyCompare(a, b) { const bPatternIndex = StringPrototypeIndexOf(b, "*"); const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; - if (baseLenA > baseLenB) - return -1; - if (baseLenB > baseLenA) - return 1; - if (aPatternIndex === -1) - return 1; - if (bPatternIndex === -1) - return -1; - if (a.length > b.length) - return -1; - if (b.length > a.length) - return 1; + if (baseLenA > baseLenB) return -1; + if (baseLenB > baseLenA) return 1; + if (aPatternIndex === -1) return 1; + if (bPatternIndex === -1) return -1; + if (a.length > b.length) return -1; + if (b.length > a.length) return 1; return 0; } function isConditionalExportsMainSugar(exports, packageJSONUrl, base) { - if (typeof exports === "string" || ArrayIsArray(exports)) - return true; - if (typeof exports !== "object" || exports === null) - return false; + if (typeof exports === "string" || ArrayIsArray(exports)) return true; + if (typeof exports !== "object" || exports === null) return false; const keys = ObjectGetOwnPropertyNames(exports); let isConditionalSugar = false; let i = 0; @@ -10031,8 +10087,7 @@ function throwExportsNotFound(subpath, packageJSONUrl, base) { const emittedPackageWarnings = /* @__PURE__ */ new Set(); function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { const pjsonPath = url.fileURLToPath(pjsonUrl); - if (emittedPackageWarnings.has(pjsonPath + "|" + match)) - return; + if (emittedPackageWarnings.has(pjsonPath + "|" + match)) return; emittedPackageWarnings.add(pjsonPath + "|" + match); process.emitWarning( `Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${url.fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, @@ -11301,9 +11356,9 @@ const defaultFsLayer = new VirtualFS({ }) }); class DynamicFS extends ProxiedFS { + baseFs = defaultFsLayer; constructor() { super(ppath); - this.baseFs = defaultFsLayer; } mapToBase(p) { return p; @@ -11318,6 +11373,11 @@ const defaultApi = Object.assign(makeApi(defaultRuntimeState, { fakeFs: dynamicFsLayer, pnpapiResolution: defaultPnpapiResolution }), { + /** + * Can be used to generate a different API than the default one (for example + * to map it on `/` rather than the local directory path, or to use a + * different FS layer than the default one). + */ makeApi: ({ basePath = void 0, fakeFs = dynamicFsLayer, @@ -11331,6 +11391,10 @@ const defaultApi = Object.assign(makeApi(defaultRuntimeState, { ...rest }); }, + /** + * Will inject the specified API into the environment, monkey-patching FS. Is + * automatically called when the hook is loaded through `--require`. + */ setup: (api) => { applyPatch(api || defaultApi, { fakeFs: defaultFsLayer, diff --git a/.pnp.loader.mjs b/.pnp.loader.mjs index 81ae9a6..e5a5429 100644 --- a/.pnp.loader.mjs +++ b/.pnp.loader.mjs @@ -1,9 +1,12 @@ +/* eslint-disable */ +// @ts-nocheck + import fs from 'fs'; import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url'; import path from 'path'; import { createHash } from 'crypto'; import { EOL } from 'os'; -import moduleExports, { isBuiltin } from 'module'; +import esmModule, { createRequire, isBuiltin } from 'module'; import assert from 'assert'; const SAFE_TIME = 456789e3; @@ -283,6 +286,7 @@ async function copySymlink(prelayout, postlayout, destinationFs, destination, de } class FakeFS { + pathUtils; constructor(pathUtils) { this.pathUtils = pathUtils; } @@ -830,6 +834,12 @@ class ProxiedFS extends FakeFS { rmdirSync(p, opts) { return this.baseFs.rmdirSync(this.mapToBase(p), opts); } + async rmPromise(p, opts) { + return this.baseFs.rmPromise(this.mapToBase(p), opts); + } + rmSync(p, opts) { + return this.baseFs.rmSync(this.mapToBase(p), opts); + } async linkPromise(existingP, newP) { return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); } @@ -885,6 +895,7 @@ class ProxiedFS extends FakeFS { watch(p, a, b) { return this.baseFs.watch( this.mapToBase(p), + // @ts-expect-error a, b ); @@ -892,6 +903,7 @@ class ProxiedFS extends FakeFS { watchFile(p, a, b) { return this.baseFs.watchFile( this.mapToBase(p), + // @ts-expect-error a, b ); @@ -915,6 +927,7 @@ function direntToPortable(dirent) { return portableDirent; } class NodeFS extends BasePortableFakeFS { + realFs; constructor(realFs = fs) { super(); this.realFs = realFs; @@ -1211,6 +1224,18 @@ class NodeFS extends BasePortableFakeFS { rmdirSync(p, opts) { return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); } + async rmPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rm(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rm(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmSync(p, opts) { + return this.realFs.rmSync(npath.fromPortablePath(p), opts); + } async linkPromise(existingP, newP) { return await new Promise((resolve, reject) => { this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); @@ -1298,6 +1323,7 @@ class NodeFS extends BasePortableFakeFS { watch(p, a, b) { return this.realFs.watch( npath.fromPortablePath(p), + // @ts-expect-error a, b ); @@ -1305,6 +1331,7 @@ class NodeFS extends BasePortableFakeFS { watchFile(p, a, b) { return this.realFs.watchFile( npath.fromPortablePath(p), + // @ts-expect-error a, b ); @@ -1327,10 +1354,7 @@ const NUMBER_REGEXP = /^[0-9]+$/; const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; class VirtualFS extends ProxiedFS { - constructor({ baseFs = new NodeFS() } = {}) { - super(ppath); - this.baseFs = baseFs; - } + baseFs; static makeVirtualPath(base, component, to) { if (ppath.basename(base) !== `__virtual__`) throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); @@ -1360,6 +1384,10 @@ class VirtualFS extends ProxiedFS { const subpath = match[5] || `.`; return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath)); } + constructor({ baseFs = new NodeFS() } = {}) { + super(ppath); + this.baseFs = baseFs; + } getExtractHint(hints) { return this.baseFs.getExtractHint(hints); } @@ -1403,6 +1431,8 @@ const URL = Number(process.versions.node.split('.', 1)[0]) < 20 ? URL$1 : global const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10)); const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13; const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3; +const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || major === 20 && minor >= 10 || major === 18 && minor >= 20; +const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22; function readPackageScope(checkPath) { const rootSeparatorIndex = checkPath.indexOf(npath.sep); @@ -1493,10 +1523,21 @@ async function load$1(urlString, context, nextLoad) { const format = getFileFormat(filePath); if (!format) return nextLoad(urlString, context, nextLoad); - if (format === `json` && context.importAssertions?.type !== `json`) { - const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import assertion of type "json"`); - err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`; - throw err; + if (format === `json`) { + if (SUPPORTS_IMPORT_ATTRIBUTES_ONLY) { + if (context.importAttributes?.type !== `json`) { + const err = new TypeError(`[ERR_IMPORT_ATTRIBUTE_MISSING]: Module "${urlString}" needs an import attribute of "type: json"`); + err.code = `ERR_IMPORT_ATTRIBUTE_MISSING`; + throw err; + } + } else { + const type = `importAttributes` in context ? context.importAttributes?.type : context.importAssertions?.type; + if (type !== `json`) { + const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import ${SUPPORTS_IMPORT_ATTRIBUTES ? `attribute` : `assertion`} of type "json"`); + err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`; + throw err; + } + } } if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { const pathToSend = pathToFileURL( @@ -1743,8 +1784,7 @@ function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base const packagePath = new URL(".", packageJSONUrl).pathname; if (!StringPrototypeStartsWith(resolvedPath, packagePath)) throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - if (subpath === "") - return resolved; + if (subpath === "") return resolved; if (RegExpPrototypeExec(invalidSegmentRegEx, subpath) !== null) { const request = pattern ? StringPrototypeReplace(match, "*", () => subpath) : match + subpath; throwInvalidSubpath(request, packageJSONUrl, internal, base); @@ -1758,8 +1798,7 @@ function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base } function isArrayIndex(key) { const keyNum = +key; - if (`${keyNum}` !== key) - return false; + if (`${keyNum}` !== key) return false; return keyNum >= 0 && keyNum < 4294967295; } function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) { @@ -1836,8 +1875,7 @@ function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, b internal, conditions ); - if (resolveResult === void 0) - continue; + if (resolveResult === void 0) continue; return resolveResult; } } @@ -1858,18 +1896,12 @@ function patternKeyCompare(a, b) { const bPatternIndex = StringPrototypeIndexOf(b, "*"); const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; - if (baseLenA > baseLenB) - return -1; - if (baseLenB > baseLenA) - return 1; - if (aPatternIndex === -1) - return 1; - if (bPatternIndex === -1) - return -1; - if (a.length > b.length) - return -1; - if (b.length > a.length) - return 1; + if (baseLenA > baseLenB) return -1; + if (baseLenB > baseLenA) return 1; + if (aPatternIndex === -1) return 1; + if (bPatternIndex === -1) return -1; + if (a.length > b.length) return -1; + if (b.length > a.length) return 1; return 0; } function packageImportsResolve({ name, base, conditions, readFileSyncFn }) { @@ -1941,6 +1973,13 @@ function packageImportsResolve({ name, base, conditions, readFileSyncFn }) { throwImportNotDefined(name, packageJSONUrl, base); } +let findPnpApi = esmModule.findPnpApi; +if (!findPnpApi) { + const require = createRequire(import.meta.url); + const pnpApi = require(`./.pnp.cjs`); + pnpApi.setup(); + findPnpApi = esmModule.findPnpApi; +} const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/; const isRelativeRegexp = /^\.{0,2}\//; function tryReadFile(filePath) { @@ -1968,7 +2007,6 @@ async function resolvePrivateRequest(specifier, issuer, context, nextResolve) { } } async function resolve$1(originalSpecifier, context, nextResolve) { - const { findPnpApi } = moduleExports; if (!findPnpApi || isBuiltin(originalSpecifier)) return nextResolve(originalSpecifier, context, nextResolve); let specifier = originalSpecifier; @@ -2004,6 +2042,7 @@ async function resolve$1(originalSpecifier, context, nextResolve) { try { result = pnpapi.resolveRequest(specifier, issuer, { conditions: new Set(conditions), + // TODO: Handle --experimental-specifier-resolution=node extensions: allowLegacyResolve ? void 0 : [] }); } catch (err) { @@ -2034,6 +2073,9 @@ if (!HAS_LAZY_LOADED_TRANSLATORS) { try { return fs.readFileSync(args[0], { encoding: `utf8`, + // @ts-expect-error - The docs says it needs to be a string but + // links to https://nodejs.org/dist/latest-v20.x/docs/api/fs.html#file-system-flags + // which says it can be a number which matches the implementation. flag: args[1] }); } catch { @@ -2061,6 +2103,14 @@ if (!HAS_LAZY_LOADED_TRANSLATORS) { stats.ino, stats.size, stats.blocks + // atime sec + // atime ns + // mtime sec + // mtime ns + // ctime sec + // ctime ns + // birthtime sec + // birthtime ns ]); } catch { } diff --git a/examples/index.ts b/examples/index.ts index 3f96563..f750ef1 100644 --- a/examples/index.ts +++ b/examples/index.ts @@ -43,7 +43,7 @@ runExit(class Main extends Command { } async executeJsApi(streams: ScreenStreams) { - const {default: demo} = await import(path.resolve(this.examplePath)); + const demo = await import(path.resolve(this.examplePath)); return run(streams, screen => { const animate = demo.run(screen); @@ -54,7 +54,7 @@ runExit(class Main extends Command { } async executeJsxApi(streams: ScreenStreams) { - const {default: demo} = await import(path.resolve(this.examplePath)); + const demo = await import(path.resolve(this.examplePath)); return render(streams, React.createElement(demo.App)); } diff --git a/package.json b/package.json index 4f93f3b..515e297 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "terminosaurus", "version": "3.0.0-rc.5", - "packageManager": "yarn@4.1.0+sha224.bc24d7f5afc738464f3d4e95f4e6e7829a35cee54a0fd527ea5baa83", + "packageManager": "yarn@4.6.0+sha256.eaf1eeabc164a44ca0b65dbdccd54af7e55f3ff9294b3ff318d5aaec92f2b20b", "workspaces": [ "website" ], @@ -29,7 +29,7 @@ "@xterm/addon-fit": "^0.9.0", "mono-layout": "^0.14.3", "node-pty": "1.1.0-beta27", - "react-reconciler": "^0.29.0", + "react-reconciler": "^0.31.0", "react-refresh": "^0.14.0", "term-strings": "^0.16.2", "vscode-oniguruma": "^1.7.0", @@ -41,8 +41,8 @@ "@anthropic-ai/sdk": "^0.18.0", "@reduxjs/toolkit": "^2.5.0", "@types/node": "^20.11.24", - "@types/react": "^18.0.26", - "@types/react-reconciler": "^0.28.0", + "@types/react": "^19.0.10", + "@types/react-reconciler": "^0.28.9", "@types/react-refresh": "^0.14.0", "@types/zen-observable": "^0.8.3", "@xterm/xterm": "^5.4.0", @@ -50,11 +50,11 @@ "esbuild": "^0.20.1", "lorem-ipsum": "^2.0.8", "ollama": "^0.5.12", - "react": "^18.2.0", + "react": "^19.0.0", "react-redux": "^9.2.0", "tailwindcss": "^3.4.1", "tsx": "^4.7.1", - "typescript": "^5.3.3", + "typescript": "^5.7.3", "vitest": "^1.3.1" }, "peerDependencies": { diff --git a/sources/react.tsx b/sources/react.tsx index a006383..f784423 100644 --- a/sources/react.tsx +++ b/sources/react.tsx @@ -5,6 +5,7 @@ import {RunOptions, TermScreen} from ' import {run} from '#sources/index'; import {Rect} from '#sources/misc/Rect'; import {ReactElement} from '#sources/react/Tree'; +import { ConcurrentRoot } from 'react-reconciler/constants'; export * from '#sources/index'; @@ -106,7 +107,7 @@ export async function render(arg1: RunOptions | React.ReactNode, arg2?: React.Re await run(opts, screen => { const onRecoverableError = () => {}; - container = Reconciler.createContainer(new ReactElement(screen.rootNode), 0, null, false, null, `term-`, onRecoverableError, null); + container = Reconciler.createContainer(new ReactElement(screen.rootNode), ConcurrentRoot, null, false, null, `term-`, onRecoverableError, null); Reconciler.updateContainer(wrap(element, {screen}), container, null, null); }); diff --git a/sources/react/ElementMap.ts b/sources/react/ElementMap.ts index 1584e7f..6a6e045 100644 --- a/sources/react/ElementMap.ts +++ b/sources/react/ElementMap.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import React, {LegacyRef} from 'react'; +import React from 'react'; import {TermElement} from '#sources/dom/TermElement'; import {TermCanvas} from '#sources/elements/TermCanvas'; @@ -34,7 +34,7 @@ type AllReactPropsFor = { [K in Extract as K extends CheckIsProp ? K : never]?: T[K]; }; -declare global { +declare module 'react' { namespace JSX { interface IntrinsicElements { 'term:button': AllReactPropsFor & AllReactEventsFor & HasChildren; diff --git a/sources/react/Reconciler.ts b/sources/react/Reconciler.ts index b3a48f6..4f6c18d 100644 --- a/sources/react/Reconciler.ts +++ b/sources/react/Reconciler.ts @@ -135,7 +135,7 @@ function withTracker(obj: T) { })) as T; } -export const HostConfigImplementation: Partial = { +const BaseHostConfigImplementation: Omit = { supportsMutation: true, supportsPersistence: false, @@ -183,6 +183,10 @@ export const HostConfigImplementation: Partial = { return instance.termNode; }, + getInstanceFromNode(node) { + return null; + }, + prepareForCommit(containerInfo) { return {}; }, @@ -203,6 +207,7 @@ export const HostConfigImplementation: Partial = { noTimeout: null, + supportsHydration: false, supportsMicrotasks: true, scheduleMicrotask(fn) { @@ -273,4 +278,28 @@ export const HostConfigImplementation: Partial = { }, }; -export const Reconciler = createReconciler(withTracker(HostConfigImplementation as TermHostConfig)); +// React doesn't document well the functions that are required to be implemented, so +// the types are slightly off. To workaround that we implement everything that's well +// typed in BaseHostConfigImplementation, and add here whatever is missing. +export const HostConfigImplementation = { + ...BaseHostConfigImplementation, + + resolveUpdatePriority() { + return DefaultEventPriority; + }, + + getCurrentUpdatePriority() { + return DefaultEventPriority; + }, + + setCurrentUpdatePriority() { + }, + + maySuspendCommit() { + return false; + }, + + supportsMutation: true, +} as any as TermHostConfig; + +export const Reconciler = createReconciler(withTracker(HostConfigImplementation)); diff --git a/yarn.lock b/yarn.lock index 01665ed..5c3abd5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -716,19 +716,12 @@ __metadata: languageName: node linkType: hard -"@types/prop-types@npm:*": - version: 15.7.5 - resolution: "@types/prop-types@npm:15.7.5" - checksum: 10c0/648aae41423821c61c83823ae36116c8d0f68258f8b609bdbc257752dcd616438d6343d554262aa9a7edaee5a19aca2e028a74fa2d0f40fffaf2816bc7056857 - languageName: node - linkType: hard - -"@types/react-reconciler@npm:^0.28.0": - version: 0.28.2 - resolution: "@types/react-reconciler@npm:0.28.2" - dependencies: - "@types/react": "npm:*" - checksum: 10c0/8b8819b492972f08b9975efdf59dec668094f9e9483408b84698659ac02f4966c9c082ba79e80fef723c4f46279c5c3b15a7de7fa70af00a20741a8a15890b82 +"@types/react-reconciler@npm:^0.28.9": + version: 0.28.9 + resolution: "@types/react-reconciler@npm:0.28.9" + peerDependencies: + "@types/react": "*" + checksum: 10c0/9fe71fa856aab2cd4742fe0416bdd4f5c82ecc05ef6451ee7fcb65a5efdf5fa588f5820fbe2a665b15371b0da3bfc4097f28bb6d450b9a834af2d0fc00f403bd languageName: node linkType: hard @@ -742,21 +735,12 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^18.0.26": - version: 18.2.61 - resolution: "@types/react@npm:18.2.61" +"@types/react@npm:^19.0.10": + version: 19.0.10 + resolution: "@types/react@npm:19.0.10" dependencies: - "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" csstype: "npm:^3.0.2" - checksum: 10c0/a03fbb6ca8108bbccf12ac616e77e1457ae9324040c4a5d1293caaa62c187300b4eb38ec78c4724fb43d40d4c6fb909803db057c8b69ae441e2aab7b2acdc29a - languageName: node - linkType: hard - -"@types/scheduler@npm:*": - version: 0.16.3 - resolution: "@types/scheduler@npm:0.16.3" - checksum: 10c0/c249d4b96fa05165ac22c214f94a045ee0af8beedefdbc54b769febd0044cab3a874e55419841a0dcc76439e379a63e257f3253c87168e3261e7bc783d623302 + checksum: 10c0/41884cca21850c8b2d6578b172ca0ca4fff6021251a68532b19f2031ac23dc5a9222470208065f8d9985d367376047df2f49ece8d927f7d04cdc94922b1eb34b languageName: node linkType: hard @@ -1883,13 +1867,6 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^3.0.0 || ^4.0.0": - version: 4.0.0 - resolution: "js-tokens@npm:4.0.0" - checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed - languageName: node - linkType: hard - "js-tokens@npm:^8.0.2": version: 8.0.3 resolution: "js-tokens@npm:8.0.3" @@ -1942,17 +1919,6 @@ __metadata: languageName: node linkType: hard -"loose-envify@npm:^1.1.0": - version: 1.4.0 - resolution: "loose-envify@npm:1.4.0" - dependencies: - js-tokens: "npm:^3.0.0 || ^4.0.0" - bin: - loose-envify: cli.js - checksum: 10c0/655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e - languageName: node - linkType: hard - "lorem-ipsum@npm:^2.0.8": version: 2.0.8 resolution: "lorem-ipsum@npm:2.0.8" @@ -2581,15 +2547,14 @@ __metadata: languageName: node linkType: hard -"react-reconciler@npm:^0.29.0": - version: 0.29.0 - resolution: "react-reconciler@npm:0.29.0" +"react-reconciler@npm:^0.31.0": + version: 0.31.0 + resolution: "react-reconciler@npm:0.31.0" dependencies: - loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.0" + scheduler: "npm:^0.25.0" peerDependencies: - react: ^18.2.0 - checksum: 10c0/637442f98ee816b8f86586f537712a0463b53e12c0f4dec716dfdde68dfa52cef1d10138acfad194d5571296cde8715c331aa3986e538087acdc1ef83187a9b0 + react: ^19.0.0 + checksum: 10c0/97920e1866c7206e200c3920c133c2e85f62a3c54fd9bc4b83c10c558d83d98eb378caab4fe37498e0cc1b1b2665d898627f2ae2537b29c8ab295ec8abc0c580 languageName: node linkType: hard @@ -2619,12 +2584,10 @@ __metadata: languageName: node linkType: hard -"react@npm:^18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10c0/b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8 +"react@npm:^19.0.0": + version: 19.0.0 + resolution: "react@npm:19.0.0" + checksum: 10c0/9cad8f103e8e3a16d15cb18a0d8115d8bd9f9e1ce3420310aea381eb42aa0a4f812cf047bb5441349257a05fba8a291515691e3cb51267279b2d2c3253f38471 languageName: node linkType: hard @@ -2786,12 +2749,10 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.0": - version: 0.23.0 - resolution: "scheduler@npm:0.23.0" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10c0/b777f7ca0115e6d93e126ac490dbd82642d14983b3079f58f35519d992fa46260be7d6e6cede433a92db70306310c6f5f06e144f0e40c484199e09c1f7be53dd +"scheduler@npm:^0.25.0": + version: 0.25.0 + resolution: "scheduler@npm:0.25.0" + checksum: 10c0/a4bb1da406b613ce72c1299db43759526058fdcc413999c3c3e0db8956df7633acf395cb20eb2303b6a65d658d66b6585d344460abaee8080b4aa931f10eaafe languageName: node linkType: hard @@ -3051,8 +3012,8 @@ __metadata: "@arcanis/slice-ansi": "npm:^2.0.1" "@reduxjs/toolkit": "npm:^2.5.0" "@types/node": "npm:^20.11.24" - "@types/react": "npm:^18.0.26" - "@types/react-reconciler": "npm:^0.28.0" + "@types/react": "npm:^19.0.10" + "@types/react-reconciler": "npm:^0.28.9" "@types/react-refresh": "npm:^0.14.0" "@types/zen-observable": "npm:^0.8.3" "@xterm/addon-fit": "npm:^0.9.0" @@ -3063,14 +3024,14 @@ __metadata: mono-layout: "npm:^0.14.3" node-pty: "npm:1.1.0-beta27" ollama: "npm:^0.5.12" - react: "npm:^18.2.0" - react-reconciler: "npm:^0.29.0" + react: "npm:^19.0.0" + react-reconciler: "npm:^0.31.0" react-redux: "npm:^9.2.0" react-refresh: "npm:^0.14.0" tailwindcss: "npm:^3.4.1" term-strings: "npm:^0.16.2" tsx: "npm:^4.7.1" - typescript: "npm:^5.3.3" + typescript: "npm:^5.7.3" vitest: "npm:^1.3.1" vscode-oniguruma: "npm:^1.7.0" vscode-textmate: "npm:^8.0.0" @@ -3180,23 +3141,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.3.3": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" +"typescript@npm:^5.7.3": + version: 5.7.3 + resolution: "typescript@npm:5.7.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f + checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" +"typescript@patch:typescript@npm%3A^5.7.3#optional!builtin": + version: 5.7.3 + resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 + checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4 languageName: node linkType: hard