@jsrepo/transform-biome 0.0.1-beta.0 → 0.0.1-beta.10

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.d.ts CHANGED
@@ -19,4 +19,5 @@ import { Transform } from "jsrepo";
19
19
  */
20
20
  declare function export_default(): Transform;
21
21
  //#endregion
22
- export { export_default as default };
22
+ export { export_default as default };
23
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,39 +1,2 @@
1
- import { Biome, Distribution } from "@biomejs/js-api";
2
-
3
- //#region src/index.ts
4
- /**
5
- * A transform plugin for jsrepo to format code with prettier.
6
- * @example
7
- * ```ts
8
- * import { defineConfig } from "jsrepo";
9
- * import biome from "@jsrepo/transform-biome";
10
- *
11
- * export default defineConfig({
12
- * // ...
13
- * transforms: [biome()],
14
- * });
15
- * ```
16
- *
17
- * @param options - The options for the transform plugin.
18
- */
19
- function src_default() {
20
- return { transform: async (code, opts) => {
21
- return { code: await tryFormat(code, {
22
- fileName: opts.fileName,
23
- cwd: opts.cwd
24
- }) };
25
- } };
26
- }
27
- async function tryFormat(code, { fileName, cwd }) {
28
- try {
29
- const biome = await Biome.create({ distribution: Distribution.NODE });
30
- const { projectKey } = biome.openProject(cwd);
31
- return biome.formatContent(projectKey, code, { filePath: fileName }).content;
32
- } catch (err) {
33
- console.error(err);
34
- return;
35
- }
36
- }
37
-
38
- //#endregion
39
- export { src_default as default };
1
+ import{Biome as e,Distribution as t}from"@biomejs/js-api";function n(){return{transform:async({code:e,fileName:t,options:n})=>({code:await r(e,{fileName:t,cwd:n.cwd})})}}async function r(n,{fileName:r,cwd:i}){try{let a=await e.create({distribution:t.NODE}),{projectKey:o}=a.openProject(i);return a.formatContent(o,n,{filePath:r}).content}catch(e){console.error(e);return}}export{n as default};
2
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@jsrepo/transform-biome",
3
3
  "description": "A transform plugin for jsrepo to format code with biome.",
4
- "version": "0.0.1-beta.0",
4
+ "version": "0.0.1-beta.10",
5
5
  "license": "MIT",
6
- "homepage": "https://jsrepo.dev",
6
+ "homepage": "https://v3.jsrepo.dev",
7
7
  "author": {
8
8
  "name": "Aidan Bleser",
9
9
  "url": "https://github.com/ieedan"
@@ -30,22 +30,25 @@
30
30
  },
31
31
  "main": "./dist/index.js",
32
32
  "files": [
33
- "dist/**/*"
33
+ "dist/**/*",
34
+ "!dist/**/*.map"
34
35
  ],
35
36
  "peerDependencies": {
36
- "jsrepo": "3.0.0-beta.0"
37
+ "jsrepo": "3.0.0-beta.10"
37
38
  },
38
39
  "dependencies": {
39
- "@biomejs/wasm-nodejs": "^2.2.4",
40
- "@biomejs/js-api": "^3.0.0"
40
+ "@biomejs/js-api": "^4.0.0",
41
+ "@biomejs/wasm-nodejs": "^2.3.4"
41
42
  },
42
43
  "devDependencies": {
43
- "tsdown": "^0.15.9",
44
- "@types/node": "^24.9.1"
44
+ "@types/node": "^24.10.0",
45
+ "tsdown": "^0.15.12",
46
+ "typescript": "^5.9.3"
45
47
  },
46
48
  "scripts": {
47
49
  "build": "tsdown",
48
50
  "dev": "tsdown --watch",
49
- "check": "tsc --noEmit"
51
+ "check": "tsc --noEmit",
52
+ "bundle-analyze": "FORCE_COLOR=1 node ../../bundle-analyzer/dist/index.js analyze ."
50
53
  }
51
54
  }