Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
add pnpm files

prettier

wyvox action

fix pnpm build

add more granular deps
  • Loading branch information
machty committed Mar 24, 2024
1 parent dee489b commit a8c52ba
Show file tree
Hide file tree
Showing 22 changed files with 17,651 additions and 13,524 deletions.
80 changes: 19 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,110 +23,68 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- uses: wyvox/action@v1.1.5
with:
node-version: 16
- name: Locate Yarn Cache
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install --frozen-lockfile
pnpm-args: --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint
- name: Build
run: yarn build
run: pnpm build
- name: Run Tests
uses: coactions/setup-xvfb@v1
with:
run: yarn test
run: pnpm test

# The Windows runner can be super flaky both with Yarn installs and
# when launching browser tests, so we allow for retries in those steps.
test-windows:
name: Test Windows
runs-on: windows-2022
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
uses: nick-fields/retry@v2
- uses: wyvox/action@v1.1.5
with:
max_attempts: 2
timeout_minutes: 10
command: yarn install --frozen-lockfile
pnpm-args: --frozen-lockfile
- name: Build
run: yarn build
run: pnpm build
- name: Test @glint/core
uses: nick-fields/retry@v2
with:
max_attempts: 2
timeout_minutes: 20
command: yarn workspace @glint/core test
command: pnpm --filter '*' @glint/core test
- name: Test glint-vscode
uses: nick-fields/retry@v2
with:
max_attempts: 2
timeout_minutes: 10
command: yarn workspace glint-vscode test
command: pnpm --filter '*' glint-vscode test
- name: Test @glint/scripts
run: yarn workspace @glint/scripts test
run: pnpm --filter '*' @glint/scripts test

test-floating-deps:
name: Test Floating Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- uses: wyvox/action@v1.1.5
with:
node-version: 16
- name: Install Dependencies
run: yarn install --no-lockfile
pnpm-args: --frozen-lockfile
- name: Build
run: yarn build
run: pnpm build
- name: Run Tests
uses: coactions/setup-xvfb@v1
with:
run: yarn test
run: pnpm test

test-ts-nightly:
name: Test TypeScript Nightly
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Locate Yarn Cache
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: wyvox/action@v1.1.5
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn add --dev -W typescript@next
pnpm-args: --frozen-lockfile
- name: Build
run: yarn build
run: pnpm build
- name: Run Tests
uses: coactions/setup-xvfb@v1
with:
run: yarn test
run: pnpm test
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ dist/
# the formatting applied by Gitbook. Having both present is a recipe for ongoing
# CI problems.
*.md

