forked from ladjs/supertest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support cjs and esm both by tshy (#1)
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** - Introduced a new `TestAgent` class for enhanced HTTP and HTTP/2 requests. - Added a new `Request` class to facilitate server requests. - Implemented a new `AssertError` class for improved error handling. - Created new GitHub Actions workflows for CI and package publishing. - **Documentation** - Updated the `README.md` to reflect rebranding to `@eggjs/supertest` and revised installation instructions. - **Bug Fixes** - Enhanced error handling and type safety in tests. - **Chores** - Removed outdated configuration files and unnecessary dependencies. - Updated TypeScript configuration for stricter type checking. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
24 changed files
with
834 additions
and
823 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
{ | ||
"extends": "airbnb-base/legacy", | ||
"env": { | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 6 | ||
}, | ||
"rules": { | ||
// disabled - disagree with airbnb | ||
"func-names": [0], | ||
"space-before-function-paren": [0], | ||
"consistent-return": [0], | ||
|
||
// Disabled but may want to refactor code eventually | ||
"no-use-before-define": [2, "nofunc"], | ||
"no-underscore-dangle": [0], | ||
|
||
// IMHO, more sensible overrides to existing airbnb error definitions | ||
"max-len": [2, 100, 4, {"ignoreComments": true, "ignoreUrls": true}], | ||
"no-unused-expressions": [2, { "allowShortCircuit": true, "allowTernary": true }] | ||
} | ||
"extends": [ | ||
"eslint-config-egg/typescript", | ||
"eslint-config-egg/lib/rules/enforce-node-prefix" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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: | ||
version: '18.19.0, 18, 20, 22, 23' | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
release: | ||
name: Node.js | ||
uses: eggjs/github-actions/.github/workflows/node-release.yml@master | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GIT_TOKEN: ${{ secrets.GIT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,7 @@ coverage | |
# Files # | ||
################### | ||
*.log | ||
.tshy* | ||
.eslintcache | ||
dist | ||
coverage |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
(The MIT License) | ||
|
||
Copyright (c) 2014 TJ Holowaychuk <[email protected]> | ||
Copyright (c) 2024-present eggjs and the contributors. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.