diff --git a/package.json b/package.json index fb7d95b79..c4dd60929 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ }, "dependencies": { "@inquirer/prompts": "^5.3.8", - "chalk": "^5.3.0", + "chalk": "^4.1.2", "commander": "^12.1.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3157c3228..40d4f8ff9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,21 +8,15 @@ importers: .: dependencies: - '@inquirer/input': - specifier: ^2.2.9 - version: 2.2.9 '@inquirer/prompts': specifier: ^5.3.8 version: 5.3.8 chalk: - specifier: ^5.3.0 - version: 5.3.0 + specifier: ^4.1.2 + version: 4.1.2 commander: specifier: ^12.1.0 version: 12.1.0 - inquirer: - specifier: ^10.1.8 - version: 10.1.8 devDependencies: '@modern-js/eslint-config': specifier: ^2.58.1 @@ -33,9 +27,6 @@ importers: '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 - '@types/inquirer': - specifier: ^9.0.7 - version: 9.0.7 '@types/node': specifier: ^22.4.1 version: 22.4.1 @@ -1542,9 +1533,6 @@ packages: '@types/fs-extra@11.0.4': resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} - '@types/inquirer@9.0.7': - resolution: {integrity: sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==} - '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -1584,9 +1572,6 @@ packages: '@types/tern@0.23.4': resolution: {integrity: sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==} - '@types/through@0.0.33': - resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} - '@types/trusted-types@2.0.2': resolution: {integrity: sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==} @@ -1873,10 +1858,6 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - chalk@5.3.0: - resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} @@ -2570,10 +2551,6 @@ packages: ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - inquirer@10.1.8: - resolution: {integrity: sha512-syxGpOzLyqVeZi1KDBjRTnCn5PiGWySGHP0BbqXbqsEK0ckkZk3egAepEWslUjZXj0rhkUapVXM/IpADWe4D6w==} - engines: {node: '>=18'} - inquirer@7.3.3: resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} engines: {node: '>=8.0.0'} @@ -3308,10 +3285,6 @@ packages: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} - run-async@3.0.0: - resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} - engines: {node: '>=0.12.0'} - run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3319,9 +3292,6 @@ packages: resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} engines: {npm: '>=2.0.0'} - rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - safe-array-concat@1.1.2: resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} engines: {node: '>=0.4'} @@ -5723,11 +5693,6 @@ snapshots: '@types/jsonfile': 6.1.4 '@types/node': 22.4.1 - '@types/inquirer@9.0.7': - dependencies: - '@types/through': 0.0.33 - rxjs: 7.8.1 - '@types/json-schema@7.0.15': {} '@types/json5@0.0.29': {} @@ -5768,10 +5733,6 @@ snapshots: dependencies: '@types/estree': 0.0.39 - '@types/through@0.0.33': - dependencies: - '@types/node': 22.4.1 - '@types/trusted-types@2.0.2': {} '@types/wrap-ansi@3.0.0': {} @@ -6141,8 +6102,6 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 - chalk@5.3.0: {} - chardet@0.7.0: {} chokidar@3.5.3: @@ -6931,16 +6890,6 @@ snapshots: ini@1.3.8: {} - inquirer@10.1.8: - dependencies: - '@inquirer/prompts': 5.3.8 - '@inquirer/type': 1.5.2 - '@types/mute-stream': 0.0.4 - ansi-escapes: 4.3.2 - mute-stream: 1.0.0 - run-async: 3.0.0 - rxjs: 7.8.1 - inquirer@7.3.3: dependencies: ansi-escapes: 4.3.2 @@ -7655,8 +7604,6 @@ snapshots: run-async@2.4.1: {} - run-async@3.0.0: {} - run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -7665,10 +7612,6 @@ snapshots: dependencies: tslib: 1.14.1 - rxjs@7.8.1: - dependencies: - tslib: 2.6.2 - safe-array-concat@1.1.2: dependencies: call-bind: 1.0.7 diff --git a/scripts/index.ts b/scripts/index.ts index c90605bfd..ae86a9d32 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -1,6 +1,7 @@ import { resolve } from 'path'; import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; +// Don't use 5.x which is ESM. Tw only run under not esm. import chalk from 'chalk'; import { input, confirm } from '@inquirer/prompts'; import { program } from 'commander'; diff --git a/tsconfig.json b/tsconfig.json index e06d5ba99..1c1f1e8da 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,5 +7,5 @@ "types": ["node", "tw5-typed"], "lib": ["DOM", "ESNext"] }, - "include": ["./scripts/**/*.ts"], + "include": ["./scripts/**/*.ts", "scripts/index.ts"] }