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

refactor: update github build for pnpm, build emit esm #23

Merged
merged 1 commit into from
Sep 16, 2022
Merged
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
30 changes: 18 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,41 @@ jobs:
- name: Begin CI...
uses: actions/checkout@v2

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

- name: Use cached node_modules
uses: actions/cache@v1
# - name: Use cached node_modules
# uses: actions/cache@v1
# with:
# path: node_modules
# key: nodeModules-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# nodeModules-

- uses: pnpm/action-setup@v2.2.2
name: Install pnpm
id: pnpm-install
with:
path: node_modules
key: nodeModules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
nodeModules-
version: 7.5.2

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install
env:
CI: true

- name: Lint
run: yarn lint
run: pnpm lint
env:
CI: true

- name: Test
run: yarn test --ci --coverage --maxWorkers=2
run: pnpm test
env:
CI: true

- name: Build
run: yarn build
run: pnpm build
env:
CI: true
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"scripts": {
"start": "tsup ./src/index.ts --dts --watch",
"build": "tsup ./src/index.ts --dts",
"build": "tsup ./src/index.ts --dts --sourcemap --format esm,cjs",
"changeset": "pnpm exec changeset",
"get:changes": "git log --format=%B --no-merges HEAD ^master | pbcopy",
"husky:install": "pnpm exec husky install",
Expand All @@ -34,7 +34,7 @@
},
"name": "react-abode",
"author": "Bram Kaashoek",
"module": "dist/react-abode.esm.js",
"module": "dist/index.mjs",
"devDependencies": {
"@changesets/cli": "^2.24.2",
"@types/jest": "^28.1.6",
Expand Down