From 779e1ae7d2d86b5d966ea68b6e5cde84cae6e89c Mon Sep 17 00:00:00 2001 From: Thuc Pham <51660321+thucpn@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:11:14 +0700 Subject: [PATCH 1/3] refactor: use tsx instead of ts-node --- CONTRIBUTING.md | 2 +- helpers/typescript.ts | 2 +- templates/types/streaming/express/package.json | 2 +- templates/types/streaming/express/tsconfig.json | 5 ----- templates/types/streaming/nextjs/package.json | 2 +- templates/types/streaming/nextjs/tsconfig.json | 7 +------ 6 files changed, 5 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b82150df..edfb27c8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ Install NodeJS. Preferably v18 using nvm or n. Inside the `create-llama` directory: ``` -npm i -g pnpm ts-node +npm i -g pnpm tsx pnpm install ``` diff --git a/helpers/typescript.ts b/helpers/typescript.ts index e95533715..244403520 100644 --- a/helpers/typescript.ts +++ b/helpers/typescript.ts @@ -205,7 +205,7 @@ async function updatePackageJson({ // add generate script if using context engine packageJson.scripts = { ...packageJson.scripts, - generate: `ts-node ${path.join( + generate: `tsx ${path.join( relativeEngineDestPath, "engine", "generate.ts", diff --git a/templates/types/streaming/express/package.json b/templates/types/streaming/express/package.json index 53845d976..834841f53 100644 --- a/templates/types/streaming/express/package.json +++ b/templates/types/streaming/express/package.json @@ -26,7 +26,7 @@ "nodemon": "^3.0.1", "prettier": "^3.2.5", "prettier-plugin-organize-imports": "^3.2.4", - "ts-node": "^10.9.2", + "tsx": "^4.7.2", "tsup": "^8.0.1", "typescript": "^5.3.2" } diff --git a/templates/types/streaming/express/tsconfig.json b/templates/types/streaming/express/tsconfig.json index b103d12f7..c242d5fa0 100644 --- a/templates/types/streaming/express/tsconfig.json +++ b/templates/types/streaming/express/tsconfig.json @@ -9,10 +9,5 @@ "paths": { "@/*": ["./*"] } - }, - "ts-node": { - "compilerOptions": { - "module": "commonjs" - } } } diff --git a/templates/types/streaming/nextjs/package.json b/templates/types/streaming/nextjs/package.json index 82d984d53..baddb358c 100644 --- a/templates/types/streaming/nextjs/package.json +++ b/templates/types/streaming/nextjs/package.json @@ -44,7 +44,7 @@ "prettier": "^3.2.5", "prettier-plugin-organize-imports": "^3.2.4", "tailwindcss": "^3.3.6", - "ts-node": "^10.9.2", + "tsx": "^4.7.2", "typescript": "^5.3.2" } } diff --git a/templates/types/streaming/nextjs/tsconfig.json b/templates/types/streaming/nextjs/tsconfig.json index 65e2ba605..40c136b82 100644 --- a/templates/types/streaming/nextjs/tsconfig.json +++ b/templates/types/streaming/nextjs/tsconfig.json @@ -24,10 +24,5 @@ "forceConsistentCasingInFileNames": true }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"], - "ts-node": { - "compilerOptions": { - "module": "commonjs" - } - } + "exclude": ["node_modules"] } From d2ed7cec2b8195162fd6aa11b3f5e908121a6d68 Mon Sep 17 00:00:00 2001 From: Thuc Pham <51660321+thucpn@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:11:59 +0700 Subject: [PATCH 2/3] Create lovely-mayflies-appear.md --- .changeset/lovely-mayflies-appear.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/lovely-mayflies-appear.md diff --git a/.changeset/lovely-mayflies-appear.md b/.changeset/lovely-mayflies-appear.md new file mode 100644 index 000000000..8038e3d8a --- /dev/null +++ b/.changeset/lovely-mayflies-appear.md @@ -0,0 +1,5 @@ +--- +"create-llama": patch +--- + +refactor: use tsx instead of ts-node From 4e664269f89ca7f6ee3fe0cc5bf635e450d71d5c Mon Sep 17 00:00:00 2001 From: Marcus Schiesser Date: Mon, 22 Apr 2024 10:04:02 +0800 Subject: [PATCH 3/3] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edfb27c8c..1226bda99 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ Install NodeJS. Preferably v18 using nvm or n. Inside the `create-llama` directory: ``` -npm i -g pnpm tsx +npm i -g pnpm pnpm install ```