Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- Check changes -->
- [ ] This PR includes a new checks or changes the configuration of a check
- [ ] I included a minor bump `changeset`
- [ ] I ran `yarn build` and committed the updated configuration files
- [ ] I ran `pnpm build` and committed the updated configuration files
<!-- It might be that a check doesn't make sense in a theme-app-extension context -->
<!-- When that happens, the check's config should be updated/overridden in the theme-app-extension config -->
<!-- see packages/node/configs/theme-app-extension.yml -->
Expand Down
62 changes: 41 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,29 @@ jobs:
with:
submodules: true

- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
cache-dependency-path: "yarn.lock"
node-version: 20
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

- name: Install the packages
run: yarn install --frozen-lockfile --ignore-engines
run: pnpm install --frozen-lockfile

- name: Build the code
run: yarn build:ci
run: pnpm build:ci

- name: Type check (for tests)
run: yarn type-check
run: pnpm type-check

- name: Check formatting
run: yarn format:check
run: pnpm format:check

e2e:
runs-on: ubuntu-latest
Expand All @@ -40,21 +45,31 @@ jobs:
with:
submodules: true

- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "yarn.lock"
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

- name: Install the packages
run: yarn install --frozen-lockfile --ignore-engines
run: pnpm install --frozen-lockfile

- name: Install Playwright browsers
working-directory: packages/vscode-extension
run: |
node -e "const path = require('node:path'); const testWeb = path.dirname(require.resolve('@vscode/test-web/package.json')); const browser = path.dirname(require.resolve('@playwright/browser-chromium/package.json', { paths: [testWeb] })); require(path.join(browser, 'install.js'));"

- name: Build the code
run: yarn build
run: pnpm build

- name: Run the E2E tests
run: yarn test:e2e
run: pnpm test:e2e

tests:
runs-on: ${{ matrix.os }}
Expand All @@ -71,30 +86,35 @@ jobs:
with:
submodules: true

- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
cache-dependency-path: "yarn.lock"
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

- name: Install the packages
run: yarn install --frozen-lockfile --ignore-engines
run: pnpm install --frozen-lockfile

- name: Build the code
run: yarn build:ts
run: pnpm build:ts

- name: Run the unit tests
run: yarn test
run: pnpm test

- name: Run the prettier2 unit tests
run: yarn --cwd packages/prettier-plugin-liquid test
run: pnpm --dir packages/prettier-plugin-liquid test

- name: Run the prettier2 idempotence tests
run: yarn --cwd packages/prettier-plugin-liquid test:idempotence
run: pnpm --dir packages/prettier-plugin-liquid test:idempotence

- name: Run the prettier3 unit tests
run: yarn --cwd packages/prettier-plugin-liquid test:3
run: pnpm --dir packages/prettier-plugin-liquid test:3

- name: Run the prettier3 idempotence tests
run: yarn --cwd packages/prettier-plugin-liquid test:idempotence:3
run: pnpm --dir packages/prettier-plugin-liquid test:idempotence:3
23 changes: 14 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ jobs:
submodules: true
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24 # Needed for npm@11 for Trusted Publishing
registry-url: "https://registry.npmjs.org"
cache: "yarn"
cache-dependency-path: "yarn.lock"
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

- name: Install the packages
run: yarn install --frozen-lockfile --ignore-engines
run: pnpm install --frozen-lockfile

- name: Build the code
run: yarn build
run: pnpm build
env:
NODE_ENV: production

Expand All @@ -49,7 +54,7 @@ jobs:

- name: Query VS Code Marketplace version
id: marketplace-version
run: echo "version=$(yarn --silent vsce show --json Shopify.theme-check-vscode | jq -r .versions[0].version)" >> $GITHUB_OUTPUT
run: echo "version=$(pnpm --dir packages/vscode-extension exec vsce show --json Shopify.theme-check-vscode | jq -r .versions[0].version)" >> $GITHUB_OUTPUT

- name: Query VS Code Package version (Before running changeset version)
id: package-version
Expand All @@ -69,17 +74,17 @@ jobs:
title: "Theme Tools Release — ${{ steps.date.outputs.date }}"
commit: "Theme Tools Release — ${{ steps.date.outputs.date }}"
# When there are no changesets, this gets called
publish: yarn changeset publish
publish: pnpm changeset publish
# When there are changesets, this gets called and then a PR is opened/updated
version: yarn release
version: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true

- name: VS Code Marketplace publish
if: steps.changesets.outputs.hasChangesets == 'false' && steps.marketplace-version.outputs.version != steps.package-version.outputs.version
run: yarn publish:vsce
run: pnpm publish:vsce

