Skip to content

Commit

Permalink
Merge pull request #1418 from glimmerjs/chore/try-pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats authored May 3, 2023
2 parents 53346e5 + 9ce570b commit 99fee7d
Show file tree
Hide file tree
Showing 194 changed files with 13,416 additions and 11,979 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.json]
max_line_length = 80

[*.hbs]
insert_final_newline = false

Expand Down
54 changes: 29 additions & 25 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": "latest",
"project": ["tsconfig.json", "tsconfig.build.json", "packages/@glimmer/vm/tsconfig.json"]
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:qunit/recommended",
"plugin:qunit/two",
"plugin:node/recommended",
"prettier",
"prettier/@typescript-eslint"
"prettier"
],
"plugins": ["@typescript-eslint", "prettier", "qunit"],
"settings": {
"import/resolver": {
"typescript": {}
},
"import/parsers": {
"@typescript-eslint/parser": [".js", ".ts", ".d.ts"]
},
"node": {
"allowModules": ["@glimmer/debug", "@glimmer/local-debug-flags"],
"tryExtensions": [".js", ".ts", ".d.ts", ".json"]
Expand Down Expand Up @@ -192,25 +197,26 @@
"parserOptions": {
"project": "./tsconfig.json"
},
"files": ["packages/@glimmer/compiler/**/*.ts", "packages/@glimmer/syntax/lib/**/*.ts", "packages/@glimmer/syntax/index.ts"],
"files": [
"packages/@glimmer/compiler/**/*.ts",
"packages/@glimmer/syntax/lib/**/*.ts",
"packages/@glimmer/syntax/index.ts"
],
"extends": [
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:qunit/recommended",
"plugin:qunit/two",
"plugin:node/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"plugins": [
"simple-import-sort"
"prettier"
],
"plugins": ["simple-import-sort"],
"rules": {
"prefer-const": ["off"],
"simple-import-sort/sort": ["error"],
"simple-import-sort/imports": ["error"],
"simple-import-sort/exports": ["error"],
"import/order": "off",
"sort-imports": "off",
"import/first": ["error"],
Expand All @@ -227,16 +233,20 @@
}
],
"@typescript-eslint/no-explicit-any": [
"error", {
"error",
{
"ignoreRestArgs": true
}
],
"@typescript-eslint/ban-types": ["error", {
"extendDefaults": true,
"types": {
"object": false
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"object": false
}
}
}]
]
}
},
{
Expand Down Expand Up @@ -290,9 +300,7 @@
}
},
{
"files": [
"packages/build-utils/@glimmer/vm-babel-plugins/test/**/*.js"
],
"files": ["packages/build-utils/@glimmer/vm-babel-plugins/test/**/*.js"],
"env": {
"es6": true,
"node": true,
Expand Down Expand Up @@ -403,10 +411,6 @@
// these packages need to be fixed to avoid these warnings, but in the
// meantime we should not regress the other packages
"files": [
// @glimmer/interfaces should not import for any other @glimmer package
// but it currently imports from @glimmer/reference and @glimmer/validator
"packages/@glimmer/interfaces/**/*.ts",

// this specific test imports from @glimmer/runtime (causing a cyclic
// dependency), it should either be refactored to use the interfaces
// directly (instead of the impls) or moved into @glimmer/runtime
Expand Down
87 changes: 38 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,98 +12,87 @@ on:
- cron: '0 3 * * *' # daily, at 3am

jobs:
install_dependencies:
name: "Install Dependencies"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2

lint:
name: Linting
runs-on: ubuntu-latest
needs: ["install_dependencies"]
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1

- name: install dependencies
run: yarn install --frozen-lockfile

- run: yarn lint
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2
- run: pnpm lint

test-chrome:
name: Chrome
runs-on: ubuntu-latest
needs: ["install_dependencies"]
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1

- name: install dependencies
run: yarn install --frozen-lockfile
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2
- run: pnpm test

- run: yarn test

test-node:
name: Node
name: Chrome
runs-on: ubuntu-latest
needs: ["install_dependencies"]
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1

- name: install dependencies
run: yarn install --frozen-lockfile

- run: yarn ember build
- run: yarn test:node
- run: yarn test:babel-plugins
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2
- run: pnpm test

test-browserstack:
name: Browserstack
runs-on: ubuntu-latest
needs: ["install_dependencies"]
timeout-minutes: 20

env:
BROWSERSTACK_USERNAME: glimmervm1
BROWSERSTACK_ACCESS_KEY: 7DFjbGLxYRsXWmc8tzeh

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1

- name: install dependencies
run: yarn install --frozen-lockfile

- run: yarn browserstack:connect
- run: yarn test:browserstack
- run: yarn browserstack:results
- run: yarn browserstack:disconnect
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2
- run: pnpm browserstack:connect
- run: pnpm test:browserstack
- run: pnpm browserstack:results
- run: pnpm browserstack:disconnect

test-types:
name: Types
runs-on: ubuntu-latest
needs: ["install_dependencies"]
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1

- name: install dependencies
run: yarn install --frozen-lockfile

- run: yarn build
- run: yarn test:types
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2
- run: pnpm build
- run: pnpm test:types

floating-dependencies:
name: Floating Dependencies
runs-on: ubuntu-latest
needs: ["install_dependencies"]
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2
with:
node-version: 12.x

- name: install dependencies
run: yarn install --no-lockfile

- run: yarn test
args: '--no-lockfile'
- run: pnpm test
12 changes: 6 additions & 6 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
name: Glimmer Krausest Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: volta-cli/action@v1
- uses: NullVoxPopuli/action-setup-pnpm@v2
- name: Build Control
run: |
git checkout ${{ github.event.pull_request.base.sha }}
Expand All @@ -24,16 +24,16 @@ jobs:
- name: Build Experiment
run: |
git checkout ${{ github.sha }}
yarn install --frozen-lockfile
yarn ember build --env production --suppress-sizes --output-path dist
pnpm install --frozen-lockfile
pnpm ember build --env production --suppress-sizes --output-path dist
- name: Run Analysis
timeout-minutes: 10
uses: tracerbench/tracerbench-compare-action@master
with:
build-control: false
build-experiment: false
control-serve-command: yarn benchmark:control
experiment-serve-command: yarn benchmark:experiment
control-serve-command: pnpm benchmark:control
experiment-serve-command: pnpm benchmark:experiment
control-url: http://localhost:3000/krausest/
experiment-url: http://localhost:3001/krausest/
regression-threshold: 25
Expand Down
21 changes: 19 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Place your settings in this file to overwrite default and user settings.
{
"explorer.excludeGitIgnore": true,
"search.exclude": {
"tmp": true
},
Expand All @@ -23,9 +24,10 @@
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"eslint.format.enable": true,
"typescript.tsc.autoDetect": "on",
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifier": "project-relative",
"javascript.preferences.importModuleSpecifier": "relative",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.workspaceSymbols.scope": "currentProject",
Expand All @@ -35,5 +37,20 @@
"changeProcessCWD": true
}
],
"eslint.enable": true
"eslint.enable": true,
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
19 changes: 11 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Process

> **Warning**
> this file is currently outdated, but will be updated soon.
Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
Expand All @@ -17,24 +20,24 @@ guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
- breaking - Used when the PR is considered a breaking change.
- enhancement - Used when the PR adds a new feature or enhancement.
- bug - Used when the PR fixes a bug included in a previous release.
- documentation - Used when the PR adds or updates documentation.
- internal - Used for internal changes that still require a mention in the
changelog/release notes.

## Release

Once the prep work is completed, the actual release is straight forward:

* First, ensure that you have installed your projects dependencies:
- First, ensure that you have installed your projects dependencies:

```sh
yarn install
```

* Second, ensure that you have obtained a
- Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.
Expand All @@ -47,7 +50,7 @@ yarn install

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable

* And last (but not least 😁) do your release.
- And last (but not least 😁) do your release.

```sh
npx release-it
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmarks/krausest/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Row from './components/Row';
import buildData from './utils/data';

/**
* @param {HTMLElement | import('@simple-dom/interface').SimpleElement} element
* @param {HTMLElement | import('@glimmer/interfaces').SimpleElement} element
* @param {boolean} isInteractive
*/
export default async function render(element, isInteractive) {
Expand Down
Loading

0 comments on commit 99fee7d

Please sign in to comment.