Skip to content

Commit 65c449a

Browse files
committed
feat: support cjs and esm both by tshy
BREAKING CHANGE: drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257
1 parent 3cbec9f commit 65c449a

16 files changed

+362
-517
lines changed

.eslintrc

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "eslint-config-egg"
3-
}
2+
"extends": [
3+
"eslint-config-egg/typescript",
4+
"eslint-config-egg/lib/rules/enforce-node-prefix"
5+
]
6+
}

.github/workflows/codeql.yml

-74
This file was deleted.

.github/workflows/nodejs.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ name: CI
33
on:
44
push:
55
branches: [ master ]
6-
76
pull_request:
87
branches: [ master ]
98

10-
workflow_dispatch: {}
11-
129
jobs:
1310
Job:
1411
name: Node.js
15-
uses: artusjs/github-actions/.github/workflows/node-test.yml@v1
12+
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
1613
with:
1714
os: 'ubuntu-latest'
18-
version: '14, 16, 18'
15+
version: '18.19.0, 18, 20, 22'

.github/workflows/pkg.pr.new.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish Any Commit
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v4
11+
12+
- run: corepack enable
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
17+
- name: Install dependencies
18+
run: npm install
19+
20+
- name: Build
21+
run: npm run prepublishOnly --if-present
22+
23+
- run: npx pkg-pr-new publish

.github/workflows/release.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
name: Release
22

33
on:
4-
# 合并后自动发布
54
push:
65
branches: [ master ]
76

8-
# 手动发布
9-
workflow_dispatch: {}
10-
117
jobs:
128
release:
139
name: Node.js
14-
uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
10+
uses: node-modules/github-actions/.github/workflows/node-release.yml@master
1511
secrets:
1612
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1713
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
18-
with:
19-
checkTest: false

.gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
*.pid
77
*.gz
88

9-
coverage.html
10-
coverage/
11-
cov/
12-
139
node_modules
1410

1511
dump.rdb
1612
.DS_Store
1713

1814
test/fixtures/**/*.js
15+
.tshy*
16+
.eslintcache
17+
dist
18+
coverage
19+
package-lock.json

CHANGELOG.md

+114
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,117 @@
66
### Bug Fixes
77

