Closed jungwoo3490 closed 3 weeks ago
Latest commit: b922f3165ab7641737c05f8e0640faadfce5f2b0
The changes in this PR will be included in the next version bump.
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
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
suspensive.org | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jun 25, 2024 5:32am |
v1.suspensive.org | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jun 25, 2024 5:32am |
visualization.suspensive.org | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jun 25, 2024 5:32am |
@jungwoo3490 you can understand the version switching mechanism in detail by checking the PR below:
@jungwoo3490 you can understand the version switching mechanism in detail by checking the PR below:
I'll fix it with your reference. Thanks!!
Comparing jungwoo3490:ts-migration
(b922f31) with main
(42af7d0)
:warning: No benchmarks were detected in both the base of the PR and the PR.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.88%. Comparing base (
42af7d0
) to head (b922f31
).
When TypeScript compiles down to JavaScript, especially in certain environments or configurations, import.meta
might not be preserved or recognized correctly.
Actually, this is compile result.
So I used process.cwd()
to get current path instead of import.meta
.
// const __filename = fileURLToPath(import.meta.url)
// const __dirname = dirname(__filename)
const __dirname = process.cwd()
Then it works well!!
When TypeScript compiles down to JavaScript, especially in certain environments or configurations,
import.meta
might not be preserved or recognized correctly.Actually, this is compile result.
So I used
process.cwd()
to get current path instead ofimport.meta
.// const __filename = fileURLToPath(import.meta.url) // const __dirname = dirname(__filename) const __dirname = process.cwd()
Then it works well!!
![]()
I found potential problem here.
process.cwd()
value can be different depending on the environment in which the process is running.
So instead of process.cwd()
, I used __filename
to get current path.
This ensures that a fixed file path is always obtained.
// const __dirname = process.cwd()
const currentFilePath = __filename
const __dirname = dirname(currentFilePath)
Now, only cjs
format bundle file generated, except index.ts
, v4.ts
, v5.ts
.
https://www.npmjs.com/package/@suspensive/react-query?activeTab=code
@gwansikk @jungwoo3490 We can diff output files between as-is and to-be
@gwansikk Could you double-check again please?
LGTM ππ Everything is perfect. I tested it in both pnpm-monopre
and pnpm
environments.
close #961 close #962
Overview
Hi @manudeli @gwansikk !!!
I converted all of
@suspensive/react-query
s JS scripts to TypeScript.And I updated structure like this.
Please check it and leave feedback. I'll apply it. :)
PR Checklist