Skip to content

Commit 74eb02b

Browse files
authored
🐛 load tslib failed on node18 (#3)
* 🐛 load tslib failed on node18 ezolenko/rollup-plugin-typescript2#286 Closes #2 * 💚 pnpm@7 and pnpm cache * 📝 repo url * 💚 remove node14 & node12 support
1 parent 12b97ef commit 74eb02b

File tree

8 files changed

+228
-73
lines changed

8 files changed

+228
-73
lines changed

.changeset/tame-garlics-rest.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@aiou/dayjs-plugin-template": patch
3+
---
4+
5+
fix load tslib failed on node18

.github/workflows/ci.yml

+19-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [12.x, 14.x, 16.x]
15+
node-version: [16.x, 18.x]
1616

1717
steps:
1818
- name: checkout code repository
@@ -23,9 +23,24 @@ jobs:
2323
uses: actions/setup-node@v1
2424
with:
2525
node-version: ${{ matrix.node-version }}
26-
- name: Install pnpm
27-
run: npm i pnpm@latest -g
28-
- name: Install
26+
- uses: pnpm/action-setup@v2
27+
name: Install pnpm
28+
id: pnpm-install
29+
with:
30+
run_install: false
31+
- name: Get pnpm store directory
32+
id: pnpm-cache
33+
shell: bash
34+
run: |
35+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
36+
- uses: actions/cache@v3
37+
name: Setup pnpm cache
38+
with:
39+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
43+
- name: Install
2944
run: |
3045
pnpm install --frozen-lockfile=false
3146
- name: Test

.github/workflows/release.yml

+22-6
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,29 @@ jobs:
1919
- name: setup node.js
2020
uses: actions/setup-node@v2
2121
with:
22-
node-version: 14
23-
- name: install pnpm
24-
run: npm i pnpm@latest -g
25-
- name: install dependencies
26-
run: pnpm install --frozen-lockfile=false
22+
node-version: 16
23+
- uses: pnpm/action-setup@v2
24+
name: Install pnpm
25+
id: pnpm-install
26+
with:
27+
run_install: false
28+
- name: Get pnpm store directory
29+
id: pnpm-cache
30+
shell: bash
31+
run: |
32+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
33+
- uses: actions/cache@v3
34+
name: Setup pnpm cache
35+
with:
36+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
40+
- name: Install
41+
run: |
42+
pnpm install --frozen-lockfile=false
2743
- name: create and publish versions
28-
uses: changesets/action@master
44+
uses: changesets/action@v1
2945
with:
3046
version: pnpm ci:version
3147
commit: "chore: update versions"

.github/workflows/snapshot-release.yml

+33-11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- snapshot
6+
- 'hotfix/**'
67
env:
78
CI: true
89
jobs:
@@ -17,18 +18,39 @@ jobs:
1718
- name: setup node.js
1819
uses: actions/setup-node@v2
1920
with:
20-
node-version: 14
21-
- name: install pnpm
22-
run: npm i pnpm@latest -g
23-
- name: install dependencies
24-
run: pnpm install --frozen-lockfile=false
25-
- name: create and publish versions
26-
uses: changesets/action@master
21+
node-version: 16
22+
- uses: pnpm/action-setup@v2
23+
name: Install pnpm
24+
id: pnpm-install
25+
with:
26+
run_install: false
27+
- name: Get pnpm store directory
28+
id: pnpm-cache
29+
shell: bash
30+
run: |
31+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
32+
- uses: actions/cache@v3
33+
name: Setup pnpm cache
2734
with:
28-
version: pnpm ci:snapshot
29-
commit: "chore: update versions"
30-
title: "chore: update versions"
31-
publish: pnpm ci:prerelease
35+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
39+
- name: Install
40+
run: |
41+
pnpm install --frozen-lockfile=false
42+
- name: Creating .npmrc
43+
run: |
44+
cat << EOF > "$HOME/.npmrc"
45+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
46+
EOF
47+
env:
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
- name: create and publish versions
50+
run: |
51+
pnpm ci:snapshot
52+
pnpm changeset pre enter snapshot
53+
pnpm ci:prerelease
3254
env:
3355
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3456
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
pnpx lint-staged
4+
pnpm lint-staged

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# @aiou/dayjs-plugin-template
22
*build dayjs plugin lib*
33

4-
[![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)
4+
[![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)
55

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

88
## features
99

package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@aiou/dayjs-plugin-template",
33
"version": "1.1.0",
44
"description": "dayjs plugin template",
5+
"packageManager": "[email protected]",
56
"keywords": [
67
"dayjs",
78
"dayjs-plugin",
@@ -10,14 +11,14 @@
1011
"aiou"
1112
],
1213
"license": "MIT",
13-
"homepage": "https://github.com/spring-catponents/dayjs-plugin-template#readme",
14+
"homepage": "https://github.com/neo-hack/dayjs-plugin-template#readme",
1415
"repository": {
1516
"type": "git",
16-
"url": "git+https://github.com/spring-catponents/dayjs-plugin-template.git",
17+
"url": "git+https://github.com/neo-hack/dayjs-plugin-template.git",
1718
"directory": "packages/dayjs-plugin-template"
1819
},
1920
"bugs": {
20-
"url": "https://github.com/spring-catponents/dayjs-plugin-template/issues",
21+
"url": "https://github.com/neo-hack/dayjs-plugin-template/issues",
2122
"email": "[email protected]"
2223
},
2324
"author": {
@@ -37,10 +38,10 @@
3738
"update": "yarn update && yarn update --save-dev",
3839
"check": "yarn outdated && npm outdated --save-dev",
3940
"release": "yarn run build && np --no-cleanup --yolo --no-publish --any-branch",
40-
"ci:publish": "pnpm run build && pnpx changeset publish",
41-
"ci:version": "pnpx changeset version",
42-
"ci:snapshot": "pnpx changeset version --snapshot beta",
43-
"ci:prerelease": "pnpm run build && pnpx changeset publish --tag beta",
41+
"ci:publish": "pnpm run build && pnpm changeset publish",
42+
"ci:version": "pnpm changeset version",
43+
"ci:snapshot": "pnpm changeset version --snapshot beta",
44+
"ci:prerelease": "pnpm run build && pnpm changeset publish --tag beta",
4445
"lint:fix": "eslint . --fix",
4546
"prepare": "husky install"
4647
},
@@ -80,7 +81,7 @@
8081
"rollup": "2.53.2",
8182
"rollup-plugin-bundle-size": "^1.0.3",
8283
"rollup-plugin-exclude-dependencies-from-bundle": "^1.1.20",
83-
"rollup-plugin-typescript2": "0.30.0",
84+
"rollup-plugin-typescript2": "0.31.0",
8485
"ts-jest": "27.0.3",
8586
"ts-node": "10.1.0",
8687
"typescript": "^4.3.5"
@@ -89,6 +90,5 @@
8990
"commitizen": {
9091
"path": "cz-emoji"
9192
}
92-
},
93-
"gitHead": "d910fbb93885faf57a68b0caef84335c60358b8c"
93+
}
9494
}

0 commit comments

Comments
 (0)