Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade dependencies #18

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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 .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"peerigon/presets/prettier-typescript.js"
"peerigon/presets/typescript.js"
],
"env": {
"node": true
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [22.x]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # pin@0.9.1
- name: ⬇️ Checkout repo
uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 # pin@v2
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@main
- name: ⎔ Setup node ${{ matrix.node-version }}
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # pin@v2
uses: actions/setup-node@eff380dfbcf941bf8832e4acb788cebe13dfd758 # pin@main
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: 🗄 Cache node_modules
id: cache-node_modules
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # pin@v2
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # pin@main
with:
path: "**/node_modules"
key: node_modules-${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- name: 🗄 Cache .eslintcache
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # pin@v2
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # pin@main
with:
path: .eslintcache
key: eslintcache-${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -47,7 +49,7 @@ jobs:
env:
CI: true
- name: 🚀 Release on GitHub
if: "contains(' refs/heads/main refs/heads/beta ', github.ref) && matrix.node-version == '16.x'"
if: "contains(' refs/heads/main refs/heads/beta ', github.ref) && matrix.node-version == '22.x'"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.1
v22.3.0
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
Expand Down
20 changes: 1 addition & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,6 @@ Now you need to add the TypeScript language service plugin to your `tsconfig.jso
}
```

## Support for multiple errors

If you expect more than one error, you can add multiple comments, like this:

```ts
type Person = {
readonly name: string;
};

const person: Person = {
name: "Bob",
};

// 💥 Expect error 2704: … cannot be a read-only property.
// 💥 Expect error 2790: … must be optional.
delete person.name;
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@irenama I had to remove the support for multiple errors as the new TypeScript versions seems to only report one error at a time. So in this case it would first only report the first error. When that error got fixed, it reported the second one.

We need to check in our workshops where we specify more than one Expect error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch for seeing the PR through 🙂

## API

### assertProgramToOnlyHaveExpectedErrors(<br>&nbsp;&nbsp;&nbsp;&nbsp;programPath: string,<br>&nbsp;&nbsp;&nbsp;&nbsp;compilerOptions?: ts.CompilerOptions,<br>): void
Expand All @@ -103,7 +85,7 @@ assertProgramToOnlyHaveExpectedErrors("/path/to/module.ts"); // may throw

assertProgramToOnlyHaveExpectedErrors(
"/path/to/module.ts",
{ strict: true } // custom compiler options
{ strict: true }, // custom compiler options
);
```

Expand Down
Loading