From 454367da37a30da321630ec12c03ac0fc2f807cc Mon Sep 17 00:00:00 2001 From: svc-cli-bot Date: Sun, 7 Apr 2024 06:54:33 +0000 Subject: [PATCH 1/9] chore: updates from devScripts --- package.json | 2 +- src/types/collection.ts | 6 +- src/types/json.ts | 4 +- test/experimental/index.test.ts | 2 +- test/narrowing/object.test.ts | 8 +- yarn.lock | 182 +++++++++++++++++--------------- 6 files changed, 110 insertions(+), 94 deletions(-) diff --git a/package.json b/package.json index eff20fb4..4882db19 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "tslib": "^2.6.2" }, "devDependencies": { - "@salesforce/dev-scripts": "^8.4.2", + "@salesforce/dev-scripts": "^8.5.0", "eslint-plugin-prefer-arrow": "^1.2.1", "ts-node": "^10.9.2", "typescript": "^5.4.4" diff --git a/src/types/collection.ts b/src/types/collection.ts index 839b5974..dae0e5f8 100644 --- a/src/types/collection.ts +++ b/src/types/collection.ts @@ -17,17 +17,17 @@ import { Optional } from './union'; * and values, see the following functions: {@link definiteEntriesOf}, {@link definiteKeysOf}, and * {@link definiteValuesOf}. */ -export interface Dictionary { +export type Dictionary = { [key: string]: Optional; } /** * An alias for an array of `T` elements, where `T` defaults to `unknown`. */ -export interface AnyArray extends Array {} +export type AnyArray = {} & T[] /** * Any object with both a numeric index signature with values of type `T` and a numeric `length` * property. `T` defaults to `unknown` if unspecified. */ -export interface AnyArrayLike extends ArrayLike {} +export type AnyArrayLike = {} & ArrayLike diff --git a/src/types/json.ts b/src/types/json.ts index c6929213..5f5c3ace 100644 --- a/src/types/json.ts +++ b/src/types/json.ts @@ -29,9 +29,9 @@ export type AnyJson = JsonPrimitive | JsonCollection; /** * Any JSON-compatible object. */ -export interface JsonMap extends Dictionary {} +export type JsonMap = {} & Dictionary /** * Any JSON-compatible array. */ -export interface JsonArray extends Array {} +export type JsonArray = {} & AnyJson[] diff --git a/test/experimental/index.test.ts b/test/experimental/index.test.ts index 309890f1..2cbde273 100644 --- a/test/experimental/index.test.ts +++ b/test/experimental/index.test.ts @@ -14,7 +14,7 @@ class TestClass { public foo = 'bar'; } -interface Test { +type Test = { s: string; b?: boolean; c?: TestClass; diff --git a/test/narrowing/object.test.ts b/test/narrowing/object.test.ts index 31205021..6dc12795 100644 --- a/test/narrowing/object.test.ts +++ b/test/narrowing/object.test.ts @@ -24,7 +24,7 @@ describe('object', () => { it("should allow convenient enumeration of a typed object's keys", () => { const acc: Array<[string, number]> = []; - interface Point { + type Point = { x: number; y: number; } @@ -47,7 +47,7 @@ describe('object', () => { it("should allow convenient enumeration of a typed object's entries", () => { const acc: Array<[string, number]> = []; - interface Point { + type Point = { x: number; y: number; } @@ -70,7 +70,7 @@ describe('object', () => { it("should allow convenient enumeration of a typed object's values", () => { const acc: number[] = []; - interface Point { + type Point = { x: number; y: number; } @@ -84,7 +84,7 @@ describe('object', () => { }); describe('definite *', () => { - interface Obj { + type Obj = { a: string; b: Optional; c: Nullable; diff --git a/yarn.lock b/yarn.lock index 50fb8857..462ee3de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -539,26 +539,26 @@ resolved "https://registry.npmjs.org/@salesforce/dev-config/-/dev-config-4.1.0.tgz#e529576466d074e7a5f1441236510fef123da01e" integrity sha512-2iDDepiIwjXHS5IVY7pwv8jMo4xWosJ7p/UTj+lllpB/gnJiYLhjJPE4Z3FCGFKyvfg5jGaimCd8Ca6bLGsCQA== -"@salesforce/dev-scripts@^8.4.2": - version "8.4.2" - resolved "https://registry.npmjs.org/@salesforce/dev-scripts/-/dev-scripts-8.4.2.tgz#8554bc46973bafb65dd52737448e3e600c10e727" - integrity sha512-Hua2fwrN1nb/rv8seE6thy43WeqS52UbXJ3Mp1scumM9ln3cksMJ0ZPtuRjtLaxziqkUjO7HV10UEzu35AX2ZA== +"@salesforce/dev-scripts@^8.5.0": + version "8.5.0" + resolved "https://registry.npmjs.org/@salesforce/dev-scripts/-/dev-scripts-8.5.0.tgz#b0b44ca595450328c6186968528d9c0ef06cd27e" + integrity sha512-vR+CB5VoQrNAqNTcu5GZ/l4I4Rxd5HkIj/qTxEzP1EYnIlgjrbcsQgaunSnTrttIEy/BD8epd6UWAT8yAItufg== dependencies: "@commitlint/cli" "^17.1.2" "@commitlint/config-conventional" "^17.8.1" "@salesforce/dev-config" "^4.1.0" "@salesforce/prettier-config" "^0.0.3" - "@types/chai" "^4.3.11" + "@types/chai" "^4.3.14" "@types/mocha" "^10.0.6" - "@types/node" "^18" + "@types/node" "^18.19.28" "@types/sinon" "^10.0.20" chai "^4.3.10" chalk "^4.0.0" - cosmiconfig "^7.0.0" - eslint-config-salesforce-typescript "^3.2.11" + cosmiconfig "^8.3.6" + eslint-config-salesforce-typescript "^3.3.0" husky "^7.0.4" linkinator "^6.0.4" - mocha "^10.2.0" + mocha "^10.4.0" nyc "^15.1.0" prettier "^2.8.8" pretty-quick "^3.3.1" @@ -566,9 +566,9 @@ sinon "10.0.0" source-map-support "^0.5.21" ts-node "^10.9.2" - typedoc "^0.25.9" + typedoc "^0.25.12" typedoc-plugin-missing-exports "0.23.0" - typescript "^4.9.5" + typescript "^5.4.3" wireit "^0.14.4" "@salesforce/prettier-config@^0.0.3": @@ -624,10 +624,10 @@ resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== -"@types/chai@^4.3.11": - version "4.3.11" - resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz#e95050bf79a932cb7305dd130254ccdf9bde671c" - integrity sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ== +"@types/chai@^4.3.14": + version "4.3.14" + resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.14.tgz#ae3055ea2be43c91c9fd700a36d67820026d96e6" + integrity sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w== "@types/json-schema@^7.0.12": version "7.0.14" @@ -649,10 +649,10 @@ resolved "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b" integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== -"@types/node@*", "@types/node@^18": - version "18.18.8" - resolved "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz#2b285361f2357c8c8578ec86b5d097c7f464cfd6" - integrity sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ== +"@types/node@*", "@types/node@^18.19.28": + version "18.19.30" + resolved "https://registry.npmjs.org/@types/node/-/node-18.19.30.tgz#0b1e6f824ed7ce37ef6e56f8f0d7d0ec2847b327" + integrity sha512-453z1zPuJLVDbyahaa1sSD5C2sht6ZpHp5rgJNs+H8YGqhluCXcuOUmBYsAo0Tos0cHySJ3lVUGbGgLlqIkpyg== dependencies: undici-types "~5.26.4" @@ -661,11 +661,6 @@ resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - "@types/semver@^7.5.0": version "7.5.4" resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz#0a41252ad431c473158b22f9bfb9a63df7541cff" @@ -1300,25 +1295,14 @@ cosmiconfig-typescript-loader@^4.0.0: resolved "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.1.0.tgz#39b2f8e302d587d27a2d5fc10106635abef4a6e4" integrity sha512-HbWIuR5O+XO5Oj9SZ5bzgrD4nN+rfhrm2PMb0FVx+t+XIvC45n8F0oTNnztXtspWGw0i2IzHaUWFD5LzV1JB4A== -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== +cosmiconfig@^8.0.0, cosmiconfig@^8.3.6: + version "8.3.6" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" + integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cosmiconfig@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz#e9feae014eab580f858f8a0288f38997a7bebe97" - integrity sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ== - dependencies: - import-fresh "^3.2.1" + import-fresh "^3.3.0" js-yaml "^4.1.0" - parse-json "^5.0.0" + parse-json "^5.2.0" path-type "^4.0.0" create-require@^1.1.0: @@ -1620,26 +1604,26 @@ eslint-config-salesforce-license@^0.2.0: resolved "https://registry.npmjs.org/eslint-config-salesforce-license/-/eslint-config-salesforce-license-0.2.0.tgz#323193f1aa15dd33fbf108d25fc1210afc11065e" integrity sha512-DJdBvgj82Erum82YMe+YvG/o6ukna3UA++lRl0HSTldj0VlBl3Q8hzCp97nRXZHra6JH1I912yievZzklXDw6w== -eslint-config-salesforce-typescript@^3.2.11: - version "3.2.11" - resolved "https://registry.npmjs.org/eslint-config-salesforce-typescript/-/eslint-config-salesforce-typescript-3.2.11.tgz#905102212d1a1e6752fbbfd805256e5e3173c102" - integrity sha512-joZX/tMJXn9U48KAEUEeoIlhFLwr8vSA+mazZLzyZ6vO6bA0LUz1t6gJLH+wjKkrhayNUGOG5aBI2ODmhFnk7w== +eslint-config-salesforce-typescript@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/eslint-config-salesforce-typescript/-/eslint-config-salesforce-typescript-3.3.0.tgz#308acead1909665a92e9d32895c592ec4c9ee87a" + integrity sha512-83+zp2Y2h9oz9D3UksjNGCw+xWD7ylIiAJZ58vUbBD10l8FRUMNyn+RDCKn0xCQz7xed5/LcmgUE4T7roe+HBw== dependencies: "@typescript-eslint/eslint-plugin" "^6.21.0" "@typescript-eslint/parser" "^6.21.0" eslint "^8.56.0" eslint-config-prettier "^9.1.0" - eslint-config-salesforce "^2.0.2" + eslint-config-salesforce "^2.2.0" eslint-config-salesforce-license "^0.2.0" eslint-plugin-header "^3.1.1" eslint-plugin-import "^2.29.1" eslint-plugin-jsdoc "^46.10.1" eslint-plugin-unicorn "^50.0.1" -eslint-config-salesforce@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/eslint-config-salesforce/-/eslint-config-salesforce-2.0.2.tgz#38eb2d8eb2824c66967ed9b45bc92082eba2f225" - integrity sha512-3jbrI+QFu/KaQbPYIBxItB3okqUtA4EBCGiR6s2kcUMIZBLBBGAURW0k62f9WAv1EagR3eUoO0m9ru7LTj2F5Q== +eslint-config-salesforce@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/eslint-config-salesforce/-/eslint-config-salesforce-2.2.0.tgz#04b6cf07dcbaabc32fc9edb0915860497db55c30" + integrity sha512-0zUEFJ2nNpMvVO3MgKEDUTGtaFZjL3xEIErr5h+BOft+OhGoIvZBNPnBBu12lvv29ylqIAQz5SwoVCCUzBhyPQ== eslint-import-resolver-node@^0.3.9: version "0.3.9" @@ -2099,17 +2083,16 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@7.2.0, glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: - version "7.2.0" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +glob@8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^5.0.1" once "^1.3.0" - path-is-absolute "^1.0.0" glob@^10.3.10: version "10.3.10" @@ -2122,6 +2105,18 @@ glob@^10.3.10: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: + version "7.2.0" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -2303,7 +2298,7 @@ ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -2973,6 +2968,13 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -2992,10 +2994,10 @@ minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== -mocha@^10.2.0: - version "10.2.0" - resolved "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" - integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== +mocha@^10.4.0: + version "10.4.0" + resolved "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz#ed03db96ee9cfc6d20c56f8e2af07b961dbae261" + integrity sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA== dependencies: ansi-colors "4.1.1" browser-stdout "1.3.1" @@ -3004,13 +3006,12 @@ mocha@^10.2.0: diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" - glob "7.2.0" + glob "8.1.0" he "1.2.0" js-yaml "4.1.0" log-symbols "4.1.0" minimatch "5.0.1" ms "2.1.3" - nanoid "3.3.3" serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" @@ -3034,11 +3035,6 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -3270,7 +3266,7 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@^5.0.0: +parse-json@^5.0.0, parse-json@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== @@ -3806,7 +3802,16 @@ srcset@^5.0.0: resolved "https://registry.npmjs.org/srcset/-/srcset-5.0.0.tgz#9df6c3961b5b44a02532ce6ae4544832609e2e3f" integrity sha512-SqEZaAEhe0A6ETEa9O1IhSPC7MdvehZtCnTR0AftXk3QhY2UNgb+NApFOUPZILXk/YTDfFxMTNJOBpzrJsEdIA== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3858,7 +3863,14 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -4100,22 +4112,22 @@ typedoc-plugin-missing-exports@0.23.0: resolved "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-0.23.0.tgz#076df6ffce4d84e8097be009b7c62a17d58477a5" integrity sha512-9smahDSsFRno9ZwoEshQDuIYMHWGB1E6LUud5qMxR2wNZ0T4DlZz0QjoK3HzXtX34mUpTH0dYtt7NQUK4D6B6Q== -typedoc@^0.25.9: - version "0.25.11" - resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.25.11.tgz#75080c594c1e26b7676f90faebb367fb5a32dc8d" - integrity sha512-5MbI1W/FOG6oXsd8bdssQidSTeKh8Kt3xA5uKVzI+K99uzP8EGN45uPnPvQesyaWdD+89s4wCQdtWEd8QUbiRg== +typedoc@^0.25.12: + version "0.25.12" + resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.25.12.tgz#f73f0a8d3731d418cc604d4230f95a857799e27a" + integrity sha512-F+qhkK2VoTweDXd1c42GS/By2DvI2uDF4/EpG424dTexSHdtCH52C6IcAvMA6jR3DzAWZjHpUOW+E02kyPNUNw== dependencies: lunr "^2.3.9" marked "^4.3.0" minimatch "^9.0.3" shiki "^0.14.7" -typescript@^4.6.4, typescript@^4.9.5: +typescript@^4.6.4: version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -typescript@^5.4.4: +typescript@^5.4.3, typescript@^5.4.4: version "5.4.4" resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952" integrity sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw== @@ -4251,7 +4263,7 @@ workerpool@6.2.1: resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -4269,6 +4281,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -4308,11 +4329,6 @@ yallist@^4.0.0: resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0: - version "1.10.2" - resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" From 7252c826e306a25e0da98c95e29fb73b736598b5 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 13:18:47 -0500 Subject: [PATCH 2/9] ci: external compile --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54e81933..a8e28769 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,3 +13,9 @@ jobs: windows-unit-tests: needs: yarn-lockfile-check uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main + compile: + needs: [linux-unit-tests, windows-unit-tests] + uses: salesforcecli/github-workflows/.github/workflows/externalCompile.yml@sm/external-compile + with: + packageName: '@salesforce/core' + externalProjectGitUrl: https://github.com/forcedotcom/sfdx-core From 61c2b55bfc83e54522a2331f032a717cf69712d2 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 13:18:59 -0500 Subject: [PATCH 3/9] chore: interface => type --- src/types/collection.ts | 6 +++--- src/types/json.ts | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/types/collection.ts b/src/types/collection.ts index dae0e5f8..c041fec2 100644 --- a/src/types/collection.ts +++ b/src/types/collection.ts @@ -19,15 +19,15 @@ import { Optional } from './union'; */ export type Dictionary = { [key: string]: Optional; -} +}; /** * An alias for an array of `T` elements, where `T` defaults to `unknown`. */ -export type AnyArray = {} & T[] +export type AnyArray = T[]; /** * Any object with both a numeric index signature with values of type `T` and a numeric `length` * property. `T` defaults to `unknown` if unspecified. */ -export type AnyArrayLike = {} & ArrayLike +export type AnyArrayLike = ArrayLike; diff --git a/src/types/json.ts b/src/types/json.ts index 5f5c3ace..a0dea149 100644 --- a/src/types/json.ts +++ b/src/types/json.ts @@ -29,9 +29,12 @@ export type AnyJson = JsonPrimitive | JsonCollection; /** * Any JSON-compatible object. */ -export type JsonMap = {} & Dictionary + +// leave this as an interface because it requires circular references that type aliases cannot do +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions +export interface JsonMap extends Dictionary {} /** * Any JSON-compatible array. */ -export type JsonArray = {} & AnyJson[] +export type JsonArray = AnyJson[]; From 8276d93827040c4e8d0f3204e339bac01416ad4c Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 13:30:56 -0500 Subject: [PATCH 4/9] ci: correct pkg name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8e28769..e9f24c24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,5 +17,5 @@ jobs: needs: [linux-unit-tests, windows-unit-tests] uses: salesforcecli/github-workflows/.github/workflows/externalCompile.yml@sm/external-compile with: - packageName: '@salesforce/core' + packageName: '@salesforce/ts-types' externalProjectGitUrl: https://github.com/forcedotcom/sfdx-core From 2df76dbd7f01e1d8e3b020dd362ea07cf297e50e Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 13:44:07 -0500 Subject: [PATCH 5/9] ci: compile everywhere --- .github/workflows/test.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9f24c24..ede27749 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,28 @@ jobs: windows-unit-tests: needs: yarn-lockfile-check uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main - compile: + compile-everywhere: needs: [linux-unit-tests, windows-unit-tests] uses: salesforcecli/github-workflows/.github/workflows/externalCompile.yml@sm/external-compile + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'windows-latest'] + externalProjectGitUrl: + - https://github.com/salesforcecli/sf-plugins-core + - https://github.com/salesforcecli/plugin-auth + - https://github.com/salesforcecli/plugin-data + - https://github.com/salesforcecli/plugin-dev + - https://github.com/salesforcecli/plugin-org + - https://github.com/salesforcecli/plugin-source + - https://github.com/salesforcecli/plugin-deploy-retrieve + - https://github.com/salesforcecli/plugin-user + - https://github.com/forcedotcom/sfdx-core + - https://github.com/forcedotcom/kit + - https://github.com/forcedotcom/ts-sinon + - https://github.com/forcedotcom/source-deploy-retrieve + - https://github.com/forcedotcom/source-tracking with: packageName: '@salesforce/ts-types' - externalProjectGitUrl: https://github.com/forcedotcom/sfdx-core + externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }} + os: ${{ matrix.os }} From fdf02ca89fb33c03a7bbfb46a3a89e61e6a55910 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 13:46:56 -0500 Subject: [PATCH 6/9] ci: indentation, don't wait on windows ut --- .github/workflows/test.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ede27749..d7c3adbc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,26 +14,26 @@ jobs: needs: yarn-lockfile-check uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main compile-everywhere: - needs: [linux-unit-tests, windows-unit-tests] + needs: [linux-unit-tests] uses: salesforcecli/github-workflows/.github/workflows/externalCompile.yml@sm/external-compile strategy: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-latest'] externalProjectGitUrl: + - https://github.com/salesforcecli/plugin-auth + - https://github.com/salesforcecli/plugin-data + - https://github.com/salesforcecli/plugin-dev + - https://github.com/salesforcecli/plugin-org + - https://github.com/salesforcecli/plugin-source + - https://github.com/salesforcecli/plugin-deploy-retrieve + - https://github.com/salesforcecli/plugin-user - https://github.com/salesforcecli/sf-plugins-core - - https://github.com/salesforcecli/plugin-auth - - https://github.com/salesforcecli/plugin-data - - https://github.com/salesforcecli/plugin-dev - - https://github.com/salesforcecli/plugin-org - - https://github.com/salesforcecli/plugin-source - - https://github.com/salesforcecli/plugin-deploy-retrieve - - https://github.com/salesforcecli/plugin-user - - https://github.com/forcedotcom/sfdx-core - - https://github.com/forcedotcom/kit - - https://github.com/forcedotcom/ts-sinon - - https://github.com/forcedotcom/source-deploy-retrieve - - https://github.com/forcedotcom/source-tracking + - https://github.com/forcedotcom/kit + - https://github.com/forcedotcom/sfdx-core + - https://github.com/forcedotcom/source-deploy-retrieve + - https://github.com/forcedotcom/source-tracking + - https://github.com/forcedotcom/ts-sinon with: packageName: '@salesforce/ts-types' externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }} From 94392d7ba945d8a7e5de7aa6e5aa1e6c56c00929 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 13:59:29 -0500 Subject: [PATCH 7/9] chore: remove plugin-org --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7c3adbc..c512ff82 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,6 @@ jobs: - https://github.com/salesforcecli/plugin-auth - https://github.com/salesforcecli/plugin-data - https://github.com/salesforcecli/plugin-dev - - https://github.com/salesforcecli/plugin-org - https://github.com/salesforcecli/plugin-source - https://github.com/salesforcecli/plugin-deploy-retrieve - https://github.com/salesforcecli/plugin-user From c156e5f0843a0c6c580b01c8b7ef0c773434267c Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 14:00:39 -0500 Subject: [PATCH 8/9] ci: don't run compile on windows --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c512ff82..0489ef39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,6 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'windows-latest'] externalProjectGitUrl: - https://github.com/salesforcecli/plugin-auth - https://github.com/salesforcecli/plugin-data @@ -36,4 +35,3 @@ jobs: with: packageName: '@salesforce/ts-types' externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }} - os: ${{ matrix.os }} From fdf897f2c60001b28004d3ee86118e66a08469d9 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 8 Apr 2024 14:01:19 -0500 Subject: [PATCH 9/9] ci: build (to lint and compile) --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0489ef39..6e8889af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,3 +35,4 @@ jobs: with: packageName: '@salesforce/ts-types' externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }} + command: 'yarn build'