Skip to content

Commit

Permalink
Fix postinstall issues, and run yarn for website
Browse files Browse the repository at this point in the history
  • Loading branch information
dddlr committed Dec 12, 2024
1 parent ac422a3 commit e5dd9d3
Show file tree
Hide file tree
Showing 7 changed files with 10,611 additions and 7,406 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,18 @@ jobs:

- name: Run parcel tests
run: yarn test:parcel

# Borrowed from https://github.com/yarnpkg/berry/issues/4976#issue-1415019789
- name: Run yarn lint:yarn-dedupe
if: ${{ success() || failure() }}
run: |
if ! yarn lint:yarn-dedupe; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Some dependencies can be deduplicated, which will make yarn.lock'
echo 'lighter and potentially save us from unexplainable bugs.'
echo 'Please run `yarn fix:yarn-dedupe` locally and commit yarn.lock.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi
47 changes: 47 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Website

on:
push:
branches:
- master

pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install packages
working-directory: './website'
run: yarn

- name: Validate
run: yarn build

# Borrowed from https://github.com/yarnpkg/berry/issues/4976#issue-1415019789
- name: Run yarn lint:yarn-dedupe
if: ${{ success() || failure() }}
working-directory: './website'
run: |
if ! yarn lint:yarn-dedupe; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Some dependencies can be deduplicated, which will make yarn.lock'
echo 'lighter and potentially save us from unexplainable bugs.'
echo 'Please run `yarn fix:yarn-dedupe` locally and commit yarn.lock.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ storybook-static
!.yarn/releases
!.yarn/sdks
!.yarn/versions

website/.yarn/*
!website/.yarn/cache
!website/.yarn/patches
!website/.yarn/plugins
!website/.yarn/releases
!website/.yarn/sdks
!website/.yarn/versions
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
"clean:node-modules": "rm -rf node_modules/.cache",
"clean:parcel-cache": "rm -rf .parcel-cache/",
"clean:ts-cache": "find . -name \"*.tsbuildinfo\" -type f -delete",
"postinstall": "scripts/postinstall.sh",
"fix:yarn-dedupe": "yarn dedupe",
"lint": "eslint --config .eslintrc.js --ext js,json,jsx,ts,tsx .",
"lint:fix": "yarn lint --fix",
"lint:yarn-dedupe": "yarn dedupe --check",
"prettier:check": "prettier ./ --check",
"prettier:fix": "prettier ./ --write",
"release": "yarn clean && yarn build && yarn changeset publish",
Expand Down
3 changes: 2 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"clean": "rm -rf dist && workspaces-run -- rm -rf dist && workspaces-run -- rm -rf .cache",
"clean:npm": "yarn clean:pkg:npm && rm -rf node_modules",
"clean:pkg:npm": "workspaces-run -- rm -rf node_modules",
"postinstall": "echo 'De-duplicating...'; yarn dedupe",
"fix:yarn-dedupe": "yarn dedupe",
"lint:yarn-dedupe": "yarn dedupe --check",
"start:docs": "cd packages/docs && yarn start",
"start:landing": "cd packages/landing && yarn start"
},
Expand Down
1 change: 0 additions & 1 deletion website/packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "1.0.0",
"main": "./src/index.ts",
"source": "./src/index.ts",
"scripts": {},
"dependencies": {
"@babel/core": "^7.24.5",
"@babel/preset-react": "^7.24.1",
Expand Down
Loading

0 comments on commit e5dd9d3

Please sign in to comment.