Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fea: switching tsm to ts-node in packagejson #6877

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

JerryWu1234
Copy link
Contributor

@JerryWu1234 JerryWu1234 commented Sep 12, 2024

#6856

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos
  • Infra

Description

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have ran pnpm change and documented my changes
  • I have made corresponding changes to the Qwik docs
  • Added new tests to cover the fix / functionality

Copy link

changeset-bot bot commented Sep 12, 2024

🦋 Changeset detected

Latest commit: 4377c65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
create-qwik Major
@builder.io/qwik Major
@builder.io/qwik-city Major
eslint-plugin-qwik Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@intellix
Copy link
Contributor

just out of curiosity, what's the problem with TSM? was thinking that it looked promising for some of our other projects

@JerryWu1234
Copy link
Contributor Author

just out of curiosity, what's the problem with TSM? was thinking that it looked promising for some of our other projects

”because tsm doesn't support its import map.“ this can answer your question ?

@wmertens
Copy link
Member

package.json Outdated Show resolved Hide resolved
tsconfig.json Show resolved Hide resolved
@JerryWu1234 JerryWu1234 marked this pull request as ready for review September 19, 2024 02:16
@JerryWu1234 JerryWu1234 requested a review from a team as a code owner September 19, 2024 02:16
@JerryWu1234
Copy link
Contributor Author

@wmertens I tested pnpm run build.core and pnpm run build.full looks greet. and quick than ever

Copy link

pkg-pr-new bot commented Sep 19, 2024

Open in Stackblitz

npm i https://pkg.pr.new/@builder.io/qwik@6877
npm i https://pkg.pr.new/@builder.io/qwik-city@6877
npm i https://pkg.pr.new/eslint-plugin-qwik@6877
npm i https://pkg.pr.new/create-qwik@6877

commit: 4377c65

@JerryWu1234
Copy link
Contributor Author

image

@wmertens I don't how to fix it, and other it looks greet

@@ -187,35 +190,35 @@
},
"private": true,
"scripts": {
"api.update": "tsm scripts/index.ts --tsc --api --dev",
"build": "tsm scripts/index.ts",
"api.update": "node --loader ts-node/esm --require ./scripts/runBefore.ts scripts/index.ts --tsc --api --dev",
Copy link
Contributor

@octet-stream octet-stream Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --loader flag is discouraged in favor of --import and will likely be removed in a future. Are you sure this is the right one? Also ts-node does not work with the --import flag. See: TypeStrong/ts-node#1909

I suggest to consider these other options instead:

  1. tsimp - uses tsc + caching;
  2. tsx - uses esbuild;
  3. Anything Node.js itself has to offer: --experimental-strip-types or --experimental-transform-types flag, but they are available since Node v22 end they are experimental;

Copy link
Contributor

github-actions bot commented Oct 4, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 4377c65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants