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

chore: move to js monorepo #47

Merged
merged 9 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
30 changes: 21 additions & 9 deletions .github/workflows/build-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,29 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
node-version-file: ".nvmrc"

- name: Setup Yarn
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
npm install -g yarn
echo "Yarn version: $(yarn -v)"
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Install dependencies
run: pnpm install

- name: Build
run: yarn build:packages
run: pnpm build:packages
32 changes: 19 additions & 13 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,29 @@ jobs:
GH_PROJECT_NAME: ${{vars.GH_PROJECT_NAME}}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Setup Yarn
node-version-file: ".nvmrc"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
npm install -g yarn
echo "Yarn version: $(yarn -v)"
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
- name: Install Dependencies
run: yarn install --frozen-lockfile && cd docs && yarn install --frozen-lockfile
- name: Build Packages
run: yarn build:packages
- name: Build Docs
run: yarn build:docs
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
stevensJourney marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/upload-pages-artifact@v2
with:
path: ./docs/build
Expand Down
40 changes: 24 additions & 16 deletions .github/workflows/dev-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,33 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup NodeJS
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18

- name: Setup Yarn
node-version-file: ".nvmrc"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Add NPM auth
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
- name: Get pnpm store directory
shell: bash
run: |
npm install -g yarn
echo "Yarn version: $(yarn -v)"
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
DominicGBauer marked this conversation as resolved.
Show resolved Hide resolved

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

echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
DominicGBauer marked this conversation as resolved.
Show resolved Hide resolved
- name: Build
run: yarn build:packages

run: pnpm build:packages
- name: Publish
run: |
yarn changeset version --no-git-tag --snapshot dev
yarn changeset publish --tag dev
pnpm changeset version --no-git-tag --snapshot dev
pnpm changeset publish --tag dev
33 changes: 23 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18
uses: actions/setup-node@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Dependencies
run: yarn

node-version-file: ".nvmrc"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ node_modules
lib
dist
tsconfig.tsbuildinfo
yarn-error.log
.vscode
.DS_STORE
.idea
.fleet
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"**/*": "prettier --write --ignore-unknown"
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.12.0
v20.9.0
10 changes: 6 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"printWidth": 120,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"bracketSameLine": true,
"tabWidth": 2,
"jsxBracketSameLine": true,
"useTabs": false,
"printWidth": 120,
"trailingComma": "none"
}
}
Loading
Loading