Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: latest
- run: yarn install --immutable --immutable-cache --check-cache
cache: 'npm'
- run: npm ci

- name: Package extension
uses: HaaLeo/publish-vscode-extension@v2
id: package_extension
with:
pat: not-a-real-pat
yarn: true
yarn: false
dryRun: true
preRelease: true
packagePath: apps/vscode
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,23 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: latest
- run: yarn install --immutable --immutable-cache --check-cache
cache: 'npm'
- run: npm ci

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v2
id: publish_extension
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
yarn: true
yarn: false
packagePath: apps/vscode

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
yarn: true
yarn: false
packagePath: apps/vscode

- name: Get version of VS Code extension to publish
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'

- name: Update build environment and install XVFB
run: |
Expand All @@ -29,10 +30,10 @@ jobs:

- name: Build vscode extension
run: |
yarn install
yarn run build-vscode
npm install
npm run build-vscode

- name: Compile and run tests
run: |
yarn install --immutable --immutable-cache --check-cache
xvfb-run yarn test-vscode
npm ci
xvfb-run npm run test-vscode
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Here is where you can find the source code for various parts of the Quarto syste

### VS Code Extension

To develop the Quarto VS Code extension, clone this repo, run `yarn`, then run the `yarn dev-vscode` command:
To develop the Quarto VS Code extension, clone this repo, run `npm install`, then run the `npm run dev-vscode` command:

```bash
yarn # install dependencies
yarn dev-vscode # run development/debug version of extension
npm install # install dependencies
npm run dev-vscode # run development/debug version of extension
```

Use the VS Code **Run and Debug** pane in the activity bar to run a version of VS Code with the development build of the extension.
Expand Down
2 changes: 1 addition & 1 deletion apps/lsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "agpl-3.0",
"scripts": {
"build": "tsx build.ts",
"dev": "yarn run build dev",
"dev": "npm run build dev",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"lint": "tsc --noEmit && TIMING=1 eslint \"src/**/*.ts*\"",
"start": "node dist/lsp.js"
Expand Down
1 change: 1 addition & 0 deletions apps/vscode/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=false
1 change: 0 additions & 1 deletion apps/vscode/.yarnrc

This file was deleted.

14 changes: 7 additions & 7 deletions apps/vscode/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Building the extension

To develop the Quarto VS Code extension, clone the quarto mono-repo, run `yarn` at top level, then run the `yarn dev-vscode` command:
To develop the Quarto VS Code extension, clone the quarto mono-repo, run `npm install` at top level, then run the `npm run dev-vscode` command:

```sh
yarn # install dependencies
yarn dev-vscode # run development/debug version of extension
npm install # install dependencies
npm run dev-vscode # run development/debug version of extension
```

Run the extension tests with:

```sh
yarn test-vscode # compile the test files and run them with the vscode-test CLI
npm run test-vscode # compile the test files and run them with the vscode-test CLI
```

Install the dev version of the extension in VS Code or Positron with:

```sh
yarn install-vscode
yarn install-positron
npm run install-vscode
npm run install-positron
```

# Debugging the extension
Expand All @@ -30,7 +30,7 @@ The extension must have been built in dev mode (see the build section). The `dev

Here is the process:

- Let `yarn dev-vscode` run in the background somewhere.
- Let `npm run dev-vscode` run in the background somewhere.

- Open the `apps/vscode` folder in VS Code or Positron and go to the `Run and debug` pane.

Expand Down
6 changes: 3 additions & 3 deletions apps/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1469,11 +1469,11 @@
"install-vscode": "rm -rf *.vsix && vsce package && code --install-extension *.vsix",
"install-positron": "rm -rf *.vsix && vsce package && positron --install-extension *.vsix",
"build": "tsx build.ts",
"dev": "yarn run build dev",
"dev": "npm run build dev",
"lint": "eslint src --ext ts",
"build-lang": "node syntaxes/build-lang",
"build-test": "yarn run build test",
"test": "yarn build-test && vscode-test"
"build-test": "npm run build test",
"test": "npm run build-test && vscode-test"
},
"dependencies": {
"axios": "^1.2.1",
Expand Down
14 changes: 7 additions & 7 deletions claude.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Each component has specific development guidelines. Refer to the corresponding C

## Repository Structure

The repository is organized as a monorepo using Yarn workspaces and Turborepo for build orchestration:
The repository is organized as a monorepo using npm workspaces and Turborepo for build orchestration:

- `apps/`: Contains standalone applications
- `vscode/`: VS Code extension for Quarto
Expand All @@ -38,19 +38,19 @@ Quarto uses [turborepo](https://turbo.build/) to manage the monorepo build proce

- `turbo.json`: Defines the pipeline configuration for common tasks
- Common commands:
- `yarn build`: Builds all packages and applications
- `yarn dev-writer`: Runs the writer app in development mode
- `yarn dev-vscode`: Runs the VS Code extension in development mode
- `yarn lint`: Runs linters across all workspaces
- `yarn build-vscode`: Builds only the VS Code extension and its dependencies
- `npm run build`: Builds all packages and applications
- `npm run dev-writer`: Runs the writer app in development mode
- `npm run dev-vscode`: Runs the VS Code extension in development mode
- `npm run lint`: Runs linters across all workspaces
- `npm run build-vscode`: Builds only the VS Code extension and its dependencies

The turborepo pipeline helps optimize build times by caching build artifacts and respecting the dependency graph between packages.

## Testing

Testing procedures vary by component:

- VS Code extension: Run `yarn test-vscode [--label 'label' --grep 'pattern']` to compile test files and run them with the vscode-test CLI
- VS Code extension: Run `npm run test-vscode [--label 'label' --grep 'pattern']` to compile test files and run them with the vscode-test CLI
- Read the [test configuration file](./apps/vscode/.vscode-test.mjs) for valid labels
- Other components have specific test commands defined in their respective package.json files

Expand Down
Loading
Loading