Skip to content

Commit 6cbe085

Browse files
authored
build: switch to monorepo (#20)
1 parent 9f1ddf4 commit 6cbe085

27 files changed

+5801
-9637
lines changed

.changeset/eight-jokes-tickle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"google-workspace-vscode-extension": patch
3+
---
4+
5+
Change to monorepo structure.

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ jobs:
2828
id-token: write
2929
steps:
3030
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
- uses: pnpm/action-setup@v3
3132
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
32-
- run: npm ci
33-
- run: npm run build
34-
- run: npm run lint
35-
- run: npm run check
36-
- run: xvfb-run -a npm test
37-
- run: npm run ci:package
33+
with:
34+
node-version: "lts/*"
35+
cache: "pnpm"
36+
- run: pnpm i
37+
- run: pnpm build
38+
- run: pnpm lint
39+
- run: pnpm check
40+
- run: pnpm test
41+
- run: pnpm ci:package
3842
- run: |
3943
git config --global user.name "googleworkspace-bot"
4044
git config --global user.email "[email protected]"
@@ -49,5 +53,5 @@ jobs:
4953
commit: "chore: release"
5054
commitMode: github-api
5155
setupGitUser: false
52-
publish: "npm run ci:release"
53-
version: "npm run ci:version"
56+
publish: "pnpm ci:release"
57+
version: "pnpm ci:version"

.github/workflows/test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- uses: pnpm/action-setup@v3
2526
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
26-
- run: npm ci
27-
- run: npm run build
28-
- run: npm run lint
29-
- run: npm run check
30-
- run: xvfb-run -a npm test
31-
- run: npm run ci:package
27+
with:
28+
node-version: "lts/*"
29+
cache: "pnpm"
30+
- run: pnpm i
31+
- run: pnpm build
32+
- run: pnpm lint
33+
- run: pnpm check
34+
- run: pnpm test
35+
- run: pnpm ci:package
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,27 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- uses: pnpm/action-setup@v3
2526
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
26-
- run: npm ci
27-
- run: npm run fetch-apis
27+
with:
28+
node-version: "lts/*"
29+
cache: "pnpm"
30+
- run: pnpm i
31+
- run: pnpm ci:update
32+
- run: pnpm lint
33+
- run: pnpm check
34+
- run: pnpm test
2835
- name: Check for changes
2936
id: changes
3037
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
3138
with:
32-
files: src/apis.ts
39+
files: packages/vscode-extension/src/apis.ts
3340
- name: Create Changeset
3441
if: steps.changes.outputs.any_changed == 'true'
3542
run: |
3643
cat <<EOF > .changeset/update-apis.md
3744
---
38-
"google-workspace-developer-tools": patch
45+
"@google-workspace/vscode-extension": patch
3946
---
4047
4148
Update APIs and scopes via the Discovery service

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ dist
33
node_modules
44
.vscode-test/
55
*.vsix
6+
.env
7+
.turbo

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
npx lint-staged
3+
pnpx lint-staged

.husky/pre-push

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22

3-
npm run lint
4-
npm run check
3+
pnpm run lint
4+
pnpm run check

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ use GitHub pull requests for this purpose. Consult
2222
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
2323
information on using pull requests.
2424

25+
## Changesets
26+
27+
This project uses [Changesets](https://github.com/changesets/changesets) to manage releases.
28+
If you are making a change that should be included in the release notes, you must add a changeset.
29+
30+
To add a changeset, run the following command:
31+
32+
```sh
33+
pnpm changeset
34+
```
35+
36+
You will be prompted to select the packages that have been changed, the type of change (major, minor, or patch), and to provide a description of the change.
37+
2538
## Community Guidelines
2639

2740
This project follows [Google's Open Source Community

README.md

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,7 @@
1-
# Google Workspace Developer Tools
1+
# Google Workspace Developer Tools Monorepo
22

3-
This VS Code extension provides a set of tools to help Google Workspace developers.
3+
This repository is a monorepo for tools that help Google Workspace developers.
44

5-
## Features
5+
## Packages
66

7-
- **OAuth2 Scope Linting**: Get warnings and additional information for Google Workspace [OAuth2 scopes](https://developers.google.com/identity/protocols/oauth2/scopes) in your code.
8-
9-
![OAuth2 Scope Linting](./assets/scope-diagnostics.png)
10-
11-
## Usage
12-
13-
### OAuth2 Scope Linting
14-
15-
Warnings and suggestions will automatically appear for OAuth2 scopes in your code.
16-
17-
## Installation
18-
19-
You can install the Google Workspace Developer Tools extension in a few ways.
20-
21-
### From within VS Code (Recommended)
22-
23-
1. Launch Visual Studio Code.
24-
2. Go to the **Extensions** view (`Ctrl+Shift+X` or `Cmd+Shift+X`).
25-
3. Search for `Google Workspace Developer Tools`.
26-
4. Click **Install**.
27-
28-
### From a Marketplace
29-
30-
Install the extension from your preferred marketplace:
31-
32-
- [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=google-workspace.google-workspace-developer-tools)
33-
- [Open VSX Registry](https://open-vsx.org/extension/google-workspace/google-workspace-developer-tools)
34-
35-
### Using the Command Line
36-
37-
If you have the `code` command-line tool installed, you can install the extension with this command:
38-
39-
```sh
40-
code --install-extension google-workspace.google-workspace-developer-tools
41-
```
7+
- [`@google-workspace/vscode-extension`](./packages/vscode-extension): A VS Code extension with tools to help Google Workspace developers.

0 commit comments

Comments
 (0)