diff --git a/package-lock.json b/package-lock.json index be4a491..6ef2294 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "mirrow", + "name": "mirrow-mono", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "mirrow", + "name": "mirrow-mono", "version": "1.0.0", "license": "MIT", "workspaces": [ @@ -472,74 +472,28 @@ "undici-types": "~7.12.0" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" } }, "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.1.tgz", + "integrity": "sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/esbuild": { @@ -584,22 +538,11 @@ "@esbuild/win32-x64": "0.25.9" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -623,95 +566,21 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/mirrow": { "resolved": "packages/cli", "link": true }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">= 14.18.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/resolve-pkg-maps": { @@ -724,18 +593,6 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/tsx": { "version": "4.20.5", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.5.tgz", @@ -779,12 +636,12 @@ }, "packages/cli": { "name": "mirrow", - "version": "0.1.4", + "version": "0.1.6", "license": "MIT", "dependencies": { - "@mirrowjs/core": "^0.1.2", - "chokidar": "^3.6.0", - "commander": "^12.1.0" + "@mirrowjs/core": "^0.1.9", + "chokidar": "^4.0.3", + "commander": "^14.0.1" }, "bin": { "mirrow": "dist/index.js" @@ -801,7 +658,7 @@ }, "packages/core": { "name": "@mirrowjs/core", - "version": "0.1.8", + "version": "0.1.9", "license": "MIT", "devDependencies": { "@types/node": "^24.5.2" diff --git a/package.json b/package.json index a01e2d1..89d9a2d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "mirrow", + "name": "mirrow-mono", "version": "1.0.0", "description": "", "main": "index.js", @@ -7,7 +7,7 @@ "dev:compiler": "npx tsx packages/core/src/index.ts", "build:core": "tsc -p packages/core/tsconfig.json", "test": "npm run build:core && npm run build:cli && node --test packages/core/test/*.test.js packages/cli/test/*.test.js", - "build:cli": "npm run build --workspace packages/cli" + "build:cli": "npm run build -w mirrow" }, "private": true, "workspaces": [ diff --git a/packages/cli/package.json b/packages/cli/package.json index 6b0e2b3..5dafda9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "mirrow", - "version": "0.1.4", + "version": "0.1.5", "description": "", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -14,9 +14,9 @@ "dist" ], "dependencies": { - "@mirrowjs/core": "^0.1.2", - "commander": "^12.1.0", - "chokidar": "^3.6.0" + "@mirrowjs/core": "^0.1.9", + "chokidar": "^4.0.3", + "commander": "^14.0.1" }, "devDependencies": { "@types/node": "^24.5.2" diff --git a/packages/cli/src/runner.ts b/packages/cli/src/runner.ts index 3871184..133f21f 100644 --- a/packages/cli/src/runner.ts +++ b/packages/cli/src/runner.ts @@ -2,8 +2,8 @@ import { promises as fs } from "node:fs"; import os from "node:os"; import path from "node:path"; -import chokidar from "chokidar"; - +import type * as Chokidar from "chokidar"; +import * as chokidar from "chokidar"; import { compile } from "@mirrowjs/core"; export interface CliOptions { @@ -191,8 +191,7 @@ export async function watchMirrow( await runMirrow(options); console.log( - `Watching ${formatPath(input)} (depth: ${ - depth === Infinity ? "unbound" : depth + `Watching ${formatPath(input)} (depth: ${depth === Infinity ? "unbound" : depth })` ); console.log("Press Ctrl+C to stop.\n"); @@ -218,7 +217,8 @@ async function watchDirectory( const inputRoot = path.resolve(inputDir); const outputRoot = path.resolve(outputDir); - const watcherOptions: chokidar.WatchOptions = { + const watcherOptions = { + depth: 0, persistent: true, ignoreInitial: true, awaitWriteFinish: { diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 553e00f..5b68ceb 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -5,7 +5,9 @@ "module": "nodenext", "moduleResolution": "nodenext", "types": ["node"], - "outDir": "dist" + "outDir": "dist", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true }, "include": ["src"] } diff --git a/packages/core/package.json b/packages/core/package.json index fcca010..680c2c8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mirrowjs/core", - "version": "0.1.8", + "version": "0.1.9", "description": "Core compiler and parser for the Mirrow DSL", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/test.mirrow b/test.mirrow deleted file mode 100644 index e69de29..0000000