Skip to content

Commit ca465f5

Browse files
authored
Merge pull request #575 from meilisearch/chore/pin-yarn-version
Pin yarn version
2 parents 888566b + 49f8839 commit ca465f5

File tree

8 files changed

+17817
-13318
lines changed

8 files changed

+17817
-13318
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ jobs:
1818
- uses: actions/setup-node@v4
1919
with:
2020
node-version: 18
21+
cache: "yarn"
22+
cache-dependency-path: yarn.lock
23+
- name: Enable Corepack
24+
run: corepack enable
2125
- name: Install dev dependencies
22-
run: yarn --dev
26+
run: yarn --frozen-lockfile
2327
- name: Run style check
2428
run: yarn lint && yarn prettier-check
2529
cypress_no_meilisearch:
@@ -35,8 +39,10 @@ jobs:
3539
node-version: 18
3640
cache: "yarn"
3741
cache-dependency-path: yarn.lock
42+
- name: Enable Corepack
43+
run: corepack enable
3844
- name: Install dependencies
39-
run: yarn
45+
run: yarn --frozen-lockfile
4046
- name: Test no meilisearch running
4147
uses: cypress-io/github-action@v6
4248
with:
@@ -74,8 +80,10 @@ jobs:
7480
node-version: 18
7581
cache: "yarn"
7682
cache-dependency-path: yarn.lock
83+
- name: Enable Corepack
84+
run: corepack enable
7785
- name: Install dependencies
78-
run: yarn
86+
run: yarn --frozen-lockfile
7987
- name: Test
8088
uses: cypress-io/github-action@v6
8189
env:
@@ -117,8 +125,10 @@ jobs:
117125
node-version: 18
118126
cache: "yarn"
119127
cache-dependency-path: yarn.lock
128+
- name: Enable Corepack
129+
run: corepack enable
120130
- name: Install dependencies
121-
run: yarn
131+
run: yarn --frozen-lockfile
122132
- name: Test
123133
uses: cypress-io/github-action@v6
124134
env:
@@ -138,4 +148,3 @@ jobs:
138148
with:
139149
name: cypress-videos
140150
path: cypress/videos
141-

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
/node_modules
55
/.pnp
66
.pnp.js
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/sdks
12+
!.yarn/versions
713

814
# testing
915
/coverage

.yarn/releases/yarn-4.6.0.cjs

Lines changed: 934 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.6.0.cjs

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353

5454
<br/>
5555

