-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert paypal-js to a monorepo with Changesets and npm workspaces (#453
- Loading branch information
Showing
57 changed files
with
12,505 additions
and
8,868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@paypal/paypal-js": patch | ||
--- | ||
|
||
move to monorepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
name: validate | ||
name: build | ||
on: | ||
# run on push but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
# run for every pull request | ||
pull_request: {} | ||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{github.event.pull_request.head.sha}} | ||
fetch-depth: 0 | ||
|
||
- name: 🤝 Set Node version from .nvmrc | ||
|
@@ -30,14 +24,19 @@ jobs: | |
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
useLockFile: false | ||
|
||
- name: ▶️ Run validate script | ||
run: npm run validate | ||
- name: 🧾 Check for changeset | ||
# blocks PRs without changesets | ||
run: npx changeset status --since=origin/main | ||
|
||
- name: 🚧 Run build script | ||
run: npm run build | ||
|
||
- name: 📐 Run format script | ||
run: npm run format | ||
|
||
- name: 👕 Lint commit messages | ||
uses: wagoid/commitlint-github-action@v5 | ||
- name: 📖 Run lint script | ||
run: npm run lint | ||
|
||
- name: ⬆️ Upload coverage report | ||
uses: codecov/codecov-action@v3 | ||
- name: 🧪 Run test script | ||
run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
|
||
- name: 🤝 Set Node version from .nvmrc | ||
run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NVMRC }} | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Setup npmrc | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | ||
|
||
- name: 🚢 Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npm run changeset:release | ||
version: npm run changeset:version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no lint-staged | ||
npx lint-staged |
Oops, something went wrong.