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

使用 tshy 来默认支持 cjs 和 esm #5257

Open
fengmk2 opened this issue Sep 14, 2023 · 15 comments
Open

使用 tshy 来默认支持 cjs 和 esm #5257

fengmk2 opened this issue Sep 14, 2023 · 15 comments
Assignees

Comments

@fengmk2
Copy link
Member

fengmk2 commented Sep 14, 2023

请详细告知你的新点子(Nice Ideas):

node-modules/urllib#468 目前看起来没有什么问题,非常轻松就支持了。

修改内容

  • package.json
  "engines": {
    "node": ">= 18.19.0"
  },
  "devDependencies": {
    "@arethetypeswrong/cli": "^0.17.1",
    "@eggjs/tsconfig": "1",
    "@types/node": "22",
    "@types/mocha": "10",
    "@eggjs/bin": "7",
    "eslint": "8",
    "eslint-config-egg": "14",
    "rimraf": "6",
    "tshy": "3",
    "tshy-after": "1",
    "typescript": "5"
  },
  "scripts": {
    "lint": "eslint --cache src test --ext .ts",
    "pretest": "npm run clean && npm run lint -- --fix",
    "test": "egg-bin test",
    "preci": "npm run clean &&  npm run lint",
    "ci": "egg-bin cov",
    "postci": "npm run prepublishOnly && npm run clean",
    "clean": "rimraf dist",
    "prepublishOnly": "tshy && tshy-after && attw --pack"
  },
  "type": "module",
  "tshy": {
    "exports": {
      ".": "./src/index.ts",
      "./package.json": "./package.json"
    }
  },
  "exports": {
    ".": {
      "import": {
        "types": "./dist/esm/index.d.ts",
        "default": "./dist/esm/index.js"
      },
      "require": {
        "types": "./dist/commonjs/index.d.ts",
        "default": "./dist/commonjs/index.js"
      }
    },
    "./package.json": "./package.json"
  },
  "files": [
    "dist",
    "src"
  ],
  "types": "./dist/commonjs/index.d.ts",
  "main": "./dist/commonjs/index.js"

插件配置

"eggPlugin": {
    "name": "development",
    "env": [
      "local"
    ],
    "dependencies": [
      "watcher"
    ],
    "exports": {
      "import": "./dist/esm",
      "require": "./dist/commonjs",
      "typescript": "./src"
    }
  },
  • pr welcome