- name: Open VSX Registry publish
if: steps.changesets.outputs.hasChangesets == 'false' && steps.marketplace-version.outputs.version != steps.package-version.outputs.version
run: yarn publish:ovsx
run: pnpm publish:ovsx
17 changes: 11 additions & 6 deletions .github/workflows/vscode-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,28 @@ jobs:
with:
submodules: true

- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "yarn.lock"
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

- name: Install the packages
run: yarn install --frozen-lockfile --ignore-engines
run: pnpm install --frozen-lockfile

- name: Build the code
run: yarn build
run: pnpm build
env:
NODE_ENV: production

- name: VS Code Marketplace publish
run: yarn publish:vsce
run: pnpm publish:vsce

- name: Open VSX Registry publish
run: yarn publish:ovsx
run: pnpm publish:ovsx
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ standalone.js.map
TODO
tsconfig.builinfo
tsconfig.tsbuildinfo
yarn-error.log
pnpm-debug.log*
package-lock.json
.npmrc
packages/theme-check-docs-updater/data
Expand Down
Empty file removed .spin/Procfile
Empty file.
5 changes: 0 additions & 5 deletions .spin/bin/init

This file was deleted.

4 changes: 0 additions & 4 deletions .spin/constellation.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .spin/constellations/online-store.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .spin/update

This file was deleted.

12 changes: 6 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"tasks": [
{
"type": "shell",
"command": "yarn --cwd packages/vscode-extension build:extension:dev",
"command": "pnpm --dir packages/vscode-extension run build:extension:dev",
"group": "build",
"label": "vscode dev",
"dependsOrder": "parallel",
Expand All @@ -17,29 +17,29 @@
{
"label": "parser pre build",
"type": "shell",
"command": "yarn --cwd packages/liquid-html-parser prebuild:ts"
"command": "pnpm --dir packages/liquid-html-parser run prebuild:ts"
},
{
"label": "language-config",
"type": "shell",
"command": "yarn --cwd packages/vscode-extension build:language-config"
"command": "pnpm --dir packages/vscode-extension run build:language-config"
},
{
"label": "theme check build",
"type": "shell",
"command": "yarn --cwd packages/theme-check-node build:ts"
"command": "pnpm --dir packages/theme-check-node run build:ts"
},
{
"label": "playground",
"type": "shell",
"command": "yarn playground",
"command": "pnpm playground",
"isBackground": true,
"problemMatcher": "$ts-webpack-watch"
},
{
"label": "vscode-test-web",
"type": "shell",
"command": "yarn dev:web",
"command": "pnpm dev:web",
"isBackground": true
}
],
Expand Down
2 changes: 1 addition & 1 deletion dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dev.edition: 2024
up:
- node:
version: v22.14.0
yarn: v1.22.22
package_manager: [email protected]
14 changes: 7 additions & 7 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ Before you can start contributing to theme-tools, you'll need to set up your dev

```bash
cd theme-tools
yarn
pnpm install
```

3. **Build monorepo packages**: Ensure that all packages can be buildable:

```bash
yarn build
pnpm build
```

4. **Run tests**: Ensure that all tests pass by running:

```bash
yarn test
pnpm test
```

5. **Start developing**: If you're developing changes to test against the vscode extension, all you need to do is add a breakpoint anywhere in a package used within the VS Code extension, hit `f5` in VS Code and your development instance of theme-check will automatically open.

### Developing for online-store-web (Shopifolk only)

To set up the package links to online-store-web, within this repo root run: `yarn admin:init`
To set up the package links to online-store-web, within this repo root run: `pnpm admin:init`

This process has a small gotcha: online-store-web needs to use the built assets from theme-tools. This means that hot-reload is off the table.

Once you've made some changes to your local theme-tools packages, to see those changes represented in online-store-web; within this repo root run: `yarn admin:build`
Once you've made some changes to your local theme-tools packages, to see those changes represented in online-store-web; within this repo root run: `pnpm admin:build`

### Developing for codemirror-language-client

Run the following command to start a browser instance that runs `@shopify/theme-language-server-browser`.

```bash
yarn playground
pnpm playground
```

### Developing for VS Code for Web
Expand All @@ -63,7 +63,7 @@ yarn playground
Run the following command to start a `@vscode/test-web` instance in Chrome with the Shopify Liquid extension loaded.

```bash
yarn dev:web
pnpm dev:web
```

#### In the desktop app
Expand Down
2 changes: 1 addition & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. Add a changeset. This will prompt you for additional information.

```bash
yarn changeset add
pnpm changeset add
```

2. Commit the changeset as part of your PR.
Expand Down
Loading
Loading