Skip to content

Commit

Permalink
feat: support cjs and esm both by tshy (#23)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
  • Loading branch information
fengmk2 authored Dec 18, 2024
1 parent 3cbec9f commit cde6773
Show file tree
Hide file tree
Showing 17 changed files with 565 additions and 818 deletions.
7 changes: 5 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "eslint-config-egg"
}
"extends": [
"eslint-config-egg/typescript",
"eslint-config-egg/lib/rules/enforce-node-prefix"
]
}
74 changes: 0 additions & 74 deletions .github/workflows/codeql.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ name: CI
on:
push:
branches: [ master ]

pull_request:
branches: [ master ]

workflow_dispatch: {}

jobs:
Job:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-test.yml@v1
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
version: '14, 16, 18'
version: '18.19.0, 18, 20, 22'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Any Commit
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install

- name: Build
run: npm run prepublishOnly --if-present

- run: npx pkg-pr-new publish
8 changes: 1 addition & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
name: Release

on:
# 合并后自动发布
push:
branches: [ master ]

# 手动发布
workflow_dispatch: {}

jobs:
release:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
uses: node-modules/github-actions/.github/workflows/node-release.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
checkTest: false
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
*.pid
*.gz

coverage.html
coverage/
cov/

node_modules

dump.rdb
.DS_Store

test/fixtures/**/*.js
.tshy*
.eslintcache
dist
coverage
package-lock.json
114 changes: 114 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,117 @@
### Bug Fixes

* auto release on action ([#22](https://github.com/node-modules/sdk-base/issues/22)) ([e74df48](https://github.com/node-modules/sdk-base/commit/e74df4885a74fa99e935323a858e7f6c4447cc97))

---


4.2.0 / 2022-12-09
==================

**features**
* [[`71d7ddd`](http://github.com/node-modules/sdk-base/commit/71d7ddd0c98f0c3c6ead65e1741ed5c54bd0eb38)] - 📦 NEW: Support localStorage getter (#21) (fengmk2 <<[email protected]>>)

4.1.0 / 2022-12-03
==================

**features**
* [[`6e8a1c4`](http://github.com/node-modules/sdk-base/commit/6e8a1c4707908b28cc30a6019f164544c9033bb7)] - 📦 NEW: Support ready or timeout detect (#20) (fengmk2 <<[email protected]>>)

4.0.0 / 2022-12-03
==================

**features**
* [[`567a380`](http://github.com/node-modules/sdk-base/commit/567a3806e348549f40fedf3438054b53f540107e)] - 👌 IMPROVE: [BREAKING] Drop Node.js < 14 support (#19) (fengmk2 <<[email protected]>>)
* [[`07d55e8`](http://github.com/node-modules/sdk-base/commit/07d55e8596ced9ecaea837a3ff8a56e87a333da8)] - feat: optimize performance (#18) (brizer <<[email protected]>>)

**others**
* [[`e9bf6e9`](http://github.com/node-modules/sdk-base/commit/e9bf6e9e66570ac7c5e9537c22855573275d6618)] - refactor: enhance require profermance (#16) (zōng yǔ <<[email protected]>>)
* [[`bbea174`](http://github.com/node-modules/sdk-base/commit/bbea174cebde7af79afdff50cd01eec3b5481fad)] - Create codeql.yml (fengmk2 <<[email protected]>>)

3.6.0 / 2019-04-24
==================

**features**
* [[`39c0f1d`](http://github.com/node-modules/sdk-base/commit/39c0f1d946bd7da1e393d42cca2f5e1bc22eb785)] - feat: implement close function (#17) (killa <<[email protected]>>)

3.5.1 / 2018-09-27
==================

**fixes**
* [[`de262c1`](http://github.com/node-modules/sdk-base/commit/de262c1e41e65a5fb11e95a95f96c6c561cb9d23)] - fix(ts): support es module export (#15) (Haoliang Gao <<[email protected]>>)

3.5.0 / 2018-07-26
==================

**features**
* [[`dcce360`](http://github.com/node-modules/sdk-base/commit/dcce360d5da6a3f0516c2329c1902c49221ffd29)] - feat: add typescript definition file (#14) (Angela <<[email protected]>>)

**others**
* [[`f975763`](http://github.com/node-modules/sdk-base/commit/f975763047a461fc8d0758f08dd52e16078f5bc9)] - chore: release 3.4.0 (xiaochen.gaoxc <<[email protected]>>),

3.4.0 / 2017-11-24
==================

**features**
* [[`98207ba`]](https://github.com/node-modules/sdk-base/pull/11/commits/98207ba521487df39f7c9b116aaf7163bb6b9ad8) - feat: add awaitFirst api (#11) (gxcsoccer <<[email protected]>>)

3.3.0 / 2017-09-17
==================

**features**
* [[`8d5c04a`](http://github.com/node-modules/sdk-base/commit/8d5c04aa3b0fee135dcf972b447aba0f79f56417)] - feat: add isReady getter (#10) (fengmk2 <<[email protected]>>)

**others**
* [[`6ec435f`](http://github.com/node-modules/sdk-base/commit/6ec435f676395726ff64646518b55c7c8ff4bc45)] - chore: fix initMethod document description (fengmk2 <<[email protected]>>)

3.2.0 / 2017-06-26
==================

* feat: let options.initMethod support functions that return promise (#9)

3.1.1 / 2017-03-14
==================

* fix: avoid duplicate error handler (#8)

3.1.0 / 2017-02-17
==================

* feat: support client.await (#7)

3.0.1 / 2017-01-12
==================

* fix: initMethod should be lazy executed (#6)

3.0.0 / 2017-01-12
==================

* feat: [BREAKING_CHANGE] add ready with error and generator listener (#5)

2.0.1 / 2016-03-11
==================

* fix: use event.listeners

2.0.0 / 2016-03-11
==================

* refactor: listen on error synchronous

1.1.0 / 2015-11-14
==================

* refactor: drop 0.8 support
* feat: support ready(flagOrFunction)

1.0.1 / 2014-11-06
==================

* remove .npmignore
* add __filename, always show construct name
* more pretty
* refine error display
* refactor(error): improve default error handler
* fix travis
* fix link
111 changes: 0 additions & 111 deletions History.md

This file was deleted.

Loading

0 comments on commit cde6773

Please sign in to comment.