Comments (12)
We will push Bun v1.0.34 to fix this tonight
from bun.
I think it would be helpful if you can provide the exact commands used for reproducing the repository that is broken.
from bun.
Unfortunately it's a bit complicated to replciate as we have a private monorepo built on turborepo. What we have is a base eslint-config package defined as such
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"prettier"
],
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-mixed-spaces-and-tabs": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-namespace": "off",
"no-case-declarations": "off",
"no-extra-semi": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"prettier/prettier": "error"
},
"ignorePatterns": [
"example /*",
"tests/**/*"
]
}
and then for each app and package all we do is to extends such package as such
{
"$schema": "https://json.schemastore.org/eslintrc",
"extends": ["@my-app/eslint-config/base.json"]
}
Running the lint command works just fine on v1.0.30, but if I upgrade to v1.0.32, without changing anything else, it breaks immediately due to
@my-app/error-protocol:lint: There was a problem loading formatter: ~/repos/apps/my-app/node_modules/eslint/lib/cli-engine/formatters/stylish
@my-app/error-protocol:lint: Error: require() of ES Module ~/repos/apps/my-app/node_modules/chalk/source/index.js from ~/repos/apps/my-app/node_modules/eslint/lib/cli-engine/formatters/stylish.js not supported.
@my-app/error-protocol:lint: Instead change the require of index.js in ~/repos/apps/my-app/node_modules/eslint/lib/cli-engine/formatters/stylish.js to a dynamic import() which is available in all CommonJS modules.
It works ok on v1.0.31 on my local, but that also fails when running on Gitlab CI.
from bun.
@thecrabcode one subtle change we made in v1.0.32 was to hoist devDependencies
above regular dependencies in more cases. I'm pretty sure it would only ever error with error.DependencyLoop
in those cases though. This was to allow better support having both the same package in devDependencies
and dependencies
. I wonder if this is a workspace and there are multiple versions of these eslint related packages?
from bun.
hi @Jarred-Sumner, thanks for your answer!
We do indeed use workspaces, but we have a turbo package which install all the eslint dependencies, and it contains base eslint config files (we have different base configs for different kinds of apps, such as next config, base config etc...) that we extends from in each single app and package.
So in theory every app and package should use that one "central" dependency that is installed in the eslint config packge.
from bun.
the error with eslint seems to be related to ajv, Eslint uses an older version (v6) and with the new hoisting is trying to make eslint work with a newer version that throws a option missingRefs
. I will confirm if the newest version fixes this
from bun.
I just installed the latest canary and it works correctly
from bun.
That's great to hear! Thanks for the quick fix. Do you guys know when 1.0.34 will be made official?
from bun.
@thecrabcode "when its done" I guess. I usually follow releases in @Jarred-Sumner Twitter account. The dates there are not accurate but gives us an idea of the ETA
from bun.
@cuquo sounds good, thanks!
from bun.
nice.. I'm in the same boat as @thecrabcode since 1.0.32 also broke browser-sync
eagerly awaiting the new release
from bun.
Just downloaded the 1.0.34 release and I can confirm this sorted the issue out. Thanks for the super quick turnaround guys!
from bun.
Related Issues (20)
- Segmentation fault with drizzle + bun:sqlite after upgrade to 1.0.34 HOT 1
- Cannot find package "x" (workspace setup with minimal repro)
- require returning Object: { default: something }
- `bunx --bun vite` is slower on Windows
- Export named 'diffieHellman' not found in module 'crypto' when running in Nuxt server with `bun --bun dev`
- Bun 1.0.34 regression: segmentation fault when re-exporting module without non-type exports HOT 1
- bun lifecycle scripts can fail if bun and node are not in path.
- process.stdout.write outputs nothing, while console.log works HOT 2
- Bun fails to compile @mui/material >= 5.15.11 (where other compilers succeed, includes POC)
- axios request oAuth2 TLS with certificate PFX
- socket.readyState from Bun.connect(...) is typed wrong
- Dedupe error messages in `logger.Log`
- Replace `ResolvedSource` with `JSC::SourceProvider`
- TextDecoder can decode 2 byte overlong utf-8
- Bun gets segmentation fault while instantiating drizzle orm HOT 1
- Debugging single-file executables
- [created by mistake]
- call fetch() is error inWindows
- Windows: Bun cli breaks nushell and cmd prompt HOT 3
- Windows: Discord.js Sharding doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bun.