Skip to content

Commit

Permalink
🐛 load tslib failed on node18 (#3)
Browse files Browse the repository at this point in the history
* 🐛  load tslib failed on node18

ezolenko/rollup-plugin-typescript2#286

Closes #2

* 💚  pnpm@7 and pnpm cache

* 📝  repo url

* 💚  remove node14 & node12 support
  • Loading branch information
JiangWeixian authored Sep 3, 2023
1 parent 12b97ef commit 74eb02b
Show file tree
Hide file tree
Showing 8 changed files with 228 additions and 73 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-garlics-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aiou/dayjs-plugin-template": patch
---

fix load tslib failed on node18
23 changes: 19 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

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

steps:
- name: checkout code repository
Expand All @@ -23,9 +23,24 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm i pnpm@latest -g
- name: Install
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: |
pnpm install --frozen-lockfile=false
- name: Test
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,29 @@ jobs:
- name: setup node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: install pnpm
run: npm i pnpm@latest -g
- name: install dependencies
run: pnpm install --frozen-lockfile=false
node-version: 16
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: |
pnpm install --frozen-lockfile=false
- name: create and publish versions
uses: changesets/action@master
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: "chore: update versions"
Expand Down
44 changes: 33 additions & 11 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- snapshot
- 'hotfix/**'
env:
CI: true
jobs:
Expand All @@ -17,18 +18,39 @@ jobs:
- name: setup node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: install pnpm
run: npm i pnpm@latest -g
- name: install dependencies
run: pnpm install --frozen-lockfile=false
- name: create and publish versions
uses: changesets/action@master
node-version: 16
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
version: pnpm ci:snapshot
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:prerelease
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: |
pnpm install --frozen-lockfile=false
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: create and publish versions
run: |
pnpm ci:snapshot
pnpm changeset pre enter snapshot
pnpm ci:prerelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
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"

pnpx lint-staged
pnpm lint-staged
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# @aiou/dayjs-plugin-template
*build dayjs plugin lib*

[![npm](https://img.shields.io/npm/v/@aiou/dayjs-plugin-template)](https://github.com/spring-catponents/dayjs-plugin-template/tree/master) [![GitHub](https://img.shields.io/npm/l/@aiou/dayjs-plugin-template)](https://github.com/spring-catponents/dayjs-plugin-template/tree/master) [![stackblitz](https://img.shields.io/badge/%E2%9A%A1%EF%B8%8Fstackblitz-online-blue)](https://stackblitz.com/github/spring-catponents/dayjs-plugin-template/tree/master)
[![npm](https://img.shields.io/npm/v/@aiou/dayjs-plugin-template)](https://github.com/neo-hack/dayjs-plugin-template/tree/master) [![GitHub](https://img.shields.io/npm/l/@aiou/dayjs-plugin-template)](https://github.com/neo-hack/dayjs-plugin-template/tree/master) [![stackblitz](https://img.shields.io/badge/%E2%9A%A1%EF%B8%8Fstackblitz-online-blue)](https://stackblitz.com/github/neo-hack/dayjs-plugin-template/tree/master)

[Edit on StackBlitz ⚡️](https://stackblitz.com/github/spring-catponents/dayjs-plugin-template/tree/master)
[Edit on StackBlitz ⚡️](https://stackblitz.com/github/neo-hack/dayjs-plugin-template/tree/master)

## features

Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@aiou/dayjs-plugin-template",
"version": "1.1.0",
"description": "dayjs plugin template",
"packageManager": "[email protected]",
"keywords": [
"dayjs",
"dayjs-plugin",
Expand All @@ -10,14 +11,14 @@
"aiou"
],
"license": "MIT",
"homepage": "https://github.com/spring-catponents/dayjs-plugin-template#readme",
"homepage": "https://github.com/neo-hack/dayjs-plugin-template#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/spring-catponents/dayjs-plugin-template.git",
"url": "git+https://github.com/neo-hack/dayjs-plugin-template.git",
"directory": "packages/dayjs-plugin-template"
},
"bugs": {
"url": "https://github.com/spring-catponents/dayjs-plugin-template/issues",
"url": "https://github.com/neo-hack/dayjs-plugin-template/issues",
"email": "[email protected]"
},
"author": {
Expand All @@ -37,10 +38,10 @@
"update": "yarn update && yarn update --save-dev",
"check": "yarn outdated && npm outdated --save-dev",
"release": "yarn run build && np --no-cleanup --yolo --no-publish --any-branch",
"ci:publish": "pnpm run build && pnpx changeset publish",
"ci:version": "pnpx changeset version",
"ci:snapshot": "pnpx changeset version --snapshot beta",
"ci:prerelease": "pnpm run build && pnpx changeset publish --tag beta",
"ci:publish": "pnpm run build && pnpm changeset publish",
"ci:version": "pnpm changeset version",
"ci:snapshot": "pnpm changeset version --snapshot beta",
"ci:prerelease": "pnpm run build && pnpm changeset publish --tag beta",
"lint:fix": "eslint . --fix",
"prepare": "husky install"
},
Expand Down Expand Up @@ -80,7 +81,7 @@
"rollup": "2.53.2",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-exclude-dependencies-from-bundle": "^1.1.20",
"rollup-plugin-typescript2": "0.30.0",
"rollup-plugin-typescript2": "0.31.0",
"ts-jest": "27.0.3",
"ts-node": "10.1.0",
"typescript": "^4.3.5"
Expand All @@ -89,6 +90,5 @@
"commitizen": {
"path": "cz-emoji"
}
},
"gitHead": "d910fbb93885faf57a68b0caef84335c60358b8c"
}
}
Loading

0 comments on commit 74eb02b

Please sign in to comment.