-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d82441
commit fa83e8f
Showing
14 changed files
with
179 additions
and
113 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string): T; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string) | ||
{ | ||
// @ts-ignore | ||
scripts ??= {}; | ||
|
||
let text = `echo ${prefix ?? ''}`.trim(); | ||
|
||
([ | ||
'preversion', | ||
'version', | ||
'prepublishOnly', | ||
'postversion', | ||
'publish', | ||
'prepublish', | ||
'postpublish', | ||
'postpublishOnly', | ||
'prepare', | ||
'prepack', | ||
'pack', | ||
'postpack', | ||
] as const).forEach(k => | ||
{ | ||
// @ts-ignore | ||
scripts[k] ??= `${text} ${k}` | ||
}); | ||
return scripts; | ||
} |
27 changes: 27 additions & 0 deletions
27
packages/@yarn-tool/pkg-entry-util/lib/preset/ws-root-scripts.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export declare function defaultWorkspaceRootScripts(): { | ||
"test:all": string; | ||
"build:all": string; | ||
"review:all": string; | ||
"coverage:all": string; | ||
"lint:all": string; | ||
preversion: string; | ||
"lerna:publish": string; | ||
"lerna:publish:yes": string; | ||
"prepublishOnly:root": string; | ||
"prepublishOnly:lockfile": string; | ||
"prepublishOnly:check-bin": string; | ||
"prepare:fix-ws-links": string; | ||
"prepublishOnly:update": string; | ||
ncu: string; | ||
"ncu:root": string; | ||
"ncu:ws": string; | ||
"sort-package-json": string; | ||
"sort-package-json:root": string; | ||
"sort-package-json:ws": string; | ||
postpublishOnly: string; | ||
"postpublishOnly:ws-root-changelog": string; | ||
test: string; | ||
"install:reset-lockfile": string; | ||
"ws:fix-all": string; | ||
"tsc:showConfig": string; | ||
}; |
34 changes: 34 additions & 0 deletions
34
packages/@yarn-tool/pkg-entry-util/lib/preset/ws-root-scripts.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
packages/@yarn-tool/pkg-entry-util/lib/preset/ws-root-scripts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export function defaultWorkspaceRootScripts() | ||
{ | ||
return { | ||
"test:all": "lerna run test --concurrency 1", | ||
"build:all": "lerna run build --concurrency 1", | ||
"review:all": "lerna run review --concurrency 1", | ||
"coverage:all": "lerna run coverage --concurrency 1", | ||
"lint:all": "lerna run lint --concurrency 1", | ||
"preversion": "yt ws run test", | ||
"lerna:publish": "yarn run prepublishOnly:root && lerna publish && yarn run postpublishOnly", | ||
"lerna:publish:yes": "yarn run prepublishOnly:root && lerna publish --yes --bump patch && yarn run postpublishOnly", | ||
"prepublishOnly:root": "yarn run prepublishOnly:check-bin && yarn run prepare:fix-ws-links", | ||
"prepublishOnly:lockfile": "ynpx --quiet sync-lockfile", | ||
"prepublishOnly:check-bin": "ynpx --quiet @yarn-tool/check-pkg-bin", | ||
"prepare:fix-ws-links": "ynpx --quiet @yarn-tool/fix-ws-links", | ||
"prepublishOnly:update": "yarn run ncu && yarn run sort-package-json", | ||
"ncu": "yarn run ncu:root && yarn run ncu:ws", | ||
"ncu:root": "yarn-tool ncu -u", | ||
"ncu:ws": "yarn-tool ws exec yarn-tool ncu -- -u", | ||
"sort-package-json": "yarn run sort-package-json:root && yarn run sort-package-json:ws", | ||
"sort-package-json:root": "yarn-tool sort", | ||
"sort-package-json:ws": "yarn-tool ws sort", | ||
"postpublishOnly": "yarn run postpublishOnly:ws-root-changelog & echo postpublishOnly", | ||
"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", | ||
"test": "yarn-tool ws run test", | ||
"install:reset-lockfile": "yarn-tool install --reset-lockfile", | ||
"ws:fix-all":"yarn-tool fix-all --overwriteHostedGitInfo", | ||
"tsc:showConfig": "ynpx get-current-tsconfig -p", | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.