@biomejs/biome 0.1.0-nightly.54e85a2

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 ADDED
@@ -0,0 +1 @@
1
+ {"name":"@biomejs/biome","version":"0.1.0-nightly.54e85a2","bin":"bin/biome","scripts":{"postinstall":"node scripts/postinstall.js"},"homepage":"https://biomejs.dev","repository":{"type":"git","url":"https://github.com/biomejs/biome.git","directory":"packages/@biomejs/biome"},"author":"Emanuele Stoppa","license":"MIT","bugs":"https://github.com/biomejs/biome/issues","description":"Rome is a toolchain for the web: formatter, linter and more","files":["bin/rome","scripts/postinstall.js","configuration_schema.json","README.md"],"keywords":["JavaScript","TypeScript","format","lint","toolchain","JSON"],"engines":{"node":">=14.*"},"optionalDependencies":{"@biomsjs/cli-win32-x64":"0.1.0-nightly.54e85a2","@biomsjs/cli-win32-arm64":"0.1.0-nightly.54e85a2","@biomsjs/cli-darwin-x64":"0.1.0-nightly.54e85a2","@biomsjs/cli-darwin-arm64":"0.1.0-nightly.54e85a2","@biomsjs/cli-linux-x64":"0.1.0-nightly.54e85a2","@biomsjs/cli-linux-arm64":"0.1.0-nightly.54e85a2"}}
@@ -0,0 +1,34 @@
1
+ const { platform, arch } = process;
2
+
3
+ const PLATFORMS = {
4
+ win32: {
5
+ x64: "@biomejs/cli-win32-x64/rome.exe",
6
+ arm64: "@biomejs/cli-win32-arm64/rome.exe",
7
+ },
8
+ darwin: {
9
+ x64: "@biomejs/cli-darwin-x64/rome",
10
+ arm64: "@biomejs/cli-darwin-arm64/rome",
11
+ },
12
+ linux: {
13
+ x64: "@biomejs/cli-linux-x64/rome",
14
+ arm64: "@biomejs/cli-linux-arm64/rome",
15
+ },
16
+ };
17
+
18
+ const binName = PLATFORMS?.[platform]?.[arch];
19
+ if (binName) {
20
+ let binPath;
21
+ try {
22
+ binPath = require.resolve(binName);
23
+ } catch {
24
+ console.warn(
25
+ `The Biome CLI postinstall script failed to resolve the binary file "${binName}". Running Rome from the npm package will probably not work correctly.`,
26
+ );
27
+ }
28
+ } else {
29
+ console.warn(
30
+ "The Biome CLI package doesn't ship with prebuilt binaries for your platform yet. " +
31
+ "You can still use the CLI by cloning the biomejs/biome repo from GitHub, " +
32
+ "and follow the instructions there to build the CLI for your platform.",
33
+ );
34
+ }