@kosmojs/biome-formatter 0.0.11 → 0.0.20
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/package.json +2 -5
- package/pkg/index.js.map +1 -1
- package/pkg/src/index.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@kosmojs/biome-formatter",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.20",
|
|
5
5
|
"author": "Slee Woo",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publishConfig": {
|
|
@@ -19,10 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@biomejs/js-api": "^4.0.0",
|
|
21
21
|
"@biomejs/wasm-nodejs": "^2.3.9",
|
|
22
|
-
"@kosmojs/
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@kosmojs/config": "^0.0.11"
|
|
22
|
+
"@kosmojs/dev": "^0.0.20"
|
|
26
23
|
},
|
|
27
24
|
"scripts": {
|
|
28
25
|
"build": "esbuilder src/index.ts"
|
package/pkg/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { Biome, type Configuration, Distribution } from \"@biomejs/js-api\";\n\nimport type { FormatterConstructor } from \"@kosmojs/
|
|
4
|
+
"sourcesContent": ["import { Biome, type Configuration, Distribution } from \"@biomejs/js-api\";\n\nimport type { FormatterConstructor } from \"@kosmojs/dev\";\n\nconst biome = await Biome.create({ distribution: Distribution.NODE });\n\nconst { projectKey } = biome.openProject(process.cwd());\n\nconst supportedFiles = [\n //\n /\\.tsx?$/,\n /\\.jsx?$/,\n /\\.json$/,\n];\n\nexport default (config: Configuration): FormatterConstructor<Configuration> => {\n biome.applyConfiguration(projectKey, config);\n return {\n moduleImport: import.meta.filename,\n moduleConfig: config,\n formatter: (text, filePath) => {\n return supportedFiles.some((e) => e.test(filePath))\n ? biome.formatContent(projectKey, text, { filePath }).content\n : text;\n },\n };\n};\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,OAA2B,oBAAoB;AAIxD,IAAM,QAAQ,MAAM,MAAM,OAAO,EAAE,cAAc,aAAa,KAAK,CAAC;AAEpE,IAAM,EAAE,WAAW,IAAI,MAAM,YAAY,QAAQ,IAAI,CAAC;AAEtD,IAAM,iBAAiB;AAAA;AAAA,EAErB;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAO,gBAAQ,CAAC,WAA+D;AAC7E,QAAM,mBAAmB,YAAY,MAAM;AAC3C,SAAO;AAAA,IACL,cAAc,YAAY;AAAA,IAC1B,cAAc;AAAA,IACd,WAAW,CAAC,MAAM,aAAa;AAC7B,aAAO,eAAe,KAAK,CAAC,MAAM,EAAE,KAAK,QAAQ,CAAC,IAC9C,MAAM,cAAc,YAAY,MAAM,EAAE,SAAS,CAAC,EAAE,UACpD;AAAA,IACN;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/pkg/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Configuration } from "@biomejs/js-api";
|
|
2
|
-
import type { FormatterConstructor } from "@kosmojs/
|
|
2
|
+
import type { FormatterConstructor } from "@kosmojs/dev";
|
|
3
3
|
declare const _default: (config: Configuration) => FormatterConstructor<Configuration>;
|
|
4
4
|
export default _default;
|