[![Node.js Version](https://img.shields.io/node/v/{pkgName}.svg?style=flat)](https://nodejs.org/en/download/)

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)

![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/eggjs/:repo)
  • contributors
## Contributors

[![Contributors](https://contrib.rocks/image?repo={group/repo})](https://github.com/{group/repo}/graphs/contributors)

Made with [contributors-img](https://contrib.rocks).
  • commit log
feat: support cjs and esm both by tshy

BREAKING CHANGE: drop Node.js < 18.19.0 support

part of https://github.com/eggjs/egg/issues/3644

https://github.com/eggjs/egg/issues/5257
  • __dirname 单测中的 helper 方法

test/helper.ts

import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export function getFixtures(filename: string) {
  return path.join(__dirname, filename);
}
  • 获取代码根目录
export function getSourceDirname() {
  if (typeof __dirname === 'string') {
    return __dirname;
  }
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
  // @ts-ignore
  const __filename = fileURLToPath(import.meta.url);
  return path.dirname(__filename);
}
  • .github/workflows/nodejs.yml
name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  Job:
    name: Node.js
    uses: node-modules/github-actions/.github/workflows/node-test.yml@master
    with:
      os: 'ubuntu-latest, macos-latest, windows-latest'
      version: '18.19.0, 18, 20, 22'
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
  • .github/workflows/release.yml
name: Release

on:
  push:
    branches: [ master ]

jobs:
  release:
    name: Node.js
    uses: node-modules/github-actions/.github/workflows/node-release.yml@master
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
      GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
  • .github/workflows/pkg.pr.new.yml
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
  • tsconfig.json
{
  "extends": "@eggjs/tsconfig",
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true,
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext"
  }
}
  • .eslintrc
{
  "extends": [
    "eslint-config-egg/typescript",
    "eslint-config-egg/lib/rules/enforce-node-prefix"
  ]
}
  • .gitignore
.tshy*
.eslintcache
dist
coverage

Sub Error

export class ClusterAgentWorkerError extends Error {
  id: number;
  /**
   * pid in process mode
   * tid in worker_threads mode
   */
  workerId: number;
  status: string;

  constructor(id: number, workerId: number, status: string, error: Error) {
    const message = `Got agent worker error: ${error.message}`;
    super(message, { cause: error });
    this.name = this.constructor.name;
    this.id = id;
    this.workerId = workerId;
    this.status = status;
    Error.captureStackTrace(this, this.constructor);
  }
}
@fengmk2 fengmk2 self-assigned this Sep 14, 2023
@fengmk2
Copy link
Member Author

fengmk2 commented Sep 15, 2023

node-modules/is-type-of#22
eggjs/bin#239 egg-bin 需要支持 esm 跑 test 和 cov

@fengmk2
Copy link
Member Author

fengmk2 commented Sep 16, 2023

@fengmk2
Copy link
Member Author

fengmk2 commented Sep 17, 2023

通过 https://github.com/node-modules/tshy-after 保留 package.json types 配置。

@fengmk2
Copy link
Member Author

fengmk2 commented Sep 22, 2023

node-modules/address#37

fengmk2 added a commit to node-modules/node-homedir that referenced this issue Oct 5, 2023
BREAKING CHANGE: Drop Node.js < 16 support

eggjs/egg#5257
@fengmk2
Copy link
Member Author

fengmk2 commented Oct 5, 2023

fengmk2 added a commit to node-modules/node-homedir that referenced this issue Oct 5, 2023
BREAKING CHANGE: Drop Node.js < 16 support

eggjs/egg#5257
fengmk2 pushed a commit to node-modules/node-homedir that referenced this issue Oct 5, 2023
[skip ci]

## [2.0.0](v1.1.1...v2.0.0) (2023-10-05)

### ⚠ BREAKING CHANGES

* Drop Node.js < 16 support

eggjs/egg#5257

### Features

* refactor with typescript ([#7](#7)) ([9e2a9ff](9e2a9ff))
@fengmk2
Copy link
Member Author

fengmk2 commented Oct 5, 2023

fengmk2 added a commit to node-modules/oss-client that referenced this issue Oct 5, 2023
BREAKING CHANGE: Drop Node.js < 16 support

Other BREAKING changes:
- remove stsToken support
- remove headerEncoding support
- remove Bucket, Image Client support

eggjs/egg#5257
fengmk2 pushed a commit to node-modules/oss-client that referenced this issue Oct 5, 2023
[skip ci]

## [2.0.0](v1.2.6...v2.0.0) (2023-10-05)

### ⚠ BREAKING CHANGES

* Drop Node.js < 16 support

Other BREAKING changes:
- remove stsToken support
- remove headerEncoding support
- remove Bucket, Image Client support

eggjs/egg#5257

### Features

* refactor with typescript ([#12](#12)) ([5a0eb01](5a0eb01))
@fengmk2
Copy link
Member Author

fengmk2 commented Oct 10, 2023

fengmk2 added a commit to node-modules/get-ready that referenced this issue Oct 10, 2023
fengmk2 added a commit to node-modules/get-ready that referenced this issue Oct 10, 2023
fengmk2 pushed a commit to node-modules/ready-callback that referenced this issue Oct 11, 2023
BREAKING CHANGE: Drop Node.js < 16 support

closes #116

part of eggjs/egg#5257

---------

Co-authored-by: hanquliu <[email protected]>
fengmk2 pushed a commit to node-modules/ready-callback that referenced this issue Oct 11, 2023
[skip ci]

## [4.0.0](v3.0.0...v4.0.0) (2023-10-11)

### ⚠ BREAKING CHANGES

* Drop Node.js < 16 support

closes #116

part of eggjs/egg#5257

### Features

* refactor with typescript to support esm and cjs both ([#117](#117)) ([7193ec1](7193ec1))
@fengmk2 fengmk2 pinned this issue Oct 14, 2023
fengmk2 added a commit to eggjs/egg-cors that referenced this issue Dec 11, 2023
BREAKING CHANGE: drop Node.js < 14

deps: use @koa/[email protected]

eggjs/egg#5257
fengmk2 added a commit to eggjs/egg-cors that referenced this issue Dec 11, 2023
BREAKING CHANGE: drop Node.js < 16

deps: use @koa/[email protected]

eggjs/egg#5257
fengmk2 added a commit to eggjs/egg-cors that referenced this issue Dec 11, 2023
BREAKING CHANGE: drop Node.js < 16

deps: use @koa/[email protected]

eggjs/egg#5257
fengmk2 added a commit to eggjs/egg-cors that referenced this issue Dec 11, 2023
BREAKING CHANGE: drop Node.js < 14

eggjs/egg#5257
fengmk2 pushed a commit to eggjs/jsonp that referenced this issue Jan 11, 2025
[skip ci]

## [3.0.0](v2.0.0...v3.0.0) (2025-01-11)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
  - Added TypeScript support for the JSONP plugin
  - Modernized project structure with ES module syntax
  - Enhanced type definitions and configuration
  - Introduced new GitHub Actions workflows for CI/CD
  - Added a new class for JSONP error handling

- **Breaking Changes**
  - Renamed package from `egg-jsonp` to `@eggjs/jsonp`
  - Dropped support for Node.js versions below 18.19.0
  - Refactored configuration and middleware approach

- **Improvements**
  - Updated GitHub Actions workflows for CI/CD
  - Improved security checks for JSONP requests
  - Added more robust error handling
  - Enhanced logging configuration

- **Dependency Updates**
  - Updated core dependencies
  - Migrated to modern TypeScript tooling
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

### Features

* support cjs and esm both by tshy ([#12](#12)) ([9136768](9136768))
fengmk2 added a commit to eggjs/i18n that referenced this issue Jan 11, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/i18n that referenced this issue Jan 11, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

Based on the comprehensive changes, here are the updated release notes:

- **New Features**
  - Migrated package to TypeScript with improved type safety.
- Enhanced internationalization (i18n) support with more flexible
configuration.
  - Added comprehensive GitHub Actions workflows for CI/CD.

- **Improvements**
  - Updated Node.js compatibility to version 18.19.0+.
  - Modernized module system with ES module support.
  - Refined configuration and localization mechanisms.

- **Breaking Changes**
  - Package renamed from `egg-i18n` to `@eggjs/i18n`.
  - Switched from CommonJS to ES module syntax.
  - Removed legacy configuration files and testing infrastructure.

- **Chores**
  - Cleaned up and simplified project structure.
  - Updated dependencies and development tooling.
  - Improved documentation and README.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fengmk2 pushed a commit to eggjs/i18n that referenced this issue Jan 11, 2025
[skip ci]

## [3.0.0](v2.1.1...v3.0.0) (2025-01-11)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

Based on the comprehensive changes, here are the updated release notes:

- **New Features**
  - Migrated package to TypeScript with improved type safety.
- Enhanced internationalization (i18n) support with more flexible
configuration.
  - Added comprehensive GitHub Actions workflows for CI/CD.

- **Improvements**
  - Updated Node.js compatibility to version 18.19.0+.
  - Modernized module system with ES module support.
  - Refined configuration and localization mechanisms.

- **Breaking Changes**
  - Package renamed from `egg-i18n` to `@eggjs/i18n`.
  - Switched from CommonJS to ES module syntax.
  - Removed legacy configuration files and testing infrastructure.

- **Chores**
  - Cleaned up and simplified project structure.
  - Updated dependencies and development tooling.
  - Improved documentation and README.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

### Features

* support cjs and esm both by tshy ([#14](#14)) ([ccc8eaa](ccc8eaa))
fengmk2 added a commit to eggjs/koa-static-cache that referenced this issue Jan 12, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/koa-static-cache that referenced this issue Jan 12, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
	- Added static cache middleware for Koa.
	- Introduced TypeScript support for the package.
	- Implemented comprehensive configuration for package management.

- **Infrastructure**
	- Updated GitHub Actions workflows for CI/CD.
	- Added ESLint configuration.
	- Updated project build and testing configurations.

- **Documentation**
	- Refreshed README with new badges and installation instructions.
	- Updated package description and licensing.

- **Maintenance**
	- Upgraded Node.js engine support to version 18.19.0+.
	- Migrated package to `@eggjs/koa-static-cache`.
	- Removed legacy Travis CI configuration.
	- Added new TypeScript configuration file.
- Removed unnecessary files and configurations, streamlining the project
structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fengmk2 pushed a commit to eggjs/koa-static-cache that referenced this issue Jan 12, 2025
[skip ci]

## [6.0.0](v5.1.4...v6.0.0) (2025-01-12)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
	- Added static cache middleware for Koa.
	- Introduced TypeScript support for the package.
	- Implemented comprehensive configuration for package management.

- **Infrastructure**
	- Updated GitHub Actions workflows for CI/CD.
	- Added ESLint configuration.
	- Updated project build and testing configurations.

- **Documentation**
	- Refreshed README with new badges and installation instructions.
	- Updated package description and licensing.

- **Maintenance**
	- Upgraded Node.js engine support to version 18.19.0+.
	- Migrated package to `@eggjs/koa-static-cache`.
	- Removed legacy Travis CI configuration.
	- Added new TypeScript configuration file.
- Removed unnecessary files and configurations, streamlining the project
structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

### Features

* support cjs and esm both by tshy ([#1](#1)) ([b0524d9](b0524d9))
fengmk2 added a commit to eggjs/static that referenced this issue Jan 12, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/static that referenced this issue Jan 12, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Updated package to `@eggjs/static`
	- Enhanced TypeScript support
	- Improved static file serving configuration

- **Chores**
	- Updated GitHub Actions workflows
	- Modernized project configuration
	- Updated Node.js version support to 18.19.0, 20, and 22

- **Documentation**
	- Updated README with new package details
	- Simplified changelog and documentation

- **Refactor**
	- Migrated from CommonJS to ES modules
	- Restructured project file organization

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fengmk2 pushed a commit to eggjs/static that referenced this issue Jan 12, 2025
[skip ci]

## [3.0.0](v2.3.1...v3.0.0) (2025-01-12)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Updated package to `@eggjs/static`
	- Enhanced TypeScript support
	- Improved static file serving configuration

- **Chores**
	- Updated GitHub Actions workflows
	- Modernized project configuration
	- Updated Node.js version support to 18.19.0, 20, and 22

- **Documentation**
	- Updated README with new package details
	- Simplified changelog and documentation

- **Refactor**
	- Migrated from CommonJS to ES modules
	- Restructured project file organization

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

### Features

* support cjs and esm both by tshy ([#26](#26)) ([ab7d6fb](ab7d6fb))
fengmk2 added a commit to eggjs/security that referenced this issue Jan 14, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/security that referenced this issue Jan 17, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

Based on the comprehensive changes, here are the updated release notes:

- **New Features**
	- Migrated security plugin to TypeScript.
	- Enhanced type safety for security configurations.
	- Improved middleware and helper utilities.
- Introduced new middleware for handling `Strict-Transport-Security`,
`X-Frame-Options`, and `X-XSS-Protection` headers.
	- Added support for new security configurations and helper functions.

- **Breaking Changes**
	- Renamed package from `egg-security` to `@eggjs/security`.
	- Dropped support for Node.js versions below 18.19.0.
	- Restructured module exports and configurations.
	- Removed several deprecated middleware and utility functions.

- **Security Improvements**
	- Updated CSRF, XSS, and SSRF protection mechanisms.
	- Enhanced middleware for handling security headers.
	- Refined configuration options for various security features.

- **Performance**
	- Modernized codebase with ES module syntax.
	- Improved type definitions and module structure.
- Enhanced test suite with TypeScript support and better resource
management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
fengmk2 pushed a commit to eggjs/security that referenced this issue Jan 17, 2025
[skip ci]

## [4.0.0](v3.7.0...v4.0.0) (2025-01-17)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

Based on the comprehensive changes, here are the updated release notes:

- **New Features**
	- Migrated security plugin to TypeScript.
	- Enhanced type safety for security configurations.
	- Improved middleware and helper utilities.
- Introduced new middleware for handling `Strict-Transport-Security`,
`X-Frame-Options`, and `X-XSS-Protection` headers.
	- Added support for new security configurations and helper functions.

- **Breaking Changes**
	- Renamed package from `egg-security` to `@eggjs/security`.
	- Dropped support for Node.js versions below 18.19.0.
	- Restructured module exports and configurations.
	- Removed several deprecated middleware and utility functions.

- **Security Improvements**
	- Updated CSRF, XSS, and SSRF protection mechanisms.
	- Enhanced middleware for handling security headers.
	- Refined configuration options for various security features.

- **Performance**
	- Modernized codebase with ES module syntax.
	- Improved type definitions and module structure.
- Enhanced test suite with TypeScript support and better resource
management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

### Features

* support cjs and esm both by tshy ([#101](#101)) ([a11661f](a11661f))
fengmk2 added a commit to eggjs/session that referenced this issue Jan 19, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/session that referenced this issue Jan 19, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **Package Upgrade**
	- Renamed package from `egg-session` to `@eggjs/session`
	- Updated Node.js compatibility to version 18.19.0+

- **New Features**
	- Enhanced session configuration with improved type safety
	- Added support for more granular session management
	- Improved logging and security configurations

- **Breaking Changes**
	- Dropped support for Node.js versions below 18.19.0
	- Migrated from generator functions to async/await syntax
	- Updated session middleware and configuration structure

- **Performance**
	- Updated dependencies, including `koa-session` to version 7.0.2
	- Optimized session store handling

- **Security**
	- Strengthened default session configurations
	- Added warnings for potential security risks in session settings
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fengmk2 pushed a commit to eggjs/session that referenced this issue Jan 19, 2025
[skip ci]

## [4.0.0](v3.3.0...v4.0.0) (2025-01-19)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **Package Upgrade**
	- Renamed package from `egg-session` to `@eggjs/session`
	- Updated Node.js compatibility to version 18.19.0+

- **New Features**
	- Enhanced session configuration with improved type safety
	- Added support for more granular session management
	- Improved logging and security configurations

- **Breaking Changes**
	- Dropped support for Node.js versions below 18.19.0
	- Migrated from generator functions to async/await syntax
	- Updated session middleware and configuration structure

- **Performance**
	- Updated dependencies, including `koa-session` to version 7.0.2
	- Optimized session store handling

- **Security**
	- Strengthened default session configurations
	- Added warnings for potential security risks in session settings
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

### Features

* support cjs and esm both by tshy ([#20](#20)) ([b1a96e5](b1a96e5))
fengmk2 added a commit to eggjs/redis that referenced this issue Jan 21, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/redis that referenced this issue Jan 21, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/redis that referenced this issue Jan 21, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

Here are the release notes for this update:

- **New Features**
	- Updated Redis plugin to support Valkey and Redis
	- Added support for Node.js 18.19.0 and newer versions
	- Enhanced TypeScript configuration and type definitions

- **Breaking Changes**
	- Renamed package from `egg-redis` to `@eggjs/redis`
	- Migrated from generator functions to async/await syntax
	- Updated minimum Node.js version requirement to 18.19.0

- **Improvements**
	- Improved Redis client configuration options
	- Enhanced module compatibility with ES modules
	- Updated dependencies and plugin configuration

- **Bug Fixes**
	- Refined Redis connection and initialization process
	- Improved error handling and logging for Redis connections

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fengmk2 pushed a commit to eggjs/redis that referenced this issue Jan 21, 2025
[skip ci]

## [3.0.0](v2.6.1...v3.0.0) (2025-01-21)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

Here are the release notes for this update:

- **New Features**
	- Updated Redis plugin to support Valkey and Redis
	- Added support for Node.js 18.19.0 and newer versions
	- Enhanced TypeScript configuration and type definitions

- **Breaking Changes**
	- Renamed package from `egg-redis` to `@eggjs/redis`
	- Migrated from generator functions to async/await syntax
	- Updated minimum Node.js version requirement to 18.19.0

- **Improvements**
	- Improved Redis client configuration options
	- Enhanced module compatibility with ES modules
	- Updated dependencies and plugin configuration

- **Bug Fixes**
	- Refined Redis connection and initialization process
	- Improved error handling and logging for Redis connections

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

### Features

* support cjs and esm both by tshy ([#44](#44)) ([ceadd9d](ceadd9d))
fengmk2 added a commit to eggjs/session-redis that referenced this issue Jan 21, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 added a commit to eggjs/session-redis that referenced this issue Jan 21, 2025
BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
fengmk2 pushed a commit to eggjs/session-redis that referenced this issue Jan 21, 2025
[skip ci]

## [3.0.0](v2.1.0...v3.0.0) (2025-01-21)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

### Features

* support cjs and esm both by tshy ([#8](#8)) ([eded033](eded033))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

2 participants