88
* auto release on action ([#22](https://github.com/node-modules/sdk-base/issues/22)) ([e74df48](https://github.com/node-modules/sdk-base/commit/e74df4885a74fa99e935323a858e7f6c4447cc97))
9+
10+
---
11+
12+
13+
4.2.0 / 2022-12-09
14+
==================
15+
16+
**features**
17+
* [[`71d7ddd`](http://github.com/node-modules/sdk-base/commit/71d7ddd0c98f0c3c6ead65e1741ed5c54bd0eb38)] - 📦 NEW: Support localStorage getter (#21) (fengmk2 <<[email protected]>>)
18+
19+
4.1.0 / 2022-12-03
20+
==================
21+
22+
**features**
23+
* [[`6e8a1c4`](http://github.com/node-modules/sdk-base/commit/6e8a1c4707908b28cc30a6019f164544c9033bb7)] - 📦 NEW: Support ready or timeout detect (#20) (fengmk2 <<[email protected]>>)
24+
25+
4.0.0 / 2022-12-03
26+
==================
27+
28+
**features**
29+
* [[`567a380`](http://github.com/node-modules/sdk-base/commit/567a3806e348549f40fedf3438054b53f540107e)] - 👌 IMPROVE: [BREAKING] Drop Node.js < 14 support (#19) (fengmk2 <<[email protected]>>)
30+
* [[`07d55e8`](http://github.com/node-modules/sdk-base/commit/07d55e8596ced9ecaea837a3ff8a56e87a333da8)] - feat: optimize performance (#18) (brizer <<[email protected]>>)
31+
32+
**others**
33+
* [[`e9bf6e9`](http://github.com/node-modules/sdk-base/commit/e9bf6e9e66570ac7c5e9537c22855573275d6618)] - refactor: enhance require profermance (#16) (zōng yǔ <<[email protected]>>)
34+
* [[`bbea174`](http://github.com/node-modules/sdk-base/commit/bbea174cebde7af79afdff50cd01eec3b5481fad)] - Create codeql.yml (fengmk2 <<[email protected]>>)
35+
36+
3.6.0 / 2019-04-24
37+
==================
38+
39+
**features**
40+
* [[`39c0f1d`](http://github.com/node-modules/sdk-base/commit/39c0f1d946bd7da1e393d42cca2f5e1bc22eb785)] - feat: implement close function (#17) (killa <<[email protected]>>)
41+
42+
3.5.1 / 2018-09-27
43+
==================
44+
45+
**fixes**
46+
* [[`de262c1`](http://github.com/node-modules/sdk-base/commit/de262c1e41e65a5fb11e95a95f96c6c561cb9d23)] - fix(ts): support es module export (#15) (Haoliang Gao <<[email protected]>>)
47+
48+
3.5.0 / 2018-07-26
49+
==================
50+
51+
**features**
52+
* [[`dcce360`](http://github.com/node-modules/sdk-base/commit/dcce360d5da6a3f0516c2329c1902c49221ffd29)] - feat: add typescript definition file (#14) (Angela <<[email protected]>>)
53+
54+
**others**
55+
* [[`f975763`](http://github.com/node-modules/sdk-base/commit/f975763047a461fc8d0758f08dd52e16078f5bc9)] - chore: release 3.4.0 (xiaochen.gaoxc <<[email protected]>>),
56+
57+
3.4.0 / 2017-11-24
58+
==================
59+
60+
**features**
61+
* [[`98207ba`]](https://github.com/node-modules/sdk-base/pull/11/commits/98207ba521487df39f7c9b116aaf7163bb6b9ad8) - feat: add awaitFirst api (#11) (gxcsoccer <<[email protected]>>)
62+
63+
3.3.0 / 2017-09-17
64+
==================
65+
66+
**features**
67+
* [[`8d5c04a`](http://github.com/node-modules/sdk-base/commit/8d5c04aa3b0fee135dcf972b447aba0f79f56417)] - feat: add isReady getter (#10) (fengmk2 <<[email protected]>>)
68+
69+
**others**
70+
* [[`6ec435f`](http://github.com/node-modules/sdk-base/commit/6ec435f676395726ff64646518b55c7c8ff4bc45)] - chore: fix initMethod document description (fengmk2 <<[email protected]>>)
71+
72+
3.2.0 / 2017-06-26
73+
==================
74+
75+
* feat: let options.initMethod support functions that return promise (#9)
76+
77+
3.1.1 / 2017-03-14
78+
==================
79+
80+
* fix: avoid duplicate error handler (#8)
81+
82+
3.1.0 / 2017-02-17
83+
==================
84+
85+
* feat: support client.await (#7)
86+
87+
3.0.1 / 2017-01-12
88+
==================
89+
90+
* fix: initMethod should be lazy executed (#6)
91+
92+
3.0.0 / 2017-01-12
93+
==================
94+
95+
* feat: [BREAKING_CHANGE] add ready with error and generator listener (#5)
96+
97+
2.0.1 / 2016-03-11
98+
==================
99+
100+
* fix: use event.listeners
101+
102+
2.0.0 / 2016-03-11
103+
==================
104+
105+
* refactor: listen on error synchronous
106+
107+
1.1.0 / 2015-11-14
108+
==================
109+
110+
* refactor: drop 0.8 support
111+
* feat: support ready(flagOrFunction)
112+
113+
1.0.1 / 2014-11-06
114+
==================
115+
116+
* remove .npmignore
117+
* add __filename, always show construct name
118+
* more pretty
119+
* refine error display
120+
* refactor(error): improve default error handler
121+
* fix travis
122+
* fix link

History.md

-111
This file was deleted.

0 commit comments

Comments
 (0)