Skip to content

Commit

Permalink
⬆️ Upgrade changesets to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
torifat committed Nov 7, 2021
1 parent 639676d commit cc0d956
Show file tree
Hide file tree
Showing 9 changed files with 881 additions and 1,462 deletions.
7 changes: 5 additions & 2 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with mono-repos or single package repos to help you verion and release your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets)
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
75 changes: 0 additions & 75 deletions .changeset/config.js

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ module.exports = {
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
'no-unused-vars': [2, { args: 'all', argsIgnorePattern: '^_' }],
},
};
20 changes: 7 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [12.x 16.x]

steps:
- uses: actions/checkout@v1
Expand All @@ -19,14 +19,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Install Yarn
run: curl -o- -L https://yarnpkg.com/install.sh | bash

- name: Install Dependencies
run: yarn install --frozen-lockfile
run: npm install

- name: Run Tests
run: yarn test-ci
run: npm run test-ci

- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -C $GITHUB_SHA -B ${GITHUB_REF#refs/heads/} -Z
Expand All @@ -39,16 +36,13 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Use Node.js 10.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: Install Yarn
run: curl -o- -L https://yarnpkg.com/install.sh | bash
node-version: 16.x

- name: Install Dependencies
run: yarn install --frozen-lockfile
run: npm install

- name: Run ESLint
run: yarn eslint .
run: npx eslint .
14 changes: 0 additions & 14 deletions .github/workflows/pull-request.yml

This file was deleted.

25 changes: 13 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,27 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Use Node.js 10.x
uses: actions/setup-node@v1
- name: Checkout Repo
uses: actions/checkout@master
with:
node-version: 10.x
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Install Yarn
run: curl -o- -L https://yarnpkg.com/install.sh | bash
- name: Setup Node.js 12.x
uses: actions/setup-node@master
with:
node-version: 12.x

- name: Install Dependencies
run: yarn install --frozen-lockfile
run: npm install

- name: Publish to npm
- name: Create Release Pull Request or Publish to npm
if: github.repository == 'atlassian/better-ajv-errors'
id: changesets
uses: changesets/action@master
with:
# The --otp=1 is to get around a bug in changesets
# It will be fixed in Changesets 2
publish: yarn release --otp=1
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ fg('src/**/*.js', {
})
.then(entryPoints =>
esbuild.build({
...(isEsmBuild ? config.esm : config.cjs),
entryPoints,
sourcemap: true,
logLevel: isCI ? 'silent' : 'info',
target: 'node12.13',
...(isEsmBuild ? config.esm : config.cjs),
})
)
.catch(err => process.exit(1));
.catch(_ => process.exit(1));
Loading

0 comments on commit cc0d956

Please sign in to comment.