@rrlab/biome-plugin 1.1.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ const FROM = import.meta.url;
11
11
  const COMMON_FLAGS = ["--colors=force", "--no-errors-on-unmatched"];
12
12
  const BIOME_JSON = "biome.json";
13
13
  const BIOME_CONFIG_PKG = "@rrlab/biome-config";
14
- const BIOME_SCHEMA = "https://biomejs.dev/schemas/2.4.4/schema.json";
14
+ const BIOME_SCHEMA = "./node_modules/@biomejs/biome/configuration_schema.json";
15
15
  const biomeColor = colorize("#61A5FA");
16
16
  var BiomeService = class extends ToolService {
17
17
  constructor(shellService) {
@@ -66,10 +66,7 @@ async function install(ctx) {
66
66
  files: [scaffoldDecision === "create" || scaffoldDecision === "overwrite" ? {
67
67
  kind: "create",
68
68
  path: BIOME_JSON,
69
- content: `${JSON.stringify({
70
- $schema: BIOME_SCHEMA,
71
- extends: [BIOME_CONFIG_PKG]
72
- }, null, 2)}\n`,
69
+ content: `{\n "$schema": "${BIOME_SCHEMA}",\n "extends": ["${BIOME_CONFIG_PKG}"]\n}\n`,
73
70
  overwrite: scaffoldDecision === "overwrite" || ctx.flags.force
74
71
  } : {
75
72
  kind: "edit-json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rrlab/biome-plugin",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "Biome plugin for @rrlab/cli — provides lint, format, and jsc capabilities.",
5
5
  "homepage": "https://github.com/withvariablelab/dx/tree/main/run-run/biome-plugin#readme",
6
6
  "bugs": {
@@ -30,22 +30,22 @@
30
30
  "access": "public"
31
31
  },
32
32
  "engines": {
33
- "node": ">=20.0.0"
33
+ "node": ">=22.18.0"
34
34
  },
35
35
  "dependencies": {
36
36
  "comment-json": "4.2.5",
37
- "@variablelab/clibuddy": "0.7.4"
37
+ "@variablelab/clibuddy": "0.8.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@biomejs/biome": ">=2.0.0",
41
- "@rrlab/cli": "^1.3.4"
41
+ "@rrlab/cli": "^1.4.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@biomejs/biome": "2.4.15",
45
45
  "@types/semver": "^7.7.1",
46
46
  "semver": "^7.8.1",
47
- "@rrlab/cli": "1.3.4",
48
- "@rrlab/tsdown-config": "^0.1.2"
47
+ "@rrlab/cli": "1.4.0",
48
+ "@rrlab/tsdown-config": "^0.2.0"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsdown",
package/src/index.ts CHANGED
@@ -25,7 +25,8 @@ const FROM = import.meta.url;
25
25
  const COMMON_FLAGS = ["--colors=force", "--no-errors-on-unmatched"];
26
26
  const BIOME_JSON = "biome.json";
27
27
  const BIOME_CONFIG_PKG = "@rrlab/biome-config";
28
- const BIOME_SCHEMA = "https://biomejs.dev/schemas/2.4.4/schema.json";
28
+ // The installed Biome's own schema: a versioned URL drifts from `^2.0.0` and Biome flags the mismatch.
29
+ const BIOME_SCHEMA = "./node_modules/@biomejs/biome/configuration_schema.json";
29
30
 
30
31
  export { TOOL_VERSIONS } from "./tool-versions.ts";
31
32
 
@@ -81,7 +82,8 @@ export async function install(ctx: InstallContext): Promise<InstallResult> {
81
82
  ? {
82
83
  kind: "create",
83
84
  path: BIOME_JSON,
84
- content: `${JSON.stringify({ $schema: BIOME_SCHEMA, extends: [BIOME_CONFIG_PKG] }, null, 2)}\n`,
85
+ // In Biome's own format, which keeps a short array on one line, so `rr jsc` passes on it.
86
+ content: `{\n "$schema": "${BIOME_SCHEMA}",\n "extends": ["${BIOME_CONFIG_PKG}"]\n}\n`,
85
87
  overwrite: scaffoldDecision === "overwrite" || ctx.flags.force,
86
88
  }
87
89
  : {