pnpm-lock.yaml
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Glint is a family of packages which all live in this repo as a Yarn workspace. T
- Install [Volta](https://volta.sh), a JavaScript toolchain manager we use to make sure everyone working on the project is using the same versions of Node and Yarn.
- Clone the repo.
- Run `yarn` in the root of the repo to install all the package dependencies. If you have Volta installed, it will automatically fetch and use the correct versions of Node and Yarn for you.
- Run `yarn build` in the root of the repository to build all of the projects the first time. This will make sure that once you start working on one of the packages, you are working with an up to date version of the other packages in the project it depends on.
- Run `pnpm build` in the root of the repository to build all of the projects the first time. This will make sure that once you start working on one of the packages, you are working with an up to date version of the other packages in the project it depends on.
- Read the project’s [ARCHITECTURE.md](./ARCHITECTURE.md) to understand the basics of how the code base works.

Once you have made changes and added tests to confirm they work correctly, you can then open a PR and we'll work with you to polish it up and get it landed!
Expand Down Expand Up @@ -53,7 +53,7 @@ These launch configurations can be run via the Run and Debug tab in VSCode.
Firstly, there is an entire suite of integration tests that will spin up instances of VSCode and test out the VSCode Glint extension. These can be run from the `packages/vscode` directory via:

```
yarn run test
pnpm run test
```

Secondly, the Launch Configurations described above (I believe) will run your client-side extension code in debug mode, along with the language server.
Expand Down
2 changes: 1 addition & 1 deletion docs/ember/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Read on for a more detailed explanation of each of these steps.
{% tab title="Yarn" %}

```sh
yarn add --dev @glint/core @glint/template @glint/environment-ember-loose
pnpm add --dev @glint/core @glint/template @glint/environment-ember-loose
```

{% endtab %}
Expand Down
2 changes: 1 addition & 1 deletion docs/ember/template-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In addition to the `@glint/core`, `@glint/template` and `@glint/environment-embe
{% tab title="Yarn" %}

```sh
yarn add --dev @glint/core @glint/template @glint/environment-ember-loose @glint/environment-ember-template-imports
pnpm add --dev @glint/core @glint/template @glint/environment-ember-loose @glint/environment-ember-template-imports
```

{% endtab %}
Expand Down
2 changes: 1 addition & 1 deletion docs/with-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Thus, installation for a JS setup looks like this:
{% tabs %}
{% tab title="Yarn" %}
```shell-session
yarn add --dev typescript @glint/core @glint/template @glint/environment-ember-loose
pnpm add --dev typescript @glint/core @glint/template @glint/environment-ember-loose
```
{% endtab %}

Expand Down
18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@
"name": "glint",
"repository": "https://github.com/typed-ember/glint",
"private": true,
"workspaces": [
"packages/*",
"test-packages/*"
],
"scripts": {
"lint": "yarn lint:scripts && yarn lint:formatting",
"lint:fix": "yarn lint:scripts --fix && yarn prettier --write .",
"lint:scripts": "yarn eslint --max-warnings 0 --cache .",
"lint:formatting": "yarn prettier --check .",
"test": "yarn workspaces run test",
"lint": "pnpm lint:scripts && pnpm lint:formatting",
"lint:fix": "pnpm lint:scripts --fix && pnpm prettier --write .",
"lint:scripts": "pnpm eslint --max-warnings 0 --cache .",
"lint:formatting": "pnpm prettier --check .",
"test": "pnpm --filter '*' run test",
"build": "tsc --build",
"release-it": "echo \"Running release-it via yarn breaks publishing! Use npx or a Volta global installation.\""
"release-it": "echo \"Running release-it via pnpm breaks publishing! Use npx or a Volta global installation.\""
},
"volta": {
"node": "16.17.1",
"yarn": "1.22.4"
"pnpm": "8.15.1"
},
"devDependencies": {
"@release-it-plugins/lerna-changelog": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test": "vitest run",
"test:watch": "vitest watch",
"build": "tsc --build",
"prepack": "yarn build"
"prepack": "pnpm build"
},
"peerDependencies": {
"typescript": ">=4.8.0"
Expand Down
4 changes: 3 additions & 1 deletion packages/environment-ember-loose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "glint --project __tests__/type-tests && vitest run",
"test:watch": "vitest watch",
"build": "tsc --build",
"prepack": "yarn build"
"prepack": "pnpm build"
},
"files": [
"README.md",
Expand All @@ -34,6 +34,7 @@
"@types/ember__controller": "^4.0.2",
"@types/ember__object": "^4.0.4",
"@types/ember__routing": "^4.0.11",
"@types/node": "^18.11.5",
"ember-cli-htmlbars": "^6.0.1",
"ember-modifier": "^3.2.7 || ^4.0.0"
},
Expand Down Expand Up @@ -62,6 +63,7 @@
},
"devDependencies": {
"@glimmer/component": "^1.1.2",
"@glint/core": "workspace:*",
"@types/ember__array": "^4.0.2",
"@types/ember__component": "^4.0.10",
"@types/ember__controller": "^4.0.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/environment-ember-template-imports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "vitest run",
"test:watch": "vitest watch",
"build": "tsc --build",
"prepack": "yarn build"
"prepack": "pnpm build"
},
"files": [
"README.md",
Expand Down Expand Up @@ -52,6 +52,7 @@
}
},
"devDependencies": {
"@glint/core": "workspace:*",
"@types/node": "^18.11.5",
"@types/ember": "^4.0.0",
"@types/ember__component": "^4.0.10",
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Or by installing `@glint/scripts` as a project-local dependency and then executi
npm install -D @glint/scripts
npx {script-name} {...script-args}
# or
yarn add --dev @glint/scripts
yarn {script-name} {...script-args}
pnpm add --dev @glint/scripts
pnpm {script-name} {...script-args}
# or
pnpm i -D @glint/scripts
pnpm {script-name} {...script-args}
Expand Down
5 changes: 4 additions & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"scripts": {
"test": "vitest run",
"build": "tsc --build",
"prepack": "yarn build"
"prepack": "pnpm build"
},
"dependencies": {
"golden-fleece": "^1.0.9",
Expand All @@ -33,7 +33,10 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@glint/core": "workspace:*",
"@types/glob": "^8.1.0",
"@types/js-yaml": "^4.0.5",
"@types/node": "^18.11.5",
"@types/yargs": "^17.0.10",
"json5": "^2.2.2",
"vitest": "^0.22.0"
Expand Down
5 changes: 5 additions & 0 deletions packages/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
],
"devDependencies": {
"@glimmer/component": "^1.1.2",
"@types/ember__template": "~4.0.7",
"@glimmer/runtime": "0.84.3",
"@glint/template": "workspace:*",
"@glint/environment-ember-loose": "workspace:*",
"@types/ember__component": "~4.0.8",
"@types/node": "^18.11.5",
"expect-type": "^0.15.0",
"sums-up": "^2.1.0"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/type-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"dependencies": {
"expect-type": "^0.15.0"
},
"devDependencies": {
"@glint/core": "workspace:*",
"@types/node": "^18.11.5"
},
"peerDependencies": {
"@glint/template": "^1.4.0"
},
Expand Down
9 changes: 5 additions & 4 deletions packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"Linters"
],
"scripts": {
"pretest": "yarn build",
"pretest": "pnpm build",
"test": "node lib/__tests__/support/launch-from-cli.mjs",
"build": "yarn compile && yarn bundle",
"build": "pnpm compile && pnpm bundle",
"compile": "tsc --build",
"bundle": "esbuild lib/src/extension.js --bundle --outfile=dist/extension.js --platform=node --external:vscode --minify",
"vscode:prepublish": "yarn build",
"vscode:prepublish": "pnpm build",
"extension:package": "vsce package --no-dependencies",
"extension:publish": "vsce publish --no-dependencies"
},
Expand Down Expand Up @@ -104,8 +104,9 @@
"@vscode/test-electron": "Dropped support for Node < 16 in the 2.2.1 patch release, so locking to 2.2.0 while we still support Node 14."
},
"devDependencies": {
"@glint/core": "^1.4.0",
"@glint/core": "workspace:*",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.5",
"@types/vscode": "^1.68.1",
"@vscode/test-electron": "^2.3.8",
"@vscode/vsce": "^2.22.0",
Expand Down
Loading

0 comments on commit a8c52ba

Please sign in to comment.