From de474f16f43275e7f2b5e901b87aacf90605701a Mon Sep 17 00:00:00 2001 From: "Jeremy Colin (Simple Frontend)" Date: Sat, 2 Aug 2025 21:14:53 +0200 Subject: [PATCH 1/3] dev: latest ts recommended config --- .github/workflows/quality-checks.yml | 3 + package.json | 38 +-- pnpm-lock.yaml | 369 +++++++++--------------- src/cli.ts | 2 +- src/commands/setup.ts | 4 +- src/solutions/eslint-config-prettier.ts | 2 +- src/solutions/eslint.ts | 2 +- src/solutions/github-actions.ts | 6 +- src/solutions/install-pattern.ts | 4 +- src/solutions/install-solutions.ts | 14 +- src/solutions/oxlint.ts | 2 +- src/solutions/pre-push-hook.ts | 6 +- src/solutions/prettier.ts | 2 +- src/solutions/typescript.ts | 18 +- src/templates/github-actions.ts | 4 +- src/templates/lefthook.ts | 4 +- src/templates/typescript.ts | 31 +- tsconfig.json | 19 +- 18 files changed, 224 insertions(+), 306 deletions(-) diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml index 3607ab5..5c02132 100644 --- a/.github/workflows/quality-checks.yml +++ b/.github/workflows/quality-checks.yml @@ -34,6 +34,9 @@ jobs: - name: Run code quality lint check run: pnpm exec eslint --no-warn-ignored src + - name: Check types + run: pnpm run check:types + - name: Run tests run: pnpm run test diff --git a/package.json b/package.json index 6ea7614..3aff476 100644 --- a/package.json +++ b/package.json @@ -31,34 +31,34 @@ "build:dev": "rm -rf dist && tsc --noCheck", "build": "rm -rf dist && tsc", "test": "vitest run", + "check:types": "tsc --noEmit", "check:exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm", "release": "pnpm build && pnpm check:exports && pnpm exec changeset publish" }, "packageManager": "pnpm@10.13.1", "devDependencies": { - "@arethetypeswrong/cli": "^0.18.2", - "@changesets/cli": "^2.29.5", - "@eslint/js": "^9.31.0", - "@tsconfig/node-lts": "^22.0.2", - "@tsconfig/strictest": "^2.0.5", - "@types/node": "^24.0.14", - "eslint": "^9.31.0", - "eslint-config-prettier": "^10.1.8", - "globals": "^16.3.0", - "lefthook": "^1.12.2", - "memfs": "4.17.2", - "oxlint": "1.7.0", + "@arethetypeswrong/cli": "0.18.2", + "@changesets/cli": "2.29.5", + "@eslint/js": "9.32.0", + "@tsconfig/node-lts": "22.0.2", + "@tsconfig/strictest": "2.0.5", + "@types/node": "24.1.0", + "eslint": "9.32.0", + "eslint-config-prettier": "10.1.8", + "globals": "16.3.0", + "lefthook": "1.12.2", + "memfs": "4.35.0", "prettier": "3.6.2", - "typescript": "^5.8.3", - "typescript-eslint": "^8.37.0", - "vitest": "^3.2.4" + "typescript": "5.9.2", + "typescript-eslint": "8.38.0", + "vitest": "3.2.4" }, "dependencies": { - "@clack/prompts": "^0.11.0", - "commander": "^14.0.0", + "@clack/prompts": "0.11.0", + "commander": "14.0.0", "open": "10.2.0", - "package-manager-detector": "^1.3.0", + "package-manager-detector": "1.3.0", "picocolors": "1.1.1", - "yaml": "^2.8.0" + "yaml": "2.8.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7709f6a..97f280a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,72 +9,69 @@ importers: .: dependencies: '@clack/prompts': - specifier: ^0.11.0 + specifier: 0.11.0 version: 0.11.0 commander: - specifier: ^14.0.0 + specifier: 14.0.0 version: 14.0.0 open: specifier: 10.2.0 version: 10.2.0 package-manager-detector: - specifier: ^1.3.0 + specifier: 1.3.0 version: 1.3.0 picocolors: specifier: 1.1.1 version: 1.1.1 yaml: - specifier: ^2.8.0 + specifier: 2.8.0 version: 2.8.0 devDependencies: '@arethetypeswrong/cli': - specifier: ^0.18.2 + specifier: 0.18.2 version: 0.18.2 '@changesets/cli': - specifier: ^2.29.5 + specifier: 2.29.5 version: 2.29.5 '@eslint/js': - specifier: ^9.31.0 - version: 9.31.0 + specifier: 9.32.0 + version: 9.32.0 '@tsconfig/node-lts': - specifier: ^22.0.2 + specifier: 22.0.2 version: 22.0.2 '@tsconfig/strictest': - specifier: ^2.0.5 + specifier: 2.0.5 version: 2.0.5 '@types/node': - specifier: ^24.0.14 - version: 24.0.14 + specifier: 24.1.0 + version: 24.1.0 eslint: - specifier: ^9.31.0 - version: 9.31.0 + specifier: 9.32.0 + version: 9.32.0 eslint-config-prettier: - specifier: ^10.1.8 - version: 10.1.8(eslint@9.31.0) + specifier: 10.1.8 + version: 10.1.8(eslint@9.32.0) globals: - specifier: ^16.3.0 + specifier: 16.3.0 version: 16.3.0 lefthook: - specifier: ^1.12.2 + specifier: 1.12.2 version: 1.12.2 memfs: - specifier: 4.17.2 - version: 4.17.2 - oxlint: - specifier: 1.7.0 - version: 1.7.0 + specifier: 4.35.0 + version: 4.35.0 prettier: specifier: 3.6.2 version: 3.6.2 typescript: - specifier: ^5.8.3 - version: 5.8.3 + specifier: 5.9.2 + version: 5.9.2 typescript-eslint: - specifier: ^8.37.0 - version: 8.37.0(eslint@9.31.0)(typescript@5.8.3) + specifier: 8.38.0 + version: 8.38.0(eslint@9.32.0)(typescript@5.9.2) vitest: - specifier: ^3.2.4 - version: 3.2.4(@types/node@24.0.14)(yaml@2.8.0) + specifier: 3.2.4 + version: 3.2.4(@types/node@24.1.0)(yaml@2.8.0) packages: @@ -344,16 +341,16 @@ packages: resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.31.0': - resolution: {integrity: sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==} + '@eslint/js@9.32.0': + resolution: {integrity: sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.3.3': - resolution: {integrity: sha512-1+WqvgNMhmlAambTvT3KPtCl/Ibr68VldY2XY40SL1CE0ZXiakFR/cbTspaF5HsnpDMvcYYoJHfl4980NBjGag==} + '@eslint/plugin-kit@0.3.4': + resolution: {integrity: sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanfs/core@0.19.1': @@ -418,46 +415,6 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oxlint/darwin-arm64@1.7.0': - resolution: {integrity: sha512-51vhCSQO4NSkedwEwOyqThiYqV0DAUkwNdqMQK0d29j5zmtNJJJRRBLeQuLGdstNmn3F7WMQ75Ci0/3Nq4ff8A==} - cpu: [arm64] - os: [darwin] - - '@oxlint/darwin-x64@1.7.0': - resolution: {integrity: sha512-c0GN52yehYZ4TYuh4lBH9wYbBOI/RDOxZhJdBsttG0GwfvKYg/tiPNrNEsPzu0/rd1j6x3yT0zt6vezDMeC1sQ==} - cpu: [x64] - os: [darwin] - - '@oxlint/linux-arm64-gnu@1.7.0': - resolution: {integrity: sha512-pam/lbzbzVMDzc3f1hoRPtnUMEIqkn0dynlB5nUll/MVBSIvIPLS9kJLrRA48lrlqbkS9LGiF37JvpwXA58A9A==} - cpu: [arm64] - os: [linux] - - '@oxlint/linux-arm64-musl@1.7.0': - resolution: {integrity: sha512-LTyPy9FYS3SZ2XxJx+ITvlAq/ek5PtZK9Z2m3W72TA8hchGhJy5eQ+aotYjd/YVXOpGRpB12RdOpOTsZRu50bA==} - cpu: [arm64] - os: [linux] - - '@oxlint/linux-x64-gnu@1.7.0': - resolution: {integrity: sha512-YtZ4DiAgjaEiqUiwnvtJ/znZMAAVPKR7pnsi6lqbA3BfXJ/IwMaNpdoGlCGVdDGeN4BuGCwnFtBVqKVvVg3DDg==} - cpu: [x64] - os: [linux] - - '@oxlint/linux-x64-musl@1.7.0': - resolution: {integrity: sha512-5aIpemNUBvwMMk4MCx1V3M6R9eMB1/SS6/24Orax9FqaI1lDX08tySdv696sr4Lms9ocA+rotxIPW9NP9439vA==} - cpu: [x64] - os: [linux] - - '@oxlint/win32-arm64@1.7.0': - resolution: {integrity: sha512-fpFpkHwbAu0NcR5bc1WapCPcM9qSYi5lCRVOp1WwDoFLKI2b9/UWB8OEg8UHWV5dnBu7HZAWH/SEslYGkZNsbQ==} - cpu: [arm64] - os: [win32] - - '@oxlint/win32-x64@1.7.0': - resolution: {integrity: sha512-0EPWBWOiD3wZHgeWDlTUaiFzhzIonXykxYUC+NRerPQFkO/G+bd9uLMJddHDKqfP/7g8s3E5V6KvBvvFpb7U6g==} - cpu: [x64] - os: [win32] - '@rollup/rollup-android-arm-eabi@4.45.1': resolution: {integrity: sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA==} cpu: [arm] @@ -583,66 +540,66 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@24.0.14': - resolution: {integrity: sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw==} + '@types/node@24.1.0': + resolution: {integrity: sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==} - '@typescript-eslint/eslint-plugin@8.37.0': - resolution: {integrity: sha512-jsuVWeIkb6ggzB+wPCsR4e6loj+rM72ohW6IBn2C+5NCvfUVY8s33iFPySSVXqtm5Hu29Ne/9bnA0JmyLmgenA==} + '@typescript-eslint/eslint-plugin@8.38.0': + resolution: {integrity: sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.37.0 + '@typescript-eslint/parser': ^8.38.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.37.0': - resolution: {integrity: sha512-kVIaQE9vrN9RLCQMQ3iyRlVJpTiDUY6woHGb30JDkfJErqrQEmtdWH3gV0PBAfGZgQXoqzXOO0T3K6ioApbbAA==} + '@typescript-eslint/parser@8.38.0': + resolution: {integrity: sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/project-service@8.37.0': - resolution: {integrity: sha512-BIUXYsbkl5A1aJDdYJCBAo8rCEbAvdquQ8AnLb6z5Lp1u3x5PNgSSx9A/zqYc++Xnr/0DVpls8iQ2cJs/izTXA==} + '@typescript-eslint/project-service@8.38.0': + resolution: {integrity: sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/scope-manager@8.37.0': - resolution: {integrity: sha512-0vGq0yiU1gbjKob2q691ybTg9JX6ShiVXAAfm2jGf3q0hdP6/BruaFjL/ManAR/lj05AvYCH+5bbVo0VtzmjOA==} + '@typescript-eslint/scope-manager@8.38.0': + resolution: {integrity: sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.37.0': - resolution: {integrity: sha512-1/YHvAVTimMM9mmlPvTec9NP4bobA1RkDbMydxG8omqwJJLEW/Iy2C4adsAESIXU3WGLXFHSZUU+C9EoFWl4Zg==} + '@typescript-eslint/tsconfig-utils@8.38.0': + resolution: {integrity: sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/type-utils@8.37.0': - resolution: {integrity: sha512-SPkXWIkVZxhgwSwVq9rqj/4VFo7MnWwVaRNznfQDc/xPYHjXnPfLWn+4L6FF1cAz6e7dsqBeMawgl7QjUMj4Ow==} + '@typescript-eslint/type-utils@8.38.0': + resolution: {integrity: sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/types@8.37.0': - resolution: {integrity: sha512-ax0nv7PUF9NOVPs+lmQ7yIE7IQmAf8LGcXbMvHX5Gm+YJUYNAl340XkGnrimxZ0elXyoQJuN5sbg6C4evKA4SQ==} + '@typescript-eslint/types@8.38.0': + resolution: {integrity: sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.37.0': - resolution: {integrity: sha512-zuWDMDuzMRbQOM+bHyU4/slw27bAUEcKSKKs3hcv2aNnc/tvE/h7w60dwVw8vnal2Pub6RT1T7BI8tFZ1fE+yg==} + '@typescript-eslint/typescript-estree@8.38.0': + resolution: {integrity: sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.37.0': - resolution: {integrity: sha512-TSFvkIW6gGjN2p6zbXo20FzCABbyUAuq6tBvNRGsKdsSQ6a7rnV6ADfZ7f4iI3lIiXc4F4WWvtUfDw9CJ9pO5A==} + '@typescript-eslint/utils@8.38.0': + resolution: {integrity: sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/visitor-keys@8.37.0': - resolution: {integrity: sha512-YzfhzcTnZVPiLfP/oeKtDp2evwvHLMe0LOy7oe+hb9KKIumLNohYS9Hgp1ifwpu42YWxhZE8yieggz6JpqO/1w==} + '@typescript-eslint/visitor-keys@8.38.0': + resolution: {integrity: sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@vitest/expect@3.2.4': @@ -901,8 +858,8 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.31.0: - resolution: {integrity: sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==} + eslint@9.32.0: + resolution: {integrity: sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1238,8 +1195,8 @@ packages: engines: {node: '>= 16'} hasBin: true - memfs@4.17.2: - resolution: {integrity: sha512-NgYhCOWgovOXSzvYgUW0LQ7Qy72rWQMGGFJDoWg4G30RHd3z77VbYdtJ4fembJXBy8pMIUA31XNAupobOQlwdg==} + memfs@4.35.0: + resolution: {integrity: sha512-Jso9wm2YC3uIee9vhbwMpLla4BNH0oQoOOnL4Ej7v6idah8dRSiuGyP4blmosXfbAbngJkWx+8BbqknWpMYSxg==} engines: {node: '>= 4.0.0'} merge2@1.4.1: @@ -1298,11 +1255,6 @@ packages: outdent@0.5.0: resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - oxlint@1.7.0: - resolution: {integrity: sha512-krJN1fIRhs3xK1FyVyPtYIV9tkT4WDoIwI7eiMEKBuCjxqjQt5ZemQm1htPvHqNDOaWFRFt4btcwFdU8bbwgvA==} - engines: {node: '>=8.*'} - hasBin: true - p-filter@2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} @@ -1587,8 +1539,8 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - typescript-eslint@8.37.0: - resolution: {integrity: sha512-TnbEjzkE9EmcO0Q2zM+GE8NQLItNAJpMmED1BdgoBMYNdqMhzlbqfdSwiRlAzEK2pA9UzVW0gzaaIzXWg2BjfA==} + typescript-eslint@8.38.0: + resolution: {integrity: sha512-FsZlrYK6bPDGoLeZRuvx2v6qrM03I0U0SnfCLPs/XCCPCFD80xU9Pg09H/K+XFa68uJuZo7l/Xhs+eDRg2l3hg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1599,8 +1551,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.8.3: - resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + typescript@5.9.2: + resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==} engines: {node: '>=14.17'} hasBin: true @@ -2001,9 +1953,9 @@ snapshots: '@esbuild/win32-x64@0.25.6': optional: true - '@eslint-community/eslint-utils@4.7.0(eslint@9.31.0)': + '@eslint-community/eslint-utils@4.7.0(eslint@9.32.0)': dependencies: - eslint: 9.31.0 + eslint: 9.32.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -2036,11 +1988,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.31.0': {} + '@eslint/js@9.32.0': {} '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.3.3': + '@eslint/plugin-kit@0.3.4': dependencies: '@eslint/core': 0.15.1 levn: 0.4.1 @@ -2108,30 +2060,6 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 - '@oxlint/darwin-arm64@1.7.0': - optional: true - - '@oxlint/darwin-x64@1.7.0': - optional: true - - '@oxlint/linux-arm64-gnu@1.7.0': - optional: true - - '@oxlint/linux-arm64-musl@1.7.0': - optional: true - - '@oxlint/linux-x64-gnu@1.7.0': - optional: true - - '@oxlint/linux-x64-musl@1.7.0': - optional: true - - '@oxlint/win32-arm64@1.7.0': - optional: true - - '@oxlint/win32-x64@1.7.0': - optional: true - '@rollup/rollup-android-arm-eabi@4.45.1': optional: true @@ -2210,101 +2138,101 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@24.0.14': + '@types/node@24.1.0': dependencies: undici-types: 7.8.0 - '@typescript-eslint/eslint-plugin@8.37.0(@typescript-eslint/parser@8.37.0(eslint@9.31.0)(typescript@5.8.3))(eslint@9.31.0)(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.37.0(eslint@9.31.0)(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.37.0 - '@typescript-eslint/type-utils': 8.37.0(eslint@9.31.0)(typescript@5.8.3) - '@typescript-eslint/utils': 8.37.0(eslint@9.31.0)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.37.0 - eslint: 9.31.0 + '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.38.0 + '@typescript-eslint/type-utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.38.0 + eslint: 9.32.0 graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.37.0(eslint@9.31.0)(typescript@5.8.3)': + '@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2)': dependencies: - '@typescript-eslint/scope-manager': 8.37.0 - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.37.0 + '@typescript-eslint/scope-manager': 8.38.0 + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.38.0 debug: 4.4.1 - eslint: 9.31.0 - typescript: 5.8.3 + eslint: 9.32.0 + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.37.0(typescript@5.8.3)': + '@typescript-eslint/project-service@8.38.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.37.0(typescript@5.8.3) - '@typescript-eslint/types': 8.37.0 + '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.9.2) + '@typescript-eslint/types': 8.38.0 debug: 4.4.1 - typescript: 5.8.3 + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.37.0': + '@typescript-eslint/scope-manager@8.38.0': dependencies: - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/visitor-keys': 8.37.0 + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/visitor-keys': 8.38.0 - '@typescript-eslint/tsconfig-utils@8.37.0(typescript@5.8.3)': + '@typescript-eslint/tsconfig-utils@8.38.0(typescript@5.9.2)': dependencies: - typescript: 5.8.3 + typescript: 5.9.2 - '@typescript-eslint/type-utils@8.37.0(eslint@9.31.0)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.38.0(eslint@9.32.0)(typescript@5.9.2)': dependencies: - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.37.0(eslint@9.31.0)(typescript@5.8.3) + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) debug: 4.4.1 - eslint: 9.31.0 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + eslint: 9.32.0 + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.37.0': {} + '@typescript-eslint/types@8.38.0': {} - '@typescript-eslint/typescript-estree@8.37.0(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.38.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/project-service': 8.37.0(typescript@5.8.3) - '@typescript-eslint/tsconfig-utils': 8.37.0(typescript@5.8.3) - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/visitor-keys': 8.37.0 + '@typescript-eslint/project-service': 8.38.0(typescript@5.9.2) + '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.9.2) + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/visitor-keys': 8.38.0 debug: 4.4.1 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.37.0(eslint@9.31.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.38.0(eslint@9.32.0)(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.31.0) - '@typescript-eslint/scope-manager': 8.37.0 - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - eslint: 9.31.0 - typescript: 5.8.3 + '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) + '@typescript-eslint/scope-manager': 8.38.0 + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) + eslint: 9.32.0 + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.37.0': + '@typescript-eslint/visitor-keys@8.38.0': dependencies: - '@typescript-eslint/types': 8.37.0 + '@typescript-eslint/types': 8.38.0 eslint-visitor-keys: 4.2.1 '@vitest/expect@3.2.4': @@ -2315,13 +2243,13 @@ snapshots: chai: 5.2.1 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.0.5(@types/node@24.0.14)(yaml@2.8.0))': + '@vitest/mocker@3.2.4(vite@7.0.5(@types/node@24.1.0)(yaml@2.8.0))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 7.0.5(@types/node@24.0.14)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.1.0)(yaml@2.8.0) '@vitest/pretty-format@3.2.4': dependencies: @@ -2548,9 +2476,9 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@10.1.8(eslint@9.31.0): + eslint-config-prettier@10.1.8(eslint@9.32.0): dependencies: - eslint: 9.31.0 + eslint: 9.32.0 eslint-scope@8.4.0: dependencies: @@ -2561,16 +2489,16 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.31.0: + eslint@9.32.0: dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.31.0) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.21.0 '@eslint/config-helpers': 0.3.0 '@eslint/core': 0.15.1 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.31.0 - '@eslint/plugin-kit': 0.3.3 + '@eslint/js': 9.32.0 + '@eslint/plugin-kit': 0.3.4 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 @@ -2883,7 +2811,7 @@ snapshots: marked@9.1.6: {} - memfs@4.17.2: + memfs@4.35.0: dependencies: '@jsonjoy.com/json-pack': 1.2.0(tslib@2.8.1) '@jsonjoy.com/util': 1.6.0(tslib@2.8.1) @@ -2948,17 +2876,6 @@ snapshots: outdent@0.5.0: {} - oxlint@1.7.0: - optionalDependencies: - '@oxlint/darwin-arm64': 1.7.0 - '@oxlint/darwin-x64': 1.7.0 - '@oxlint/linux-arm64-gnu': 1.7.0 - '@oxlint/linux-arm64-musl': 1.7.0 - '@oxlint/linux-x64-gnu': 1.7.0 - '@oxlint/linux-x64-musl': 1.7.0 - '@oxlint/win32-arm64': 1.7.0 - '@oxlint/win32-x64': 1.7.0 - p-filter@2.1.0: dependencies: p-map: 2.1.0 @@ -3187,9 +3104,9 @@ snapshots: dependencies: tslib: 2.8.1 - ts-api-utils@2.1.0(typescript@5.8.3): + ts-api-utils@2.1.0(typescript@5.9.2): dependencies: - typescript: 5.8.3 + typescript: 5.9.2 tslib@2.8.1: {} @@ -3197,20 +3114,20 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.37.0(eslint@9.31.0)(typescript@5.8.3): + typescript-eslint@8.38.0(eslint@9.32.0)(typescript@5.9.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.37.0(@typescript-eslint/parser@8.37.0(eslint@9.31.0)(typescript@5.8.3))(eslint@9.31.0)(typescript@5.8.3) - '@typescript-eslint/parser': 8.37.0(eslint@9.31.0)(typescript@5.8.3) - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.37.0(eslint@9.31.0)(typescript@5.8.3) - eslint: 9.31.0 - typescript: 5.8.3 + '@typescript-eslint/eslint-plugin': 8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + eslint: 9.32.0 + typescript: 5.9.2 transitivePeerDependencies: - supports-color typescript@5.6.1-rc: {} - typescript@5.8.3: {} + typescript@5.9.2: {} undici-types@7.8.0: {} @@ -3224,13 +3141,13 @@ snapshots: validate-npm-package-name@5.0.1: {} - vite-node@3.2.4(@types/node@24.0.14)(yaml@2.8.0): + vite-node@3.2.4(@types/node@24.1.0)(yaml@2.8.0): dependencies: cac: 6.7.14 debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.0.5(@types/node@24.0.14)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.1.0)(yaml@2.8.0) transitivePeerDependencies: - '@types/node' - jiti @@ -3245,7 +3162,7 @@ snapshots: - tsx - yaml - vite@7.0.5(@types/node@24.0.14)(yaml@2.8.0): + vite@7.0.5(@types/node@24.1.0)(yaml@2.8.0): dependencies: esbuild: 0.25.6 fdir: 6.4.6(picomatch@4.0.3) @@ -3254,15 +3171,15 @@ snapshots: rollup: 4.45.1 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 24.0.14 + '@types/node': 24.1.0 fsevents: 2.3.3 yaml: 2.8.0 - vitest@3.2.4(@types/node@24.0.14)(yaml@2.8.0): + vitest@3.2.4(@types/node@24.1.0)(yaml@2.8.0): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.0.5(@types/node@24.0.14)(yaml@2.8.0)) + '@vitest/mocker': 3.2.4(vite@7.0.5(@types/node@24.1.0)(yaml@2.8.0)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -3280,11 +3197,11 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.0.5(@types/node@24.0.14)(yaml@2.8.0) - vite-node: 3.2.4(@types/node@24.0.14)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.1.0)(yaml@2.8.0) + vite-node: 3.2.4(@types/node@24.1.0)(yaml@2.8.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 24.0.14 + '@types/node': 24.1.0 transitivePeerDependencies: - jiti - less diff --git a/src/cli.ts b/src/cli.ts index e044f00..4796488 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,7 +1,7 @@ #!/usr/bin/env node import { program } from "commander"; -import { setupCommand } from "./commands/setup.js"; +import { setupCommand } from "./commands/setup.ts"; setupCommand({ program }); diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 308ca0d..ddb2e6c 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -3,11 +3,11 @@ import { isCancel, cancel, log, multiselect, select } from "@clack/prompts"; import { installSolutions, type Solutions, -} from "../solutions/install-solutions.js"; +} from "../solutions/install-solutions.ts"; import { installPattern, SOLUTION_PATTERNS, -} from "../solutions/install-pattern.js"; +} from "../solutions/install-pattern.ts"; const SOLUTIONS = [ ...SOLUTION_PATTERNS, diff --git a/src/solutions/eslint-config-prettier.ts b/src/solutions/eslint-config-prettier.ts index e52472b..ce29127 100644 --- a/src/solutions/eslint-config-prettier.ts +++ b/src/solutions/eslint-config-prettier.ts @@ -1,4 +1,4 @@ -import { packageManager, installPackage } from "../utils/package-manager.js"; +import { packageManager, installPackage } from "../utils/package-manager.ts"; import { log } from "@clack/prompts"; import color from "picocolors"; diff --git a/src/solutions/eslint.ts b/src/solutions/eslint.ts index cbd9111..e536c8f 100644 --- a/src/solutions/eslint.ts +++ b/src/solutions/eslint.ts @@ -1,6 +1,6 @@ import { log } from "@clack/prompts"; import { spawnSync } from "node:child_process"; -import { packageManager, getCreateCommand } from "../utils/package-manager.js"; +import { packageManager, getCreateCommand } from "../utils/package-manager.ts"; const PACKAGE = "@eslint/config@latest"; diff --git a/src/solutions/github-actions.ts b/src/solutions/github-actions.ts index 31664e7..7336e74 100644 --- a/src/solutions/github-actions.ts +++ b/src/solutions/github-actions.ts @@ -1,9 +1,9 @@ import { mkdirSync, writeFileSync, existsSync, readFileSync } from "node:fs"; import { resolve } from "node:path"; import { log } from "@clack/prompts"; -import { type Solutions } from "./install-solutions.js"; -import { appendToWorkflowFile } from "../templates/github-actions.js"; -import { packageManager } from "../utils/package-manager.js"; +import { type Solutions } from "./install-solutions.ts"; +import { appendToWorkflowFile } from "../templates/github-actions.ts"; +import { packageManager } from "../utils/package-manager.ts"; export function setupGithubActions({ solutions }: { solutions: Solutions }) { try { diff --git a/src/solutions/install-pattern.ts b/src/solutions/install-pattern.ts index 39124f9..d0c86e9 100644 --- a/src/solutions/install-pattern.ts +++ b/src/solutions/install-pattern.ts @@ -1,6 +1,6 @@ import { log, multiselect, isCancel, cancel } from "@clack/prompts"; -import { setupPrePushHook } from "./pre-push-hook.js"; -import { setupGithubActions } from "./github-actions.js"; +import { setupPrePushHook } from "./pre-push-hook.ts"; +import { setupGithubActions } from "./github-actions.ts"; export const SOLUTION_PATTERNS = [ { name: "Code formatting", solution: "prettier" }, diff --git a/src/solutions/install-solutions.ts b/src/solutions/install-solutions.ts index 2fdd408..d7ffb9e 100644 --- a/src/solutions/install-solutions.ts +++ b/src/solutions/install-solutions.ts @@ -1,11 +1,11 @@ import { log, isCancel, cancel, confirm } from "@clack/prompts"; -import { setupPrePushHook } from "./pre-push-hook.js"; -import { setupPrettier } from "./prettier.js"; -import { setupEslint } from "./eslint.js"; -import { setupOxlint } from "./oxlint.js"; -import { setupEslintConfigPrettier } from "./eslint-config-prettier.js"; -import { setupGithubActions } from "./github-actions.js"; -import { setupTypescript } from "./typescript.js"; +import { setupPrePushHook } from "./pre-push-hook.ts"; +import { setupPrettier } from "./prettier.ts"; +import { setupEslint } from "./eslint.ts"; +import { setupOxlint } from "./oxlint.ts"; +import { setupEslintConfigPrettier } from "./eslint-config-prettier.ts"; +import { setupGithubActions } from "./github-actions.ts"; +import { setupTypescript } from "./typescript.ts"; export type Solutions = ("prettier" | "eslint" | "typescript" | "oxlint")[]; diff --git a/src/solutions/oxlint.ts b/src/solutions/oxlint.ts index 2eda580..5e175db 100644 --- a/src/solutions/oxlint.ts +++ b/src/solutions/oxlint.ts @@ -4,7 +4,7 @@ import { packageManager, getExecCommand, installPackage, -} from "../utils/package-manager.js"; +} from "../utils/package-manager.ts"; const PACKAGE = "oxlint"; diff --git a/src/solutions/pre-push-hook.ts b/src/solutions/pre-push-hook.ts index 0b34552..f0329da 100644 --- a/src/solutions/pre-push-hook.ts +++ b/src/solutions/pre-push-hook.ts @@ -1,9 +1,9 @@ import { existsSync, readFileSync, writeFileSync } from "node:fs"; import { resolve } from "node:path"; -import { packageManager, installPackage } from "../utils/package-manager.js"; import { log } from "@clack/prompts"; -import { appendToLefthookFile } from "../templates/lefthook.js"; -import { type Solutions } from "./install-solutions.js"; +import { packageManager, installPackage } from "../utils/package-manager.ts"; +import { appendToLefthookFile } from "../templates/lefthook.ts"; +import { type Solutions } from "./install-solutions.ts"; const PACKAGE = "lefthook"; diff --git a/src/solutions/prettier.ts b/src/solutions/prettier.ts index aae3ef4..7758fc4 100644 --- a/src/solutions/prettier.ts +++ b/src/solutions/prettier.ts @@ -1,7 +1,7 @@ import { existsSync, writeFileSync } from "node:fs"; import { resolve } from "node:path"; -import { packageManager, installPackage } from "../utils/package-manager.js"; import { log } from "@clack/prompts"; +import { packageManager, installPackage } from "../utils/package-manager.ts"; const PACKAGE = "prettier"; diff --git a/src/solutions/typescript.ts b/src/solutions/typescript.ts index c77a40b..045d70a 100644 --- a/src/solutions/typescript.ts +++ b/src/solutions/typescript.ts @@ -2,12 +2,11 @@ import { existsSync, writeFileSync } from "node:fs"; import { resolve } from "node:path"; import open from "open"; import { cancel, confirm, isCancel, log, select } from "@clack/prompts"; -import { packageManager, installPackage } from "../utils/package-manager.js"; +import { packageManager, installPackage } from "../utils/package-manager.ts"; import { typeScriptConfigurationLibrary, - typeScriptConfigurationScript, typeScriptConfigurationServer, -} from "../templates/typescript.js"; +} from "../templates/typescript.ts"; const PACKAGE = "typescript"; export async function setupTypescript() { @@ -58,8 +57,10 @@ export async function setupTypescript() { const buildContext = await select({ message: "What are you building?", options: [ - { label: "Script utilities", value: "script" }, - { label: "A server application", value: "server" }, + { + label: "A server app or script utilities", + value: "server", + }, { label: "A library that will be published", value: "library" }, ], }); @@ -88,13 +89,8 @@ export async function setupTypescript() { resolve("./tsconfig.json"), JSON.stringify(typeScriptConfigurationLibrary, null, 2), ); - } else if (buildContext === "script") { - log.warn('Make sure to have `"type": "module"` in your package.json'); - writeFileSync( - resolve("./tsconfig.json"), - JSON.stringify(typeScriptConfigurationScript, null, 2), - ); } else if (buildContext === "server") { + log.warn('Make sure to have `"type": "module"` in your package.json'); writeFileSync( resolve("./tsconfig.json"), JSON.stringify(typeScriptConfigurationServer, null, 2), diff --git a/src/templates/github-actions.ts b/src/templates/github-actions.ts index ca4e4e4..58fa50e 100644 --- a/src/templates/github-actions.ts +++ b/src/templates/github-actions.ts @@ -1,7 +1,7 @@ import yaml from "yaml"; import { type AgentName } from "package-manager-detector"; -import { getExecCommand } from "../utils/package-manager.js"; -import { Solutions } from "../solutions/install-solutions.js"; +import { getExecCommand } from "../utils/package-manager.ts"; +import type { Solutions } from "../solutions/install-solutions.ts"; function getAgentActionSetup(agent: AgentName) { switch (agent) { diff --git a/src/templates/lefthook.ts b/src/templates/lefthook.ts index 1f30e21..1ec7500 100644 --- a/src/templates/lefthook.ts +++ b/src/templates/lefthook.ts @@ -1,7 +1,7 @@ import { type AgentName } from "package-manager-detector"; import yaml from "yaml"; -import { getExecCommand } from "../utils/package-manager.js"; -import { type Solutions } from "../solutions/install-solutions.js"; +import { getExecCommand } from "../utils/package-manager.ts"; +import { type Solutions } from "../solutions/install-solutions.ts"; function prettierPrePushHook(agent: AgentName) { return { diff --git a/src/templates/typescript.ts b/src/templates/typescript.ts index cf147a8..d6b397a 100644 --- a/src/templates/typescript.ts +++ b/src/templates/typescript.ts @@ -14,32 +14,25 @@ export const typeScriptConfigurationLibrary = { include: ["./src"], }; -export const typeScriptConfigurationScript = { - extends: [ - "@tsconfig/node-lts/tsconfig.json", - "@tsconfig/strictest/tsconfig.json", - ], - compilerOptions: { - moduleResolution: "NodeNext", - module: "NodeNext", - sourceMap: true, - noEmit: true, - allowImportingTsExtensions: true, - }, - include: ["./src"], -}; - export const typeScriptConfigurationServer = { extends: [ "@tsconfig/node-lts/tsconfig.json", "@tsconfig/strictest/tsconfig.json", ], compilerOptions: { - moduleResolution: "NodeNext", - module: "NodeNext", - sourceMap: true, - outDir: "./dist", rootDir: "./src", + outDir: "./dist", + + moduleDetection: "force", + verbatimModuleSyntax: true, + rewriteRelativeImportExtensions: true, + erasableSyntaxOnly: true, + + types: ["node"], + sourceMap: true, + + forceConsistentCasingInFileNames: true, + noUncheckedSideEffectImports: true, }, include: ["./src"], }; diff --git a/tsconfig.json b/tsconfig.json index 684fd40..c72a6a0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,12 +4,21 @@ "@tsconfig/strictest/tsconfig.json" ], "compilerOptions": { - "moduleResolution": "NodeNext", - "module": "NodeNext", - "declaration": true, - "sourceMap": true, + "rootDir": "./src", "outDir": "./dist", - "rootDir": "./src" + + "moduleDetection": "force", + "verbatimModuleSyntax": true, + "rewriteRelativeImportExtensions": true, + "erasableSyntaxOnly": true, + + "types": ["node"], + "sourceMap": true, + "declaration": true, + "declarationMap": true, + + "forceConsistentCasingInFileNames": true, + "noUncheckedSideEffectImports": true }, "include": ["./src"], "exclude": ["./src/**/*.test.ts"] From c4e15bf8bf71631f2abaa88510f6efc9f1cc674d Mon Sep 17 00:00:00 2001 From: "Jeremy Colin (Simple Frontend)" Date: Sat, 2 Aug 2025 21:15:06 +0200 Subject: [PATCH 2/3] chore: changeset for 1.0.0 --- .changeset/vast-cougars-visit.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/vast-cougars-visit.md diff --git a/.changeset/vast-cougars-visit.md b/.changeset/vast-cougars-visit.md new file mode 100644 index 0000000..f40ae7a --- /dev/null +++ b/.changeset/vast-cougars-visit.md @@ -0,0 +1,5 @@ +--- +"simplefrontend": major +--- + +stable version with latest recommended tsconfig From 82ebabf997c887eba0261724f0d56dda56b77815 Mon Sep 17 00:00:00 2001 From: "Jeremy Colin (Simple Frontend)" Date: Sat, 2 Aug 2025 21:20:01 +0200 Subject: [PATCH 3/3] dev: update ts lib --- src/templates/typescript.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/templates/typescript.ts b/src/templates/typescript.ts index d6b397a..423ddc2 100644 --- a/src/templates/typescript.ts +++ b/src/templates/typescript.ts @@ -4,12 +4,20 @@ export const typeScriptConfigurationLibrary = { "@tsconfig/strictest/tsconfig.json", ], compilerOptions: { - moduleResolution: "NodeNext", - module: "NodeNext", + rootDir: "./src", + outDir: "./dist", + + moduleDetection: "force", + verbatimModuleSyntax: true, + rewriteRelativeImportExtensions: true, + erasableSyntaxOnly: true, + sourceMap: true, declaration: true, - outDir: "./dist", - rootDir: "./src", + declarationMap: true, + + forceConsistentCasingInFileNames: true, + noUncheckedSideEffectImports: true, }, include: ["./src"], };