diff --git a/packages/@lazy-node/semver-part/index.js b/packages/@lazy-node/semver-part/index.js index 78b687137..44ac55d8e 100644 --- a/packages/@lazy-node/semver-part/index.js +++ b/packages/@lazy-node/semver-part/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./lib/_core"), exports); diff --git a/packages/@yarn-tool/changelog/index.js b/packages/@yarn-tool/changelog/index.js index c34e747e6..83f43f154 100644 --- a/packages/@yarn-tool/changelog/index.js +++ b/packages/@yarn-tool/changelog/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./lib/types"), exports); diff --git a/packages/@yarn-tool/changelog/lib/lerna.js b/packages/@yarn-tool/changelog/lib/lerna.js index 9e9a3e725..37982b635 100644 --- a/packages/@yarn-tool/changelog/lib/lerna.js +++ b/packages/@yarn-tool/changelog/lib/lerna.js @@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./types"), exports); diff --git a/packages/@yarn-tool/changelog/lib/lerna/from-list.d.ts b/packages/@yarn-tool/changelog/lib/lerna/from-list.d.ts index 04b199e3d..a75299f9d 100644 --- a/packages/@yarn-tool/changelog/lib/lerna/from-list.d.ts +++ b/packages/@yarn-tool/changelog/lib/lerna/from-list.d.ts @@ -3,11 +3,11 @@ import { IOptionsWithType, IOptionsUpdateChangelog } from '../types'; export declare function updateChangelogByCwd(cwd?: string, options?: Partial>): Promise<{ cwd: string; rootPath: string; - options: Partial & import("ts-type").ITSRequiredPick & import("ts-type").ITSPartialPick & { + options: Partial & import("ts-type").ITSRequiredPick & import("ts-type").ITSPartialPick & { version?: string; } & { type?: string; - }> | Partial & import("ts-type").ITSRequiredPick & import("ts-type").ITSPartialPick & { + }> | Partial & import("ts-type").ITSRequiredPick & import("ts-type").ITSPartialPick & { version?: string; } & { type?: string; diff --git a/packages/@yarn-tool/check-pkg-bin/index.js b/packages/@yarn-tool/check-pkg-bin/index.js index 63b78fc49..257c6ec93 100644 --- a/packages/@yarn-tool/check-pkg-bin/index.js +++ b/packages/@yarn-tool/check-pkg-bin/index.js @@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); const pkg_1 = require("./lib/pkg"); diff --git a/packages/@yarn-tool/detect-yarnlock-version/index.js b/packages/@yarn-tool/detect-yarnlock-version/index.js index a282d13b8..a8475c77d 100644 --- a/packages/@yarn-tool/detect-yarnlock-version/index.js +++ b/packages/@yarn-tool/detect-yarnlock-version/index.js @@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./lib/detectYarnLockVersion"), exports); diff --git a/packages/@yarn-tool/get-pkg-bin/index.js b/packages/@yarn-tool/get-pkg-bin/index.js index e471e9eaf..3213c0f7b 100644 --- a/packages/@yarn-tool/get-pkg-bin/index.js +++ b/packages/@yarn-tool/get-pkg-bin/index.js @@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultPackageBin = exports.normalizePackageBins = void 0; diff --git a/packages/@yarn-tool/get-pkg-bin/util.js b/packages/@yarn-tool/get-pkg-bin/util.js index 7a249d752..9ea04b38c 100644 --- a/packages/@yarn-tool/get-pkg-bin/util.js +++ b/packages/@yarn-tool/get-pkg-bin/util.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPackageInfo = exports.firstPackageBin = exports.handlePackageBins = exports.getPackageBins = void 0; diff --git a/packages/@yarn-tool/ncu/index.js b/packages/@yarn-tool/ncu/index.js index e2491c6ae..f400559fd 100644 --- a/packages/@yarn-tool/ncu/index.js +++ b/packages/@yarn-tool/ncu/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./lib/types"), exports); diff --git a/packages/@yarn-tool/ncu/package.json b/packages/@yarn-tool/ncu/package.json index 881acec1c..571e12b3a 100644 --- a/packages/@yarn-tool/ncu/package.json +++ b/packages/@yarn-tool/ncu/package.json @@ -27,13 +27,14 @@ "scripts": { "coverage": "npx nyc yarn run test", "lint": "npx eslint **/*.ts", - "test": "echo \"Error: no test specified\" && exit 1", + "test": "jest", "test:jest": "jest --coverage", "test:mocha": "npx mocha --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"", "npm:publish": "npm publish", "npm:publish:lerna": "lerna publish --yes", + "preversion": "yarn run prepublishOnly", "prepublish:lockfile": "npx sync-lockfile .", - "prepublishOnly_": "yarn run ncu && yarn run sort-package-json && yarn run test", + "prepublishOnly": "yarn run test", "postpublish_": "git commit -m \"chore(release): publish\" .", "ncu": "npx yarn-tool ncu -u", "sort-package-json": "npx yarn-tool sort", @@ -48,7 +49,8 @@ "bluebird": "^3.7.2", "npm-check-updates": "^7.0.1", "package-json": "^6.5.0", - "semver": "^7.3.2" + "semver": "^7.3.2", + "ts-type": "^1.2.25" }, "peerDependencies": { "yargs": "^15.4.1" diff --git a/packages/@yarn-tool/node-modules/index.js b/packages/@yarn-tool/node-modules/index.js index e4c110df6..ac603e753 100644 --- a/packages/@yarn-tool/node-modules/index.js +++ b/packages/@yarn-tool/node-modules/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.wsFindPackageHasModules = void 0; diff --git a/packages/@yarn-tool/semver-diff/index.js b/packages/@yarn-tool/semver-diff/index.js index 4b9ee143c..3dfefee99 100644 --- a/packages/@yarn-tool/semver-diff/index.js +++ b/packages/@yarn-tool/semver-diff/index.js @@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); /** diff --git a/packages/@yarn-tool/static-file/index.d.ts b/packages/@yarn-tool/static-file/index.d.ts index cb1e2896a..811d1ac6e 100644 --- a/packages/@yarn-tool/static-file/index.d.ts +++ b/packages/@yarn-tool/static-file/index.d.ts @@ -26,5 +26,5 @@ export declare function parseStaticMap(file_map: IStaticFilesM export declare function parseStaticMap(file_map: IStaticFilesMapArray): [K | IStaticFilesID, string, string?][]; export declare function parseStaticMap(file_map: IStaticFiles): [K | IStaticFilesID, string, string?][]; export declare function getStaticFile(file_id: K, options?: Pick, 'file_map'>): [K, string, string?]; -export declare function copyStaticFiles(options: ICopyStaticFilesOptions): ["README.md" | ".npmignore" | ".gitignore" | ".eslintignore" | ".nvmrc" | ".browserslistrc" | "tsconfig.json.tpl" | "tsconfig.esm.json.tpl" | ".eslintrc.json.tpl" | ".nycrc" | ".mocharc.yml" | "jest.config.js" | ".nowignore" | "now.json.tpl" | "lerna.json.tpl" | K, string, string?][]; +export declare function copyStaticFiles(options: ICopyStaticFilesOptions): [".npmignore" | ".gitignore" | ".eslintignore" | ".nvmrc" | ".browserslistrc" | "tsconfig.json.tpl" | "tsconfig.esm.json.tpl" | ".eslintrc.json.tpl" | "README.md" | ".nycrc" | ".mocharc.yml" | "jest.config.js" | ".nowignore" | "now.json.tpl" | "lerna.json.tpl" | K, string, string?][]; export default copyStaticFiles; diff --git a/packages/@yarn-tool/table/index.js b/packages/@yarn-tool/table/index.js index ff4fbe91d..bdc7d6b03 100644 --- a/packages/@yarn-tool/table/index.js +++ b/packages/@yarn-tool/table/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; diff --git a/packages/@yarn-tool/tag/index.js b/packages/@yarn-tool/tag/index.js index 1c75e04fe..2969c2ca8 100644 --- a/packages/@yarn-tool/tag/index.js +++ b/packages/@yarn-tool/tag/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); const git_tag_1 = require("./lib/git-tag"); diff --git a/packages/@yarn-tool/tag/lib/git-tag.js b/packages/@yarn-tool/tag/lib/git-tag.js index 940cbbc07..115c26006 100644 --- a/packages/@yarn-tool/tag/lib/git-tag.js +++ b/packages/@yarn-tool/tag/lib/git-tag.js @@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; diff --git a/packages/@yarn-tool/yarnlock/index.js b/packages/@yarn-tool/yarnlock/index.js index ac168a5cd..df6fedc54 100644 --- a/packages/@yarn-tool/yarnlock/index.js +++ b/packages/@yarn-tool/yarnlock/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./lib/types"), exports); diff --git a/packages/@yarn-tool/yarnlock/lib/dedupe.js b/packages/@yarn-tool/yarnlock/lib/dedupe.js index 22b1922b7..5e6134066 100644 --- a/packages/@yarn-tool/yarnlock/lib/dedupe.js +++ b/packages/@yarn-tool/yarnlock/lib/dedupe.js @@ -7,6 +7,7 @@ function listDuplicates(yarnlock_old, options) { if (typeof yarnlock_old !== 'string') { yarnlock_old = parse_1.stringify(yarnlock_old); } + // @ts-ignore return yarn_deduplicate_1.listDuplicates(yarnlock_old); } exports.listDuplicates = listDuplicates; diff --git a/packages/@yarn-tool/yarnlock/lib/dedupe.ts b/packages/@yarn-tool/yarnlock/lib/dedupe.ts index 93232ac06..d403853c5 100644 --- a/packages/@yarn-tool/yarnlock/lib/dedupe.ts +++ b/packages/@yarn-tool/yarnlock/lib/dedupe.ts @@ -16,6 +16,7 @@ export function listDuplicates(yarnlock_old: IYarnLockfileParseObject | string, yarnlock_old = stringify(yarnlock_old) } + // @ts-ignore return _listDuplicates(yarnlock_old) } diff --git a/packages/@yarn-tool/yarnlock/lib/types.js b/packages/@yarn-tool/yarnlock/lib/types.js index cfae0f562..70ece01f7 100644 --- a/packages/@yarn-tool/yarnlock/lib/types.js +++ b/packages/@yarn-tool/yarnlock/lib/types.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("@ts-type/package-dts/lib/package-json/types"), exports); diff --git a/packages/create-yarn-workspaces/index.js b/packages/create-yarn-workspaces/index.js index 8a270e0b6..eb9ca1b8d 100644 --- a/packages/create-yarn-workspaces/index.js +++ b/packages/create-yarn-workspaces/index.js @@ -17,12 +17,12 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; diff --git a/packages/npm-init2/index.js b/packages/npm-init2/index.js index da81de53a..51d346a9f 100644 --- a/packages/npm-init2/index.js +++ b/packages/npm-init2/index.js @@ -15,7 +15,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; diff --git a/packages/npm-init2/lib/index.js b/packages/npm-init2/lib/index.js index eb4b5c578..9e5ac9e8d 100644 --- a/packages/npm-init2/lib/index.js +++ b/packages/npm-init2/lib/index.js @@ -17,7 +17,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; diff --git a/packages/ws-pkg-list/index.js b/packages/ws-pkg-list/index.js index 3f296d465..9f4ee03b7 100644 --- a/packages/ws-pkg-list/index.js +++ b/packages/ws-pkg-list/index.js @@ -10,7 +10,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); const listpkg_1 = require("./lib/listpkg");