Skip to content

Commit 50656a8

Browse files
committed
feat!: update everything
BREAKING CHANGE: This package now requires Node.js 14 and is pure ESM
1 parent 87d01d2 commit 50656a8

16 files changed

+9199
-12903
lines changed

.eslintrc.cjs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
const { overrides } = require('@netlify/eslint-config-node')
2+
3+
module.exports = {
4+
extends: '@netlify/eslint-config-node',
5+
parserOptions: {
6+
sourceType: 'module',
7+
},
8+
rules: {
9+
'func-style': ['error', 'declaration'],
10+
complexity: 'off',
11+
'import/extensions': ['error', 'ignorePackages'],
12+
'max-lines': 'off',
13+
'n/no-missing-import': 'off',
14+
'no-magic-numbers': 'off',
15+
'max-lines-per-function': 'off',
16+
// This rule enforces using Buffers with `JSON.parse()`. However, TypeScript
17+
// does not recognize yet that `JSON.parse()` accepts Buffers as argument.
18+
'unicorn/prefer-json-parse-buffer': 'off',
19+
},
20+
overrides: [
21+
...overrides,
22+
{
23+
files: '*.ts',
24+
rules: {
25+
// Pure ES modules with TypeScript require using `.js` instead of `.ts`
26+
// in imports
27+
'import/extensions': 'off',
28+
'import/no-namespace': 'off',
29+
// https://github.com/typescript-eslint/typescript-eslint/issues/2483
30+
'max-lines': 'off',
31+
'max-statements': 'off',
32+
'no-shadow': 'off',
33+
'@typescript-eslint/no-shadow': 'error',
34+
},
35+
},
36+
],
37+
}

.eslintrc.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ on:
77
jobs:
88
build:
99
runs-on: ${{ matrix.os }}
10-
timeout-minutes: 15
1110
strategy:
1211
fail-fast: false
1312
matrix:
1413
os: [ubuntu-latest, macOS-latest, windows-latest]
15-
node-version: ['*']
14+
node-version: ['14.18.0', '*']
15+
exclude:
16+
- os: macOS-latest
17+
node-version: 14.18.0
18+
- os: windows-latest
19+
node-version: 14.18.0
1620
steps:
1721
- name: Git checkout
1822
uses: actions/checkout@v3
@@ -29,16 +33,15 @@ jobs:
2933
- name: Building
3034
run: npm run build
3135
- name: Tests
32-
run: npm run test
36+
run: npm run test:ci
3337
- name: Get test coverage flags
3438
id: test-coverage-flags
3539
run: |-
3640
os=${{ matrix.os }}
37-
node=${{ matrix.node-version }}
38-
echo "::set-output name=os::${os/-latest/}"
39-
echo "::set-output name=node::node_${node//[.*]/}"
41+
node=$(node --version)
42+
echo "os=${os/-latest/}" >> $GITHUB_OUTPUT
43+
echo "node=node_${node/.*.*/}" >> $GITHUB_OUTPUT
4044
shell: bash
4145
- uses: codecov/codecov-action@v3
4246
with:
43-
file: coverage/coverage-final.json
4447
flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
dist
2-
*.tgz
32
node_modules/
43
.eslintcache

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Thin wrapper to fetch packages from GitHub releases.
77
### Typescript
88

99
```ts
10-
import * from 'release-fetch'
10+
import { fetchLatest } from 'gh-release-fetch'
1111

12-
fetchLatest({ repository: 'netlify/netlify-cli', package: 'cli.tar.gz', destination: 'dist' });
12+
fetchLatest({ repository: 'netlify/netlify-cli', package: 'cli.tar.gz', destination: 'dist' })
1313
```
1414

1515
## License
File renamed without changes.

jest.config.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)