Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: full Node.js ESM runtime support
BREAKING CHANGE: umd builds are removed and all middleware imports are moved to `get-it/middleware`. Imports such as `import promise from 'get-it/lib-node/middleware/promise'` are no longer supported.
- Loading branch information
Showing
141 changed files
with
8,365 additions
and
18,812 deletions.
There are no files selected for viewing
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,7 +1,4 @@ | ||
/coverage | ||
/dist | ||
/lib | ||
/lib-node | ||
/umd | ||
# ESLint isn't configured to deal with ESM yet | ||
/test-esm |
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,37 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:prettier/recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
}, | ||
plugins: ['@typescript-eslint', 'simple-import-sort', 'prettier'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/member-delimiter-style': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'simple-import-sort/imports': 'warn', | ||
'simple-import-sort/exports': 'warn', | ||
'no-console': 'error', | ||
'no-shadow': 'error', | ||
'no-warning-comments': ['warn', {location: 'start', terms: ['todo', '@todo', 'fixme']}], | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ['**/*.js'], | ||
rules: { | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
}, | ||
}, | ||
], | ||
} |
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 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,24 @@ | ||
--- | ||
name: 'Lock Threads' | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 # v4 | ||
with: | ||
issue-inactive-days: 0 | ||
pr-inactive-days: 0 |
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,35 @@ | ||
--- | ||
name: Prettier | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run: | ||
name: 🤔 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 | ||
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 | ||
with: | ||
cache: npm | ||
node-version: lts/* | ||
- run: npm ci --ignore-scripts --only-dev | ||
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3 | ||
with: | ||
path: node_modules/.cache/prettier/.prettier-cache | ||
key: prettier-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.gitignore') }} | ||
- name: check if workflows needs prettier | ||
run: npx prettier --cache --check ".github/workflows/**/*.yml" || (echo "An action can't make changes to actions, you'll have to run prettier manually" && exit 1) | ||
- run: npx prettier --ignore-path .gitignore --cache --write . | ||
- uses: EndBug/add-and-commit@61a88be553afe4206585b31aa72387c64295d08b # tag=v9 | ||
with: | ||
default_author: github_actions | ||
commit: --no-verify | ||
message: 'chore(prettier): 🤖 ✨' |
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 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 @@ | ||
legacy-peer-deps=true |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.