8000 Require Node.js 14, TS 4.7, and move to ESM by sindresorhus · Pull Request #167 · sindresorhus/is · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Require Node.js 14, TS 4.7, and move to ESM #167

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 8000 ? Sign in to your account

Merged
merged 5 commits into from
Jun 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
fail-fast: false
matrix:
node-version:
- 18
- 16
- 14
- 12
- 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
62 changes: 24 additions & 38 deletions package.json
8000
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"main": "dist/index.js",
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"engines": {
"node": ">=10"
"node": ">=14.16"
},
"scripts": {
"build": "del dist && tsc",
Expand Down Expand Up @@ -47,50 +49,34 @@
"types"
],
"devDependencies": {
"@sindresorhus/tsconfig": "^0.7.0",
"@types/jsdom": "^16.1.0",
"@types/node": "^14.0.13",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",
"ava": "^3.3.0",
"del-cli": "^2.0.0",
"eslint-config-xo-typescript": "^0.26.0",
"jsdom": "^16.0.1",
"rxjs": "^6.4.0",
"tempy": "^0.4.0",
"ts-node": "^8.3.0",
"typescript": "~3.8.2",
"xo": "^0.26.1",
"zen-observable": "^0.8.8"
"@sindresorhus/tsconfig": "^3.0.1",
"@types/jsdom": "^16.2.14",
"@types/node": "^17.0.42",
"@types/zen-observable": "^0.8.3",
"ava": "^4.3.0",
"del-cli": "^4.0.1",
"jsdom": "^19.0.0",
"rxjs": "^7.5.5",
"tempy": "^3.0.0",
"ts-node": "^10.8.1",
"typescript": "~4.7.3",
"xo": "^0.50.0",
"zen-observable": "^0.8.15"
},
"types": "dist/index.d.ts",
"sideEffects": false,
"ava": {
"extensions": [
"ts"
],
"require": [
"ts-node/register"
"extensions": {
"ts": "module"
},
"nodeArguments": [
"--loader=ts-node/esm"
]
},
"xo": {
"extends": "xo-typescript",
"extensions": [
"ts"
],
"parserOptions": {
"project": "./tsconfig.xo.json"
},
"globals": [
"BigInt",
"BigInt64Array",
"BigUint64Array"
],
"rules": {
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-function-return-type": "off"
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/triple-slash-reference": "off"
}
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ npm install @sindresorhus/is
## Usage

```js
const is = require('@sindresorhus/is');
import is from '@sindresorhus/is';

is('🦄');
//=> 'string'
Expand All @@ -39,7 +39,7 @@ is.number(6);
[Assertions](#type-assertions) perform the same type checks, but throw an error if the type does not match.

```js
const {assert} = require('@sindresorhus/is');
import {assert} from '@sindresorhus/is';

assert.string(2);
//=> Error: Expected value which is `string`, received value of type `number`.
Expand Down
Loading
0