Skip to content

Commit

Permalink
chore: add yarn pnp workspace launch configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud committed Oct 10, 2024
1 parent a84eaa4 commit e52b631
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "npm: dev",
"sourceMapRenames": true
},
{
"name": "🧩 Debug Extension (yarn pnp)",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentKind=node",
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/test/fixtures/yarn-pnp"
],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "npm: dev",
"sourceMapRenames": true
}
]
}
13 changes: 13 additions & 0 deletions test/fixtures/yarn-pnp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Swap the comments on the following lines if you wish to use zero-installs
# In that case, don't forget to run `yarn config set enableGlobalCache false`!
# Documentation here: https://yarnpkg.com/features/caching#zero-installs

#!.yarn/cache
.pnp.*
17 changes: 17 additions & 0 deletions test/fixtures/yarn-pnp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Yarn PnP

This folder contains an example single-root workspace used as a test fixture for
the Biome extension. The workspace folder is setup as a yarn pnp project.

## Expectations

When the workspace folder is opened in VS Code, the Biome extension should be active
and used the `biome.json` configuration file at the root of the workspace folder.

## Test protocol

1. Open the workspace in VS Code.
2. Run command `yarn`
3. Open the `index.js` file.
4. Run the `Format Document with...` command, and select the Biome extension.
5. Verify that the document gets formatted with `indentWidth` set to `2`. and `indentStyle` set to `space`.
1 change: 1 addition & 0 deletions test/fixtures/yarn-pnp/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions test/fixtures/yarn-pnp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const a = 1;
8 changes: 8 additions & 0 deletions test/fixtures/yarn-pnp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "foo",
"version": "0.0.0",
"packageManager": "yarn@4.5.0",
"devDependencies": {
"@biomejs/biome": "1.8.3"
}
}
Empty file.

0 comments on commit e52b631

Please sign in to comment.