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

Convert repo to using yarn for improved dependency management and to use customized dependencies #5074

Closed
Closed
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ jobs:
key: cypress-binary-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile

- name: Lint code
run: npm run lint
run: yarn lint

- name: unit tests
run: npm test
run: yarn test
env:
CI: true

- name: Produce build artifacts
run: npm run build
run: yarn build

- name: Produce npm artifact
run: npm pack

- name: E2E Tests
run: npm run cy:ci
run: yarn cy:ci

- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:

- name: Install dependencies
if: steps.cache-primes.outputs.cache-hit != 'true'
run: npm ci --legacy-peer-deps
run: yarn install --frozen-lockfile

- name: Lint code
run: npm run lint
run: yarn lint

- name: Build SwaggerEditor
run: npm run build
run: yarn build

- name: Run all tests
run: npm test
run: yarn test
env:
CI: true

- name: Test build artifacts
run: npm run test:artifact
run: yarn test:artifact
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ jobs:
node-version: 20

- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile

- name: Prepare for the Release
env:
REACT_APP_VERSION: ${{ env.NEXT_RELEASE_VERSION }}
run: |
npm run lint
npm run test
npm run build:app
npm run cy:ci
npm run build:bundle:esm
npm run build:bundle:umd
yarn lint
yarn test
yarn build:app
yarn cy:ci
yarn build:bundle:esm
yarn build:bundle:umd

- name: Semantic Release
id: semantic
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you're building a single-page application, using `swagger-editor` is strongly

## Helpful scripts

Any of the scripts below can be run by typing `npm run <script name>` in the project's root directory.
Any of the scripts below can be run by typing `yarn <script name>` in the project's root directory.

### Developing
Script name | Description
Expand Down Expand Up @@ -79,16 +79,17 @@ Script name | Description

- git, any version
- **Node.js >=20.3.0** and **npm >=9.6.7** are the minimum required versions that this repo runs on, but we always recommend using the latest version of Node.js.
- **yarn >=1.22.21**

```shell
$ npm i --legacy-peer-deps
$ yarn
```

If you have Node.js and npm installed, you can run `npm start` to spin up a static server.
If you have Node.js and yarn installed, you can run `yarn start` to spin up a static server.

Otherwise, you can open `index.html` directly from your filesystem in your browser.

If you'd like to make code changes to Swagger Editor, you can start up a Webpack hot-reloading dev server via `npm run dev`.
If you'd like to make code changes to Swagger Editor, you can start up a Webpack hot-reloading dev server via `yarn dev`.

##### Browser support

Expand Down Expand Up @@ -156,11 +157,11 @@ If you want to run the Swagger Editor locally without the Codegen features (Gene
To build and run a docker image with the code checked out on your machine, run the following from the root directory of the project:

```
# Install npm packages (if needed)
npm install
# Install packages (if needed)
yarn install

# Build the app
npm run build
yarn build

# Build an image
docker build -t swagger-editor .
Expand Down
2 changes: 1 addition & 1 deletion dist/swagger-editor-es-bundle.js.map

Large diffs are not rendered by default.

Loading