Skip to content

[FEATURE]: Upgrade esbuild in drizzle-kit to support es2023 target #3118

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

Open
bagbag opened this issue Oct 14, 2024 · 18 comments
Open

[FEATURE]: Upgrade esbuild in drizzle-kit to support es2023 target #3118

bagbag opened this issue Oct 14, 2024 · 18 comments
Labels
drizzle/kit enhancement New feature or request priority Will be worked on next

Comments

@bagbag
Copy link

bagbag commented Oct 14, 2024

Running npx drizzle-kit generate errors with Invalid target "es2023" in "--target=es2023" in my project. Upgrading esbuild to the latest version solved that issue.

Describe what you want

Upgrading of esbuild to latest version.

@bagbag bagbag added the enhancement New feature or request label Oct 14, 2024
@L-Mario564 L-Mario564 added drizzle/kit priority Will be worked on next labels Oct 25, 2024
@banuni
Copy link

banuni commented Oct 29, 2024

also - esbuild < 0.22 has security issues and the ~ symbol disallows us to upgrade it manually in our repo...

reference: evanw/esbuild#3802

daichitakahashi added a commit to daichitakahashi/cf-eventhub that referenced this issue Nov 28, 2024
@ahalimkara
Copy link

We have the same issue, upgrading esbuild to 0.25.1 (latest as of writing) and drizzle-kit to 0.30.5 (latest as of writing) doesn't help. It only works when using target: ES2022

@dm-hadron
Copy link

Come on, guys. Upgrade it - the whole TS/JS world has moved on long time ago :-)

@Renato-dev13
Copy link

We have the same issue, upgrading esbuild to 0.25.1 (latest as of writing) and drizzle-kit to 0.30.5 (latest as of writing) doesn't help. It only works when using target: ES2022

Thanks for sharing! I’m facing the same issue. You mentioned it only works when using target: ES2022 — how exactly did you set that target? I'm really struggling with this and can't seem to make it work...

@ahalimkara
Copy link

Hi @Renato-dev13 , you just need to add target: ES2022 to tsconfig.json, example config:

{
    "compilerOptions": {
        "target": "ES2022",
        "module": "ES2022",
        "outDir": "dist",
        "moduleResolution": "Node",
        "skipLibCheck": true,
        "noUnusedLocals": true,
        "strict": true,
        "esModuleInterop": true,
        "resolveJsonModule": true
    },
    "include": ["src"]
}

@Renato-dev13
Copy link

Renato-dev13 commented Mar 21, 2025

Hi, @ahalimkara. Thanks for the quick reply!

@lifeordev
Copy link

+1, just ran into the same issue.

@ooau
Copy link

ooau commented Apr 2, 2025

pLeASe FiX tHiS

@afogel
Copy link

afogel commented Apr 2, 2025

+1

1 similar comment
@andrewjmcgehee
Copy link

+1

@rbjakab
Copy link

rbjakab commented Apr 9, 2025

Same issue.

@jmsofarelli
Copy link

+1

1 similar comment
@trezi29
Copy link

trezi29 commented Apr 11, 2025

+1

@GenericArt
Copy link

+1

@AndriiSherman
Copy link
Member

will be included in the next release

@dinmukhamedm
Copy link

dinmukhamedm commented Apr 18, 2025

@AndriiSherman Hey thanks a lot for the fix!

I can see that in 0.31.0 the direct dependency on esbuild was bumped via #4416, but we still transitively depend on older esbuild, which causes the issue mentioned above:

also - esbuild < 0.22 has security issues

Which we get dependabot alerts for. I sort of think this must be a separate issue, but since you've worked on this recently, you probably have the best context.

The dependency chain in question is
[email protected] -> @esbuild-kit/[email protected] (deprecated) -> @esbuild-kit/[email protected] -> [email protected]

Also linking #4045 where people discuss the same issue and propose a possible fix

@oscar-ospina
Copy link

@AndriiSherman Hey thanks a lot for the fix!

I can see that in 0.31.0 the direct dependency on esbuild was bumped via #4416, but we still transitively depend on older esbuild, which causes the issue mentioned above:

also - esbuild < 0.22 has security issues

Which we get dependabot alerts for. I sort of think this must be a separate issue, but since you've worked on this recently, you probably have the best context.

The dependency chain in question is [email protected] -> @esbuild-kit/[email protected] (deprecated) -> @esbuild-kit/[email protected] -> [email protected]

Also linking #4045 where people discuss the same issue and propose a possible fix

x2

@kyleremotehands
Copy link

Dependabot cannot update esbuild to a non-vulnerable version
The latest possible version that can be installed is 0.18.20 because of the following conflicting dependencies:

[email protected] requires esbuild@~0.18.20 via a transitive dependency on @esbuild-kit/[email protected]
[email protected] requires esbuild@^0.25.2
No patched version available for esbuild
The earliest fixed version is 0.25.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drizzle/kit enhancement New feature or request priority Will be worked on next
Projects
None yet
Development

No branches or pull requests