@yarn-tool/pkg-entry-util 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/lib/preset/dummy.d.ts +1 -0
- package/lib/preset/dummy.js +29 -0
- package/lib/preset/dummy.js.map +1 -0
- package/lib/preset/ws-root-scripts.d.ts +27 -0
- package/lib/preset/ws-root-scripts.js +34 -0
- package/lib/preset/ws-root-scripts.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.4](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@1.0.3...@yarn-tool/pkg-entry-util@1.0.4) (2022-01-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 📦 Code Refactoring
|
|
10
|
+
|
|
11
|
+
* code splitting ([fa83e8f](https://github.com/bluelovers/ws-yarn-workspaces/commit/fa83e8f47a10a5ad7ed1ac5337d8a2d20c556df9))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.0.3](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@1.0.2...@yarn-tool/pkg-entry-util@1.0.3) (2021-12-31)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string): T;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fillDummyScripts = void 0;
|
|
4
|
+
function fillDummyScripts(scripts, prefix) {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
scripts !== null && scripts !== void 0 ? scripts : (scripts = {});
|
|
7
|
+
let text = `echo ${prefix !== null && prefix !== void 0 ? prefix : ''}`.trim();
|
|
8
|
+
[
|
|
9
|
+
'preversion',
|
|
10
|
+
'version',
|
|
11
|
+
'prepublishOnly',
|
|
12
|
+
'postversion',
|
|
13
|
+
'publish',
|
|
14
|
+
'prepublish',
|
|
15
|
+
'postpublish',
|
|
16
|
+
'postpublishOnly',
|
|
17
|
+
'prepare',
|
|
18
|
+
'prepack',
|
|
19
|
+
'pack',
|
|
20
|
+
'postpack',
|
|
21
|
+
].forEach(k => {
|
|
22
|
+
var _a;
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
(_a = scripts[k]) !== null && _a !== void 0 ? _a : (scripts[k] = `${text} ${k}`);
|
|
25
|
+
});
|
|
26
|
+
return scripts;
|
|
27
|
+
}
|
|
28
|
+
exports.fillDummyScripts = fillDummyScripts;
|
|
29
|
+
//# sourceMappingURL=dummy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB,CAAmC,OAAW,EAAE,MAAe;IAE9F,aAAa;IACb,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAAE,EAAC;IAEf,IAAI,IAAI,GAAG,QAAQ,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IAExC;QACA,YAAY;QACZ,SAAS;QACT,gBAAgB;QAChB,aAAa;QACb,SAAS;QACT,YAAY;QACZ,aAAa;QACb,iBAAiB;QACjB,SAAS;QACT,SAAS;QACT,MAAM;QACN,UAAU;KACA,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;;QAEvB,aAAa;QACb,MAAA,OAAO,CAAC,CAAC,qCAAT,OAAO,CAAC,CAAC,IAAM,GAAG,IAAI,IAAI,CAAC,EAAE,EAAA;IAC9B,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AAChB,CAAC;AA1BD,4CA0BC","sourcesContent":["export function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string)\n{\n\t// @ts-ignore\n\tscripts ??= {};\n\n\tlet text = `echo ${prefix ?? ''}`.trim();\n\n\t([\n\t\t'preversion',\n\t\t'version',\n\t\t'prepublishOnly',\n\t\t'postversion',\n\t\t'publish',\n\t\t'prepublish',\n\t\t'postpublish',\n\t\t'postpublishOnly',\n\t\t'prepare',\n\t\t'prepack',\n\t\t'pack',\n\t\t'postpack',\n\t] as const).forEach(k =>\n\t{\n\t\t// @ts-ignore\n\t\tscripts[k] ??= `${text} ${k}`\n\t});\n\treturn scripts;\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare function defaultWorkspaceRootScripts(): {
|
|
2
|
+
"test:all": string;
|
|
3
|
+
"build:all": string;
|
|
4
|
+
"review:all": string;
|
|
5
|
+
"coverage:all": string;
|
|
6
|
+
"lint:all": string;
|
|
7
|
+
preversion: string;
|
|
8
|
+
"lerna:publish": string;
|
|
9
|
+
"lerna:publish:yes": string;
|
|
10
|
+
"prepublishOnly:root": string;
|
|
11
|
+
"prepublishOnly:lockfile": string;
|
|
12
|
+
"prepublishOnly:check-bin": string;
|
|
13
|
+
"prepare:fix-ws-links": string;
|
|
14
|
+
"prepublishOnly:update": string;
|
|
15
|
+
ncu: string;
|
|
16
|
+
"ncu:root": string;
|
|
17
|
+
"ncu:ws": string;
|
|
18
|
+
"sort-package-json": string;
|
|
19
|
+
"sort-package-json:root": string;
|
|
20
|
+
"sort-package-json:ws": string;
|
|
21
|
+
postpublishOnly: string;
|
|
22
|
+
"postpublishOnly:ws-root-changelog": string;
|
|
23
|
+
test: string;
|
|
24
|
+
"install:reset-lockfile": string;
|
|
25
|
+
"ws:fix-all": string;
|
|
26
|
+
"tsc:showConfig": string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultWorkspaceRootScripts = void 0;
|
|
4
|
+
function defaultWorkspaceRootScripts() {
|
|
5
|
+
return {
|
|
6
|
+
"test:all": "lerna run test --concurrency 1",
|
|
7
|
+
"build:all": "lerna run build --concurrency 1",
|
|
8
|
+
"review:all": "lerna run review --concurrency 1",
|
|
9
|
+
"coverage:all": "lerna run coverage --concurrency 1",
|
|
10
|
+
"lint:all": "lerna run lint --concurrency 1",
|
|
11
|
+
"preversion": "yt ws run test",
|
|
12
|
+
"lerna:publish": "yarn run prepublishOnly:root && lerna publish && yarn run postpublishOnly",
|
|
13
|
+
"lerna:publish:yes": "yarn run prepublishOnly:root && lerna publish --yes --bump patch && yarn run postpublishOnly",
|
|
14
|
+
"prepublishOnly:root": "yarn run prepublishOnly:check-bin && yarn run prepare:fix-ws-links",
|
|
15
|
+
"prepublishOnly:lockfile": "ynpx --quiet sync-lockfile",
|
|
16
|
+
"prepublishOnly:check-bin": "ynpx --quiet @yarn-tool/check-pkg-bin",
|
|
17
|
+
"prepare:fix-ws-links": "ynpx --quiet @yarn-tool/fix-ws-links",
|
|
18
|
+
"prepublishOnly:update": "yarn run ncu && yarn run sort-package-json",
|
|
19
|
+
"ncu": "yarn run ncu:root && yarn run ncu:ws",
|
|
20
|
+
"ncu:root": "yarn-tool ncu -u",
|
|
21
|
+
"ncu:ws": "yarn-tool ws exec yarn-tool ncu -- -u",
|
|
22
|
+
"sort-package-json": "yarn run sort-package-json:root && yarn run sort-package-json:ws",
|
|
23
|
+
"sort-package-json:root": "yarn-tool sort",
|
|
24
|
+
"sort-package-json:ws": "yarn-tool ws sort",
|
|
25
|
+
"postpublishOnly": "yarn run postpublishOnly:ws-root-changelog & echo postpublishOnly",
|
|
26
|
+
"postpublishOnly:ws-root-changelog": "ynpx ws-root-changelog & git add ./CHANGELOG.md & git commit ./CHANGELOG.md -m \"chore(changelog): update changelog toc in workspaces root\" & echo update changelog toc in workspaces root",
|
|
27
|
+
"test": "yarn-tool ws run test",
|
|
28
|
+
"install:reset-lockfile": "yarn-tool install --reset-lockfile",
|
|
29
|
+
"ws:fix-all": "yarn-tool fix-all --overwriteHostedGitInfo",
|
|
30
|
+
"tsc:showConfig": "ynpx get-current-tsconfig -p",
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
exports.defaultWorkspaceRootScripts = defaultWorkspaceRootScripts;
|
|
34
|
+
//# sourceMappingURL=ws-root-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";;;AAAA,SAAgB,2BAA2B;IAE1C,OAAO;QACN,UAAU,EAAE,gCAAgC;QAC5C,WAAW,EAAE,iCAAiC;QAC9C,YAAY,EAAE,kCAAkC;QAChD,cAAc,EAAE,oCAAoC;QACpD,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,gBAAgB;QAC9B,eAAe,EAAE,2EAA2E;QAC5F,mBAAmB,EAAE,8FAA8F;QACnH,qBAAqB,EAAE,oEAAoE;QAC3F,yBAAyB,EAAE,4BAA4B;QACvD,0BAA0B,EAAE,uCAAuC;QACnE,sBAAsB,EAAE,sCAAsC;QAC9D,uBAAuB,EAAE,4CAA4C;QACrE,KAAK,EAAE,sCAAsC;QAC7C,UAAU,EAAE,kBAAkB;QAC9B,QAAQ,EAAE,uCAAuC;QACjD,mBAAmB,EAAE,kEAAkE;QACvF,wBAAwB,EAAE,gBAAgB;QAC1C,sBAAsB,EAAE,mBAAmB;QAC3C,iBAAiB,EAAE,mEAAmE;QACtF,mCAAmC,EAAE,6LAA6L;QAClO,MAAM,EAAE,uBAAuB;QAC/B,wBAAwB,EAAE,oCAAoC;QAC9D,YAAY,EAAC,6CAA6C;QAC1D,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AA7BD,kEA6BC","sourcesContent":["export function defaultWorkspaceRootScripts()\n{\n\treturn {\n\t\t\"test:all\": \"lerna run test --concurrency 1\",\n\t\t\"build:all\": \"lerna run build --concurrency 1\",\n\t\t\"review:all\": \"lerna run review --concurrency 1\",\n\t\t\"coverage:all\": \"lerna run coverage --concurrency 1\",\n\t\t\"lint:all\": \"lerna run lint --concurrency 1\",\n\t\t\"preversion\": \"yt ws run test\",\n\t\t\"lerna:publish\": \"yarn run prepublishOnly:root && lerna publish && yarn run postpublishOnly\",\n\t\t\"lerna:publish:yes\": \"yarn run prepublishOnly:root && lerna publish --yes --bump patch && yarn run postpublishOnly\",\n\t\t\"prepublishOnly:root\": \"yarn run prepublishOnly:check-bin && yarn run prepare:fix-ws-links\",\n\t\t\"prepublishOnly:lockfile\": \"ynpx --quiet sync-lockfile\",\n\t\t\"prepublishOnly:check-bin\": \"ynpx --quiet @yarn-tool/check-pkg-bin\",\n\t\t\"prepare:fix-ws-links\": \"ynpx --quiet @yarn-tool/fix-ws-links\",\n\t\t\"prepublishOnly:update\": \"yarn run ncu && yarn run sort-package-json\",\n\t\t\"ncu\": \"yarn run ncu:root && yarn run ncu:ws\",\n\t\t\"ncu:root\": \"yarn-tool ncu -u\",\n\t\t\"ncu:ws\": \"yarn-tool ws exec yarn-tool ncu -- -u\",\n\t\t\"sort-package-json\": \"yarn run sort-package-json:root && yarn run sort-package-json:ws\",\n\t\t\"sort-package-json:root\": \"yarn-tool sort\",\n\t\t\"sort-package-json:ws\": \"yarn-tool ws sort\",\n\t\t\"postpublishOnly\": \"yarn run postpublishOnly:ws-root-changelog & echo postpublishOnly\",\n\t\t\"postpublishOnly:ws-root-changelog\": \"ynpx ws-root-changelog & git add ./CHANGELOG.md & git commit ./CHANGELOG.md -m \\\"chore(changelog): update changelog toc in workspaces root\\\" & echo update changelog toc in workspaces root\",\n\t\t\"test\": \"yarn-tool ws run test\",\n\t\t\"install:reset-lockfile\": \"yarn-tool install --reset-lockfile\",\n\t\t\"ws:fix-all\":\"yarn-tool fix-all --overwriteHostedGitInfo\",\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\n\t}\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarn-tool/pkg-entry-util",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yarn",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
63
|
"packageManager": "yarn@^1.22.11",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "8064859970d5e7ab3e0568475c804767fc70f382"
|
|
65
65
|
}
|