Skip to content

Commit

Permalink
Improve TS nodenext support (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
benasher44 authored Dec 17, 2022
1 parent 3c9d3fb commit bdc6746
Show file tree
Hide file tree
Showing 245 changed files with 306 additions and 306 deletions.
2 changes: 1 addition & 1 deletion config/createRollupConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {resolve} = require('path');
*/
module.exports = function createRollupConfig(path) {
return {
input: resolve(path, './index.js'),
input: resolve(path, './index.cjs'),
output: {
file: resolve(path, './index.mjs'),
format: 'esm',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "just",
"version": "1.22.4",
"description": "A library of simple dependency-free utilities that do just do one thing",
"main": "index.js",
"main": "index.cjs",
"directories": {
"test": "test"
},
Expand All @@ -21,7 +21,7 @@
"scripts": {
"build": "lerna run build --stream $@",
"lint": "eslint --max-warnings=0 --ext=mjs,js .",
"test": "npm run lint && tape ./test/**/index.js | tap-spec && npm run test-types",
"test": "npm run lint && tape ./test/**/index.cjs | tap-spec && npm run test-types",
"test-types": "tsc",
"generate-readmes": "node scripts/generate-readmes.js"
},
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-cartesian-product/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-cartesian-product",
"version": "4.1.1",
"description": "Cartesian product of arrays",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-compact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-compact",
"version": "3.1.1",
"description": "returns a copy of an array with falsey values removed",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-flatten/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-flatten-it",
"version": "5.1.2",
"description": "return a flattened array",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-group-by/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-group-by",
"version": "2.1.2",
"description": "return a grouped object from array",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-index/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-index",
"version": "4.1.2",
"description": "return an object from an array, keyed by the value at the given id",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-insert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-insert",
"version": "3.1.1",
"description": "Inserts a sub-array into an array starting at the given index. Returns a copy",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-intersect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-intersect",
"version": "4.2.1",
"description": "return the intersect of two arrays",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-last/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-last",
"version": "3.1.1",
"description": "return the last member of an array",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-mean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-mean",
"version": "2.1.1",
"description": "the mean (average) value in an array",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-median/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-median",
"version": "2.1.1",
"description": "return the median value of an array of numbers",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-mode",
"version": "2.1.1",
"description": "return the most frequently occuring number(s)",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-partition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-partition",
"version": "2.1.1",
"description": "Elements satisfying predicate added to first array, remainder added to second",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-percentile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-percentile",
"version": "4.1.1",
"description": "return the value at the given percentile (using linear interpolation)",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-permutations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-permutations",
"version": "2.1.1",
"description": "Returns all permutations of the length N of the elements of the given Array",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-random/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-random",
"version": "3.1.1",
"description": "return a randomly selected element in an array",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-range/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-range",
"version": "4.1.1",
"description": "Generate a range array for numbers",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/array-remove/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "just-remove",
"version": "3.1.1",
"description": "removes one array from another",
"main": "index.js",
"module": "index.mjs",
"type": "module",
"exports": {
".": {
"require": "./index.js",
"types": "./index.d.ts",
"default": "./index.mjs"
"require": "./index.cjs",
"import": "./index.mjs"
},
"./package.json": "./package.json"
},
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
File renamed without changes.
Loading

0 comments on commit bdc6746

Please sign in to comment.