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 to monorepo #452

Closed
wants to merge 2 commits into from
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
8 changes: 8 additions & 0 deletions .changeset/README.md
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)
11 changes: 11 additions & 0 deletions .changeset/config.json
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": []
}
5 changes: 5 additions & 0 deletions .changeset/rude-sloths-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@paypal/paypal-js": patch
---

moving paypal-js to monorepo
25 changes: 0 additions & 25 deletions .eslintrc.json

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build
on:
push:
branches:
- main
pull_request: {}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.sha}}
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: 🧾 Check for changeset
# blocks PRs without changesets
run: npx changeset status --since=origin/main

- name: 🚧 Run build script
run: npm run build

- name: 📖 Run lint script
run: npm run lint

- name: 🧪 Run test script
run: npm run test
92 changes: 44 additions & 48 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,47 @@
name: playwright
on:
# run on push but only for the main branch
push:
branches:
- main
# run for every pull request
pull_request: {}
push:
branches:
- main
pull_request: {}
jobs:
test:
timeout-minutes: 60
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:
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
with:
useLockFile: false

- name: 🌎 Install Playwright Browsers
run: npx playwright install --with-deps

- name: ▶️ Build the dist folder
run: npm run build

- name: ▶️ Run Playwright tests
run: npx playwright test

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
test:
timeout-minutes: 60
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:
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: 🌎 Install Playwright Browsers
run: npx playwright install --with-deps

- name: ▶️ Build the dist folder
run: npm run build

- name: ▶️ Run Playwright tests
run: npm run test:e2e

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
36 changes: 0 additions & 36 deletions .github/workflows/publish.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/release.yml
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 }}
43 changes: 0 additions & 43 deletions .github/workflows/validate.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

2 changes: 1 addition & 1 deletion .husky/pre-commit
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
4 changes: 1 addition & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"tabWidth": 4
}
{}
Loading
Loading