diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 4285be1f..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "master" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript', 'typescript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs-3.x.yml similarity index 83% rename from .github/workflows/nodejs.yml rename to .github/workflows/nodejs-3.x.yml index 9e51f0d3..9628df73 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs-3.x.yml @@ -1,10 +1,10 @@ -name: CI +name: CI for 3.x on: push: - branches: [ master ] + branches: [ 3.x ] pull_request: - branches: [ master ] + branches: [ 3.x ] jobs: Job: diff --git a/.github/workflows/release.yml b/.github/workflows/release-3.x.yml similarity index 83% rename from .github/workflows/release.yml rename to .github/workflows/release-3.x.yml index 1c6cbb18..ce61a967 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-3.x.yml @@ -1,8 +1,8 @@ -name: Release +name: Release for 3.x on: push: - branches: [ master ] + branches: [ 3.x ] jobs: release: diff --git a/README.md b/README.md index ec5c9a63..cf521dfc 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ -# urllib +# urllib@3 [![NPM version][npm-image]][npm-url] -[![Node.js CI](https://github.com/node-modules/urllib/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/urllib/actions/workflows/nodejs.yml) +[![CI for 3.x](https://github.com/node-modules/urllib/actions/workflows/nodejs-3.x.yml/badge.svg?branch=3.x)](https://github.com/node-modules/urllib/actions/workflows/nodejs-3.x.yml) [![Test coverage][codecov-image]][codecov-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][download-url] -[npm-image]: https://img.shields.io/npm/v/urllib.svg?style=flat-square -[npm-url]: https://npmjs.org/package/urllib -[codecov-image]: https://codecov.io/gh/node-modules/urllib/branch/master/graph/badge.svg -[codecov-url]: https://codecov.io/gh/node-modules/urllib +[npm-image]: https://img.shields.io/npm/v/urllib/release-3.x.svg?style=flat-square +[npm-url]: https://npmjs.org/package/urllib/v/release-3.x +[codecov-image]: https://codecov.io/gh/node-modules/urllib/branch/3.x/graph/badge.svg +[codecov-url]: https://app.codecov.io/gh/node-modules/urllib/tree/3.x [snyk-image]: https://snyk.io/test/npm/urllib/badge.svg?style=flat-square [snyk-url]: https://snyk.io/test/npm/urllib [download-image]: https://img.shields.io/npm/dm/urllib.svg?style=flat-square -[download-url]: https://npmjs.org/package/urllib +[download-url]: https://npmjs.org/package/urllib/v/release-3.x Request HTTP URLs in a complex world — basic and digest authentication, redirections, timeout and more. @@ -21,7 +21,7 @@ and digest authentication, redirections, timeout and more. ## Install ```bash -npm install urllib +npm install urllib@3 ``` ## Usage @@ -283,6 +283,9 @@ Fork [undici benchmarks script](https://github.com/fengmk2/undici/blob/urllib-be | undici - stream | 45 | 12523.45 req/sec | ± 2.97 % | + 754.61 % | | undici - dispatch | 51 | 12970.18 req/sec | ± 3.15 % | + 785.10 % | +## License + +[MIT](LICENSE) @@ -301,7 +304,3 @@ Fork [undici benchmarks script](https://github.com/fengmk2/undici/blob/urllib-be This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Mon Dec 04 2023 00:13:39 GMT+0800`. - -## License - -[MIT](LICENSE) diff --git a/package.json b/package.json index cecb688a..bb51ae8b 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "urllib", "version": "3.25.1", "publishConfig": { - "tag": "latest" + "access": "public" }, - "description": "Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, cookies and more. Base undici fetch API.", + "description": "Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, timeout and more. Base undici API.", "keywords": [ "urllib", "http", @@ -40,7 +40,7 @@ "test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vitest run --test-timeout 180000 keep-alive-header.test.ts", "cov": "vitest run --coverage", "preci": "node scripts/pre_test.js", - "ci": "npm run lint && npm run cov && node scripts/build_test.js", + "ci": "npm run lint && npm run cov && node scripts/build_test.js && attw --pack", "contributor": "git-contributor", "clean": "rm -rf dist", "prepublishOnly": "npm run build" @@ -59,6 +59,7 @@ "ylru": "^1.3.2" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.15.3", "@tsconfig/node18": "^18.2.1", "@tsconfig/strictest": "^2.0.2", "@types/busboy": "^1.5.0",