Skip to content

Commit 00ef904

Browse files
authored
Merge pull request #567 from javierbrea/release
Use pnpm. Upgrade devDependencies
2 parents 2c65021 + df76fb9 commit 00ef904

File tree

78 files changed

+17757
-99874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+17757
-99874
lines changed

.eslintignore

-3
This file was deleted.

.eslintrc.js

-37
This file was deleted.

.github/workflows/build.yml

+13-19
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,31 @@ jobs:
2121
shell: bash
2222
run: echo "branch=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
2323
id: extract-branch
24-
- name: Use Node.js
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 9
28+
- name: Install Node.js
2529
uses: actions/setup-node@v4
2630
with:
2731
node-version: ${{ matrix.node }}
28-
- name: Cache node modules
29-
uses: actions/cache@v4
30-
env:
31-
cache-name: cache-node-modules
32-
with:
33-
# npm cache files are stored in `~/.npm` on Linux/macOS
34-
path: ~/.npm
35-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
36-
restore-keys: |
37-
${{ runner.os }}-build-${{ env.cache-name }}-
38-
${{ runner.os }}-build-
39-
${{ runner.os }}-
4032
- name: Install dependencies
41-
run: npm ci
33+
run: pnpm install
34+
- name: Check spelling
35+
run: pnpm run cspell
4236
- name: Lint
43-
run: npm run lint
37+
run: pnpm run lint
4438
- name: Check types
45-
run: npm run tsc
39+
run: pnpm run tsc
4640
- name: Test unit
47-
run: npm run test:unit
41+
run: pnpm run test:unit
4842
- name: Test mutation
49-
run: npm run test:mutation
43+
run: pnpm run test:mutation
5044
env:
5145
BRANCH_NAME: ${{ steps.extract-branch.outputs.branch }}
5246
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_TOKEN }}
5347
- name: Test E2E
54-
run: npm run test:e2e
48+
run: pnpm run test:e2e
5549
id: test-e2e
5650
- name: Upload E2E tests screenshots
5751
if: ${{ always() && steps.test-e2e.outcome == 'failure' }}

.github/workflows/check-package-version.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v4
12-
- name: Get NPM version is new
12+
- name: Get version is new
1313
id: check
1414
uses: EndBug/[email protected]
1515
with:
@@ -22,7 +22,7 @@ jobs:
2222
run: |
2323
echo "Version not changed"
2424
exit 1
25-
- name: Get NPM version
25+
- name: Get version
2626
id: package-version
2727
uses: martinbeentjes/[email protected]
2828
- name: Check Changelog version

.github/workflows/publish-to-github.yml

+15-6
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,29 @@ jobs:
66
publish:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
9+
- name: Checkout
10+
uses: actions/checkout@v4
1011
# Setup .npmrc file to publish to GitHub Packages
11-
- uses: actions/setup-node@v4
12+
- name: Install pnpm
13+
uses: pnpm/action-setup@v4
1214
with:
13-
node-version: '18.x'
15+
version: 9
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "22.x"
1420
registry-url: 'https://npm.pkg.github.com'
1521
# Defaults to the user or organization that owns the workflow file
1622
scope: '@javierbrea'
17-
- uses: MerthinTechnologies/edit-json-action@v1
23+
- name: Change package name
24+
uses: MerthinTechnologies/edit-json-action@v1
1825
with:
1926
filename: './package.json'
2027
key: 'name'
2128
value: '@javierbrea/cypress-localstorage-commands'
22-
- run: npm ci
23-
- run: npm publish
29+
- name: Install dependencies
30+
run: pnpm install
31+
- name: Publish package
32+
run: pnpm -r publish --no-git-checks
2433
env:
2534
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish-to-npm.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ jobs:
66
publish:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: actions/setup-node@v4
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Install pnpm
12+
uses: pnpm/action-setup@v4
1113
with:
12-
node-version: '18.x'
14+
version: 9
15+
- name: Install Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "22.x"
1319
registry-url: 'https://registry.npmjs.org/'
14-
- run: npm ci
15-
- run: npm publish
20+
- name: Install dependencies
21+
run: pnpm install
22+
- name: Publish package
23+
run: pnpm -r publish --no-git-checks
1624
env:
1725
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.husky/pre-commit

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
npm run lint-staged
1+
pnpm run lint-staged

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Fixed
1111
### Removed
1212

13+
## [2.2.7] - 2024-12-06
14+
15+
### Added
16+
* chore: Check spelling in build workflow
17+
18+
### Changed
19+
* chore: Use Pnpm as package manager
20+
* chore: Upgrade eslint configuration to v9
21+
* chore: Update devDependencies
22+
23+
### Fixed
24+
* docs: Fix typos in README
25+
1326
## [2.2.6] - 2024-05-17
1427

1528
### Added

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Use `cy.saveLocalStorage()` to save a snapshot of current `localStorage` at the
142142

143143
#### Cookies button example
144144

145-
Next example shows how this package can be used to test a "cookies button" _(which theorically sets a flag into `localStorage` and can be clicked only once)_
145+
Next example shows how this package can be used to test a "cookies button" _(which in theory sets a flag into `localStorage` and can be clicked only once)_
146146

147147
```js
148148
describe("Accept cookies button", () => {

cspell.config.js

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
const { resolve } = require("path");
2+
3+
const DICTIONARIES_BASE_PATH = resolve(__dirname, "cspell");
4+
5+
module.exports = {
6+
// Version of the setting file. Always 0.2
7+
version: "0.2",
8+
// Paths to be ignored
9+
ignorePaths: [
10+
"**/node_modules/**",
11+
".husky/**",
12+
"**/pnpm-lock.yaml",
13+
"**/cspell/*.txt",
14+
"cspell.config.js",
15+
"**/.gitignore",
16+
"**/coverage/**",
17+
"**/dist/**",
18+
"test-e2e/app/build/**",
19+
"test-e2e/*/cypress/integration/**",
20+
"test-e2e/app/build/**",
21+
"test-e2e/cypress-typescript/cypress/support/cypress-localstorage-commands/**",
22+
"reports/**",
23+
],
24+
caseSensitive: false,
25+
// Language - current active spelling language
26+
language: "en",
27+
// Dictionaries to be used
28+
dictionaryDefinitions: [
29+
{
30+
name: "missing",
31+
path: `${DICTIONARIES_BASE_PATH}/missing.txt`,
32+
},
33+
],
34+
dictionaries: ["missing"],
35+
languageSettings: [
36+
{
37+
// In markdown files
38+
languageId: "markdown",
39+
// Exclude code blocks from spell checking
40+
ignoreRegExpList: ["/^\\s*```[\\s\\S]*?^\\s*```/gm"],
41+
},
42+
],
43+
// The minimum length of a word before it is checked.
44+
minWordLength: 4,
45+
// cspell:disable-next-line FlagWords - list of words to be always considered incorrect. This is useful for offensive words and common spelling errors. For example "hte" should be "the"
46+
flagWords: ["hte"],
47+
};

cspell/missing.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Brea
2+
commonmark
3+
coverallsapp
4+
javierbrea
5+
Merthin
6+
prelint
7+
sonarcloud
8+
sonarsource
9+
Uninen

0 commit comments

Comments
 (0)