56-
## Setup
56+
This repository uses [Yarn 4.x](https://yarnpkg.com/) to manage dependencies and [NVM](https://github.com/nvm-sh/nvm) to manage Node version. See [current version](.nvmrc).
5757

58-
> This repository uses [NVM](https://github.com/nvm-sh/nvm) to manage Node version. See [current version](.nvmrc).
58+
## Setup
5959

6060
```bash
6161
yarn

cypress/e2e/test-api-key-required.cy.js

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ describe(`Test API key required`, () => {
2222

2323
it('Should fail on wrong API key triggered with mouse click', () => {
2424
cy.get('div[aria-label=ask-for-api-key]').within(() => {
25-
cy.get('input[name="apiKey"]')
26-
.type(WRONG_APIKEY)
27-
.should('have.value', WRONG_APIKEY)
25+
cy.get('input[name="apiKey"]').as('apiKeyInput')
26+
cy.get('@apiKeyInput').type(WRONG_APIKEY)
27+
cy.get('@apiKeyInput').should('have.value', WRONG_APIKEY)
2828
cy.get('button').contains('Go').click()
2929
cy.wait(WAITING_TIME)
3030
cy.contains('The provided API key is invalid.')
@@ -33,21 +33,21 @@ describe(`Test API key required`, () => {
3333

3434
it('Should fail on wrong API key triggered with enter key', () => {
3535
cy.get('div[aria-label=ask-for-api-key]').within(() => {
36-
cy.get('input[name="apiKey"]')
37-
.type(WRONG_APIKEY)
38-
.should('have.value', WRONG_APIKEY)
39-
cy.get('input[name="apiKey"]').type('{enter}')
36+
cy.get('input[name="apiKey"]').as('apiKeyInput')
37+
cy.get('@apiKeyInput').type(WRONG_APIKEY)
38+
cy.get('@apiKeyInput').should('have.value', WRONG_APIKEY)
39+
cy.get('@apiKeyInput').type('{enter}')
4040
cy.wait(WAITING_TIME)
4141
cy.contains('The provided API key is invalid.')
4242
})
4343
})
4444

4545
it('Should accept valid API key', () => {
4646
cy.get('div[aria-label=ask-for-api-key]').within(() => {
47-
cy.get('input[name="apiKey"]')
48-
.clear()
49-
.type(API_KEY)
50-
.should('have.value', API_KEY)
47+
cy.get('input[name="apiKey"]').as('apiKeyInput')
48+
cy.get('@apiKeyInput').clear()
49+
cy.get('@apiKeyInput').type(API_KEY)
50+
cy.get('@apiKeyInput').should('have.value', API_KEY)
5151
cy.get('button').contains('Go').click()
5252
cy.wait(WAITING_TIME)
5353
})
@@ -57,7 +57,9 @@ describe(`Test API key required`, () => {
5757
it('Should display a modal with API key inside the API key modal button', () => {
5858
// Fill the first API key request
5959
cy.get('div[aria-label=ask-for-api-key]').within(() => {
60-
cy.get('input[name="apiKey"]').clear().type(API_KEY)
60+
cy.get('input[name="apiKey"]').as('apiKeyInput')
61+
cy.get('@apiKeyInput').clear()
62+
cy.get('@apiKeyInput').type(API_KEY)
6163
cy.get('button').contains('Go').click()
6264
})
6365
cy.visit('/')
@@ -73,7 +75,9 @@ describe(`Test API key required`, () => {
7375
it('Should fail on API Key change inside the API key modal button', () => {
7476
// Fill the first API key request
7577
cy.get('div[aria-label=ask-for-api-key]').within(() => {
76-
cy.get('input[name="apiKey"]').clear().type(API_KEY)
78+
cy.get('input[name="apiKey"]').as('apiKeyInput')
79+
cy.get('@apiKeyInput').clear()
80+
cy.get('@apiKeyInput').type(API_KEY)
7781
cy.get('button').contains('Go').click()
7882
})
7983
cy.visit('/')
@@ -82,10 +86,10 @@ describe(`Test API key required`, () => {
8286
// Test the change of API key inside the API Key Modal
8387
cy.get('span').contains('Api Key').parent().click()
8488
cy.get('div[aria-label=settings-api-key]').within(() => {
85-
cy.get('input[name="apiKey"]')
86-
.clear()
87-
.type(WRONG_APIKEY)
88-
.should('have.value', WRONG_APIKEY)
89+
cy.get('input[name="apiKey"]').as('apiKeyInput')
90+
cy.get('@apiKeyInput').clear()
91+
cy.get('@apiKeyInput').type(WRONG_APIKEY)
92+
cy.get('@apiKeyInput').should('have.value', WRONG_APIKEY)
8993
cy.get('button').contains('Go').click()
9094
cy.wait(WAITING_TIME)
9195
cy.contains('The provided API key is invalid.')

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@storybook/react-webpack5": "^8.4.7",
5353
"@svgr/cli": "^8.1.0",
5454
"cypress": "^13.11.0",
55+
"eslint": "8.57.0",
5556
"eslint-config-airbnb": "^19.0.4",
5657
"eslint-config-prettier": "^9.1.0",
5758
"eslint-plugin-cypress": "^2.12.1",
@@ -61,10 +62,5 @@
6162
"prettier": "^3.3.3",
6263
"storybook": "^8.3.4"
6364
},
64-
"resolutions": {
65-
"**/recursive-readdir/**/minimatch": "^3.0.5",
66-
"**/css-select/**/nth-check": "^2.1.1",
67-
"**/react-scripts/**/semver": "^7.5.2",
68-
"**/react-scripts/**/postcss": "^8.4.31"
69-
}
65+
"packageManager": "[email protected]"
7066
}

0 commit comments

Comments
 (0)