diff --git a/package-lock.json b/package-lock.json index 83690ce1de..fea4d2709f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "immutable", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "immutable", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "devDependencies": { "@rollup/plugin-buble": "1.0.2", @@ -52,7 +52,7 @@ "rollup": "3.28.1", "size-limit": "^8.2.6", "transducers-js": "0.4.174", - "tstyche": "^2.1.1", + "tstyche": "^3.0.0-rc.2", "typescript": "5.1" }, "engines": { @@ -11970,15 +11970,16 @@ } }, "node_modules/tstyche": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tstyche/-/tstyche-2.1.1.tgz", - "integrity": "sha512-SvAukLfHk894rbBJEu6+7S9ZggN89FDe4VA0xT/mldW7gmqcpmNV7+OghlR2IZyUbkas4mjrjOKxSWZ3IQzV+w==", + "version": "3.0.0-rc.2", + "resolved": "https://registry.npmjs.org/tstyche/-/tstyche-3.0.0-rc.2.tgz", + "integrity": "sha512-sG7nX6igb9CoRGUku1mGS5LhwHgQd1zpXyAO8vF7Jt3atFRf0iAJ1+Od4cNqdw5GBCcIxi+g6CqG8sfFX2WCfQ==", "dev": true, + "license": "MIT", "bin": { "tstyche": "build/bin.js" }, "engines": { - "node": ">=16.14" + "node": ">=18.19" }, "funding": { "url": "https://github.com/tstyche/tstyche?sponsor=1" @@ -21369,9 +21370,9 @@ } }, "tstyche": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tstyche/-/tstyche-2.1.1.tgz", - "integrity": "sha512-SvAukLfHk894rbBJEu6+7S9ZggN89FDe4VA0xT/mldW7gmqcpmNV7+OghlR2IZyUbkas4mjrjOKxSWZ3IQzV+w==", + "version": "3.0.0-rc.2", + "resolved": "https://registry.npmjs.org/tstyche/-/tstyche-3.0.0-rc.2.tgz", + "integrity": "sha512-sG7nX6igb9CoRGUku1mGS5LhwHgQd1zpXyAO8vF7Jt3atFRf0iAJ1+Od4cNqdw5GBCcIxi+g6CqG8sfFX2WCfQ==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index 8ba5f80722..194472b006 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "immutable", - "version": "5.0.0", + "version": "5.0.1", "description": "Immutable Data Collections", "license": "MIT", "homepage": "https://immutable-js.com", @@ -60,8 +60,8 @@ "test:types": "tstyche", "format": "npm run lint:format -- --write", "lint": "run-s lint:*", - "lint:format": "prettier --check \"{__tests__,src,type-definitions,website/src,perf,resources}/**/*{.js,.ts,.tsx,.flow,.css}\"", - "lint:js": "eslint \"{__tests__,src,type-definitions,website/src}/**/*.{js,ts,tsx}\"", + "lint:format": "prettier --check \"{__tests__,src,type-definitions,website/src,perf,resources}/**/*{.js,.mjs,.ts,.tsx,.flow,.css}\"", + "lint:js": "eslint \"{__tests__,src,type-definitions,website/src}/**/*.{js,mjs,ts,tsx}\"", "type-check": "run-s type-check:*", "type-check:ts": "tsc --project type-definitions/tsconfig.json && tsc --project __tests__/tsconfig.json", "type-check:flow": "flow check type-definitions/flow-tests --include-warnings", @@ -127,7 +127,7 @@ "rollup": "3.28.1", "size-limit": "^8.2.6", "transducers-js": "0.4.174", - "tstyche": "^2.1.1", + "tstyche": "^3.0.0-rc.2", "typescript": "5.1" }, "size-limit": [ diff --git a/resources/rollup-config.mjs b/resources/rollup-config.mjs index bf32fc381b..99c070b8a0 100644 --- a/resources/rollup-config.mjs +++ b/resources/rollup-config.mjs @@ -36,10 +36,8 @@ export default [ { banner: copyright, name: 'Immutable', - dir: path.join(DIST_DIR, 'es'), + file: path.join(DIST_DIR, 'immutable.es.js'), format: 'es', - preserveModules: true, - preserveModulesRoot: SRC_DIR, sourcemap: false, }, ], diff --git a/tstyche.config.json b/tstyche.config.json index 897c74449d..903317e015 100644 --- a/tstyche.config.json +++ b/tstyche.config.json @@ -1,6 +1,6 @@ { "$schema": "https://tstyche.org/schemas/config.json", "testFileMatch": [ - "**/type-definitions/ts-tests/*.ts" + "type-definitions/ts-tests/*.ts" ] } diff --git a/type-definitions/ts-tests/list.ts b/type-definitions/ts-tests/list.ts index 18f3ed00b9..66b4e81bc6 100644 --- a/type-definitions/ts-tests/list.ts +++ b/type-definitions/ts-tests/list.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { List, get, @@ -21,9 +21,7 @@ test('#constructor', () => { }); test('#size', () => { - expect(List().size).type.toBeNumber(); - - expect(List()).type.toMatch<{ readonly size: number }>(); + expect(pick(List(), 'size')).type.toBe<{ readonly size: number }>(); }); test('#setSize', () => { diff --git a/type-definitions/ts-tests/map.ts b/type-definitions/ts-tests/map.ts index aa62cf2710..6574c9702c 100644 --- a/type-definitions/ts-tests/map.ts +++ b/type-definitions/ts-tests/map.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { Map, List, MapOf, OrderedMap } from 'immutable'; test('#constructor', () => { @@ -45,9 +45,7 @@ test('#constructor', () => { }); test('#size', () => { - expect(Map().size).type.toBeNumber(); - - expect(Map()).type.toMatch<{ readonly size: number }>(); + expect(pick(Map(), 'size')).type.toBe<{ readonly size: number }>(); }); test('#get', () => { diff --git a/type-definitions/ts-tests/ordered-map.ts b/type-definitions/ts-tests/ordered-map.ts index 35bd1fdc85..6ebb0a18c5 100644 --- a/type-definitions/ts-tests/ordered-map.ts +++ b/type-definitions/ts-tests/ordered-map.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { OrderedMap, List } from 'immutable'; test('#constructor', () => { @@ -20,9 +20,7 @@ test('#constructor', () => { }); test('#size', () => { - expect(OrderedMap().size).type.toBeNumber(); - - expect(OrderedMap()).type.toMatch<{ readonly size: number }>(); + expect(pick(OrderedMap(), 'size')).type.toBe<{ readonly size: number }>(); }); test('#get', () => { diff --git a/type-definitions/ts-tests/ordered-set.ts b/type-definitions/ts-tests/ordered-set.ts index 06081e3f3e..ceeb631815 100644 --- a/type-definitions/ts-tests/ordered-set.ts +++ b/type-definitions/ts-tests/ordered-set.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { Collection, OrderedSet, Map } from 'immutable'; test('#constructor', () => { @@ -12,9 +12,7 @@ test('#constructor', () => { }); test('#size', () => { - expect(OrderedSet().size).type.toBeNumber(); - - expect(OrderedSet()).type.toMatch<{ readonly size: number }>(); + expect(pick(OrderedSet(), 'size')).type.toBe<{ readonly size: number }>(); }); test('.of', () => { diff --git a/type-definitions/ts-tests/record.ts b/type-definitions/ts-tests/record.ts index 70a3336045..233caeeef0 100644 --- a/type-definitions/ts-tests/record.ts +++ b/type-definitions/ts-tests/record.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { List, Map, MapOf, Record, RecordOf, Set } from 'immutable'; test('Factory', () => { @@ -14,13 +14,9 @@ test('Factory', () => { Record<{ x: number; y: number }> & Readonly<{ x: number; y: number }> >(); - expect(pointXY.x).type.toBeNumber(); + expect(pick(pointXY, 'x')).type.toBe<{ readonly x: number }>(); - expect(pointXY).type.toMatch<{ readonly x: number }>(); - - expect(pointXY.y).type.toBeNumber(); - - expect(pointXY).type.toMatch<{ readonly y: number }>(); + expect(pick(pointXY, 'y')).type.toBe<{ readonly y: number }>(); expect(pointXY.toJS()).type.toBe<{ x: number; y: number }>(); diff --git a/type-definitions/ts-tests/seq.ts b/type-definitions/ts-tests/seq.ts index b2524b8ff1..218b2f8a98 100644 --- a/type-definitions/ts-tests/seq.ts +++ b/type-definitions/ts-tests/seq.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { Seq } from 'immutable'; test('#constructor', () => { @@ -6,7 +6,7 @@ test('#constructor', () => { }); test('#size', () => { - expect(Seq().size).type.toBe(); - - expect(Seq()).type.toMatch<{ readonly size: number | undefined }>(); + expect(pick(Seq(), 'size')).type.toBe<{ + readonly size: number | undefined; + }>(); }); diff --git a/type-definitions/ts-tests/set.ts b/type-definitions/ts-tests/set.ts index c3183a4b0c..861cf7b914 100644 --- a/type-definitions/ts-tests/set.ts +++ b/type-definitions/ts-tests/set.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { Set, Map, Collection, OrderedSet } from 'immutable'; test('#constructor', () => { @@ -12,9 +12,7 @@ test('#constructor', () => { }); test('#size', () => { - expect(Set().size).type.toBeNumber(); - - expect(Set()).type.toMatch<{ readonly size: number }>(); + expect(pick(Set(), 'size')).type.toBe<{ readonly size: number }>(); }); test('.of', () => { diff --git a/type-definitions/ts-tests/stack.ts b/type-definitions/ts-tests/stack.ts index 5711cdb1a2..9bc07b45ec 100644 --- a/type-definitions/ts-tests/stack.ts +++ b/type-definitions/ts-tests/stack.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'tstyche'; +import { expect, pick, test } from 'tstyche'; import { Collection, Stack } from 'immutable'; test('#constructor', () => { @@ -10,9 +10,7 @@ test('#constructor', () => { }); test('#size', () => { - expect(Stack().size).type.toBeNumber(); - - expect(Stack()).type.toMatch<{ readonly size: number }>(); + expect(pick(Stack(), 'size')).type.toBe<{ readonly size: number }>(); }); test('.of', () => { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy