Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve pnpm usage #2069

Merged
merged 13 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
* text=auto eol=lf
SuperchupuDev marked this conversation as resolved.
Show resolved Hide resolved
crates/biome_unicode_table/src/tables.rs linguist-generated=true text=auto eol=lf
**/generated/* linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/analyzers.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/assists.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/semantic_analyzers.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/analyzers/*.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/assists.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/assists/*.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/semantic_analyzers.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/semantic_analyzers/*.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/registry.rs linguist-generated=true text=auto eol=lf
crates/biome_service/src/configuration/linter/rules.rs linguist-generated=true text=auto eol=lf
crates/biome_service/src/configuration/parse/json/rules.rs linguist-generated=true text=auto eol=lf
crates/biome_unicode_table/src/tables.rs linguist-generated=true text=auto eol=lf
packages/@biomejs/backend-jsonrpc/src/workspace.ts linguist-generated=true text=auto eol=lf
packages/@biomejs/biome/configuration_schema.json linguist-generated=true text=auto eol=lf
pnpm-lock.yaml linguist-generated=true text=auto eol=lf
website/src/pages/lint/rules/**/*.md linguist-generated=true text=auto eol=lf
website/src/components/generated/.astro linguist-generated=true text=auto eol=lf
packages/@biomejs/biome/configuration_schema.json linguist-generated=true text=auto eol=lf
crates/biome_service/src/configuration/parse/json/rules.rs linguist-generated=true text=auto eol=lf
**/pnpm-lock.yaml linguist-generated=true text=auto eol=lf
crates/biome_js_formatter/tests/**/*.ts.prettier-snap linguist-language=TypeScript
crates/biome_js_formatter/tests/**/*.js.prettier-snap linguist-language=JavaScript
crates/biome_js_formatter/tests/**/*.ts.snap linguist-language=Markdown
crates/biome_js_formatter/tests/**/*.js.snap linguist-language=Markdown
crates/biome_cli/tests/**/*.snap linguist-language=Markdown
crates/biome_js_analyze/tests/specs/**/*.snap linguist-language=Markdown
crates/biome_css_formatter/tests/**/*.css.prettier-snap linguist-language=CSS
crates/biome_css_formatter/tests/**/*.css.snap linguist-language=Markdown
crates/biome_js_formatter/tests/**/*.ts.prettier-snap linguist-language=TypeScript
crates/biome_js_formatter/tests/**/*.js.prettier-snap linguist-language=JavaScript
crates/biome_js_formatter/tests/**/*.ts.snap linguist-language=Markdown
crates/biome_js_formatter/tests/**/*.js.snap linguist-language=Markdown
2 changes: 0 additions & 2 deletions .github/workflows/ja-translation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install libraries
working-directory: website
run: pnpm i
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ jobs:
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/pull_request_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Run Biome Format
run: |
pnpm i
Expand All @@ -63,8 +61,6 @@ jobs:
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install toolchain
uses: moonrepo/setup-rust@v1
- name: Install wasm-pack
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release_js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ jobs:
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v3
with:
version: 8

- name: Set release infos
if: needs.check.outputs.prerelease == 'true'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ jobs:
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install toolchain
uses: moonrepo/setup-rust@v1
- name: Install libraries
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,19 @@ The npm module `packages/@biomejs/biome` contains Biome's Node.js API that suppo

For testing and developing, you need to build these packages, following the steps:

1. install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) globally;
2. run the `build` command inside the package `backend-jsonrpc`;
3. run the `build` and `build:wasm-node-dev` commands inside the package `js-api` (folder `packages/@biomejs/js-api`);
4. run `pnpm i` inside the package `js-api` (folder `packages/@biomejs/js-api`), this will link the WebAssembly bindings and the
JSON-RPC bindings;
1. install pnpm via [corepack](https://nodejs.org/api/corepack.html) by running `corepack enable`;
2. install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) globally;
3. run `pnpm --filter "@biomejs/backend-jsonrpc" build`;
4. run the `pnpm --filter "@biomejs/js-api" build:wasm-dev` and `pnpm --filter "@biomejs/js-api" build` commands;
5. run `pnpm i --filter "@biomejs/js-api" --frozen-lockfile` to link the WebAssembly bindings and the JSON-RPC bindings

The tests are run against the compiled files, which means that you need to run the
`build` command after you implemented features/bug fixes.
`build` script after you implemented features/bug fixes.

## Website development

The [Biome website](https://biomejs.dev/) is built with [Astro](https://astro.build).
To start a development please check our [README](./website/README.md)
To contribute to its development please check our [README](./website/README.md)

### Translations

Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "./packages/@biomejs/biome/configuration_schema.json",
"extends": ["shared/biome"],
"extends": ["@biomejs/shared/biome"],
"files": {
"ignore": [
"dist/**",
Expand Down
3 changes: 0 additions & 3 deletions crates/biome_formatter_test/src/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
},
"dependencies": {
"prettier": "3.1.0"
},
"engines": {
"pnpm": "^8.0.0"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@biomejs/monorepo",
"private": true,
"version": "0.0.0",
"private": true,
"scripts": {
"check:apply": "cargo biome-cli-dev check --apply-unsafe website packages/@biomejs/js-api packages/tailwindcss-config-analyzer",
"check": "cargo biome-cli-dev check website packages/@biomejs/js-api packages/tailwindcss-config-analyzer",
Expand All @@ -10,7 +10,7 @@
"keywords": [],
"author": "",
"devDependencies": {
"shared": "file:./shared",
"@changesets/cli": "^2.26.2"
}
"@biomejs/shared": "workspace:^"
},
"packageManager": "[email protected]"
SuperchupuDev marked this conversation as resolved.
Show resolved Hide resolved
}
26 changes: 13 additions & 13 deletions packages/@biomejs/backend-jsonrpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"main": "dist/index.js",
"scripts": {
"test": "vitest",
"test:ci": "pnpm build && vitest --run",
"test:ci": "pnpm build && vitest run",
"tsc": "tsc --noEmit",
"build": "tsc"
},
"files": [
"dist/",
"README.md",
"LICENSE-APACHE",
"LICENSE-MIT",
"ROME-LICENSE-MIT"
],
"homepage": "https://biomejs.dev",
"files": [
"dist/",
"README.md",
"LICENSE-APACHE",
"LICENSE-MIT",
"ROME-LICENSE-MIT"
],
"homepage": "https://biomejs.dev",
"repository": {
"type": "git",
"url": "https://github.com/biomejs/biome.git",
Expand All @@ -36,9 +36,9 @@
},
"license": "MIT OR Apache-2.0",
"devDependencies": {
"@types/node": "^18.7.2",
"typescript": "^4.8.2",
"vite": "^3.0.8",
"vitest": "^0.22.0"
"@types/node": "^20.11.26",
"typescript": "^5.4.2",
"vite": "^5.1.6",
"vitest": "^1.3.1"
}
}
Loading
Loading