2.0.0
Warning
Due to a CI problem, this version is broken and not includes necessary files in the package.
Minor Changes
-
#6535
d8c08e1
Thanks @regseb! - Biome's JavaScript Bindings now have specific subpath exports for the three packages:import { Biome } from "@biomejs/js-api/bundler";
import { Biome } from "@biomejs/js-api/nodejs";
import { Biome } from "@biomejs/js-api/web";
These new subpath exports load only TypeScript declarations, whereas the default export loads declarations for all three packages. This was a problem if you checked your code with
tsc
.-
Old usage with default export (no subpath):
import { Biome, Distribution } from "@biomejs/js-api"; const biome = await Biome.create({ distribution: Distribution.NODE });
-
New usage with a specific subpath export:
import { Biome } from "@biomejs/js-api/nodejs"; const biome = new Biome();
Patch Changes
- Updated dependencies []:
- @biomejs/wasm-web@2.1.0
- @biomejs/wasm-bundler@2.1.0
- @biomejs/wasm-nodejs@2.1.0
What's Changed
- feat(core): support import namespaces by @arendjr in #6303
- feat(core): support
export *
syntax by @arendjr in #6311 - fix(linter): prevent false positives in
noMisusedPromises
by @arendjr in #6315 - perf: use
TypeStore
in global resolver by @arendjr in #6318 - perf: resolve and map types in single pass by @arendjr in #6319
- perf: deduplicate types by @arendjr in #6324
- chore: add
swr
fixtures by @arendjr in #6339 - fix(resolver): resolve type definitions for JavaScript files by @arendjr in #6343
- feat(core): flatten intersections + call signatures by @arendjr in #6404
- perf: preallocate type store by @arendjr in #6421
- perf: store types behind
Arc
s by @arendjr in #6442 - feat: add nx.json project.json to Well-known files by @ianzone in #6488
- feat(linter): handle arrays of Promises in
noFloatingPromises
by @arendjr in #6512 - fix(core): handle ternary in type alias by @arendjr in #6520
- fix(core): infer method return types by @arendjr in #6525
- fix(core): infer types of properties with getters by @arendjr in #6531
- chore: add test case by @arendjr in #6532
- feat(core): handle logical operators by @arendjr in #6550
- ci: fix JSON payload release dispatch by @ematipico in #6580
- chore: remove disclaimer on
noFloatingPromises
by @arendjr in #6579 - chore: update
next
by @arendjr in #6581 - feat(biome_js_analyse): added new rule noMagicNumbers by @vladimir-ivanov in #6562
- chore(justfile): adjust indentation and remove extra blank lines in
justfile
by @paulo9mv in #6568 - refactor(useSortedKeys): transfer trailing separator upon sorting by @Conaclos in #6587
- fix(lsp): fix all should check for embedded languages by @ematipico in #6594
- feat(core): implement conditional handling by @arendjr in #6593
- chore: update contribution guide to include vladimir ivanov as a maintainer by @vladimir-ivanov in #6564
- fix(biome_js_analyze): fix JsDocTypeCollectorVisitior to also walk on JsStaticMemberAssignment by @daivinhtran in #6600
- docs: add mdevils to maintainers by @mdevils in #6612
- chore(lint): fix document of the
noMagicNumbers
rule that produces invalid MDX by @siketyan in #6598 - refactor: extract out a
biome_line_index
crate by @DavisVaughan in #6222 - fix(biome-js-analyze): fixed the diagnostic message for noFocusedTests to display the offending fn name by @vladimir-ivanov in #6599
- chore: add
syntax
parser directive to Dockerfile by @JamBalaya56562 in #6619 - feat(core): port SyntaxNodePtr and AstPtr from rowan by @rmehri01 in #6534
- fix(biome-js-analyze): detect json import attribute with trimmed text value instead of plain text value by @Shinyaigeek in #6618
- feat(core): targeted file scanner by @arendjr in #6614
- fix(core): fix extending configs with root field by @arendjr in #6625
- chore(deps): pin docker/dockerfile docker tag to 9857836 by @renovate in #6626
- chore(deps): update dependency @types/node to v22.15.34 by @renovate in #6627
- fix(deps): update @biomejs packages by @renovate in #6632
- chore(deps): update rust crate papaya to 0.2.3 by @renovate in #6630
- chore(deps): update rust crate ureq to 3.0.12 by @renovate in #6631
- fix(cli): lax stdin strictness by @ematipico in #6596
- feat(core): infer sequence operator and update operators by @arendjr in #6637
- feat(yaml): overhauling YAML lexer by @vohoanglong0107 in #6481
- feat(wasm): expose MemoryFileSystem via WASM API by @siketyan in #6428
- fix(core): fix inference for boolean that must be truthy by @arendjr in #6641
- fix(biome-js-analyze): update changes by @vladimir-ivanov in #6636
- fix(lsp): add missing checks for capability dynamic registration support by @skewb1k in #6643
- fix(js-api): don't use types of others modules by @regseb in #6535
- refactor: share lint rule options by @ematipico in #5543
- perf: optimise ignore checking by @arendjr in #6659
- chore: merge
next
intomain
by @arendjr in #6583 - feat(core): offset parsing by @ematipico in #6652
- fix(formatter): void elements with slash by @ematipico in #6663
- fix(lint/noSecrets): calculate entropy with
entropyThreshold
option by @unvalley in #6642 - fix(biome-js-analyze): move no_secrets options inside biome-rules-opt… by @vladimir-ivanov in #6672
- fix(core): css assist by @ematipico in #6682
- fix(format/html): fix mangling of embedded language tags if
whitespaceSensitivity
isstrict
by @dyc3 in #6673 - feat(parser): parse Astro frontmatter by @ematipico in #6689
- chore(core): add resource to diagnostic by @ematipico in #6685
- fix(parse/html): make
.
a valid char in tag names by @dyc3 in #6693 - fix(formatter): trailing commas in json files by @ematipico in #6683
- feat: make enum can be transform in scope by @cqh963852 in #6678
- fix(biome-js-analyze): useReadonlyClassProperties check class getters… by @vladimir-ivanov in #6671
- feat(biome_js_analyse): added new option to rule to ignore unused function parameters by @vladimir-ivanov in #6405
- fix(core): ignore nested configs by @arendjr in #6662
- fix(lint/noImplicitCoercion): false positive for
1 / value
by @unvalley in #6696 - fix(css_formatter): correct spacing in container style queries by @denbezrukov in #6700
- fix(biome_analyze): stop squashing multiple line suppression comments. by @sterliakov in #6650
- fix(noShadow): fix a false positive related to function parameters inside type definitions by @dyc3 in #6709
- fix(biome_js_analyze): correct text range of suppression reason by @sterliakov in #6711
- fix(service): biome/file_features still should return a map instead of an array by @siketyan in #6718
- fix(lint/complexity/useDateNow): improve error message by @wojtekmaj in #6413
- docs: fix typos in CHANGELOG & CONTRIBUTING by @noritaka1166 in #6721
- docs: update analyzer contribution guide by @ematipico in #6651
- fix(lsp): do not response error on pulling actions from GritQL files by @siketyan in #6716
- feat(linter): add $ to organize imports :ALIAS: group by @minht11 in #6720
- fix(biome-service): override all formatter options with user configured overrides by @marko-hologram in #6679
- chore(deps): update dependency dprint to v0.50.1 by @renovate in #6734
- chore(deps): update dependency @types/node to v22.16.0 by @renovate in #6735
- chore(deps): update dependency eslint to v9.30.1 by @renovate in #6738
- chore(deps): update dependency @types/node to v22.16.0 by @renovate in #6737
- chore(deps): update github-actions by @renovate in #6741
- chore(deps): update dependency rust to v1.88.0 by @renovate in #6740
- chore(deps): update rust crate indexmap to 2.10.0 by @renovate in #6742
- chore(deps): update rust crate rust-lapper to 1.2.0 by @renovate in #6743
- chore: update contribution and changesets by @ematipico in #6748
- chore: remove style rule migration by @arendjr in #6746
- feat(biome_analyzer): support shebang together with
// biome-ignore-all
file-level suppressions by @sterliakov in #6712 - perf(biome_package): improve performance of biome_package by @vladimir-ivanov in #6732
- fix(core): .gitignore is discovered in more scenarios by @arendjr in #6752
- fix(lint/noUselessFragments): apply the same logic for shorthand fragments and Fragment elements by @siketyan in #6717
- chore: reduce
PackageJson
size by @arendjr in #6754 - fix(grit): match bare imports by @arendjr in #6758
- fix(cli): improve error messages when given incompatible arguments by @dyc3 in #6753
- fix(noUnusedImports): formally make an exception for type augmentation imports by @dyc3 in #6756
- perf(biome_package): updated incorrect generic passed to deserialize_… by @vladimir-ivanov in #6760
- chore: clean up changesets by @arendjr in #6768
- chore: set versions for new rules by @arendjr in #6769
- chore: don't break up paragraphs in changesets by @arendjr in #6770
- ci: release by @github-actions in #6582
New Contributors
- @paulo9mv made their first contribution in #6568
- @DavisVaughan made their first contribution in #6222
- @Shinyaigeek made their first contribution in #6618
- @skewb1k made their first contribution in #6643
- @cqh963852 made their first contribution in #6678
- @marko-hologram made their first contribution in #6679
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.0.6...@biomejs/js-api@2.0.0