зеркало из https://github.com/microsoft/just.git
Remove just-scripts-utils and just-task-logger packages
This commit is contained in:
Родитель
8484242cfb
Коммит
a2a693aa73
|
@ -20,15 +20,6 @@ All the documentation is online at https://microsoft.github.io/just/
|
|||
|
||||
See the [contributing instructions](./.github/CONTRIBUTING.md).
|
||||
|
||||
## Packages
|
||||
|
||||
| Package | Description |
|
||||
| -------------------- | -------------------------------------------------------------------------------- |
|
||||
| `just-task` | The task definition library that wraps `undertaker` and `yargs-parser` libraries |
|
||||
| `just-scripts` | A reusable preset of frequently used tasks in node and browser projects |
|
||||
| `just-scripts-utils` | A set of utilities for `just-scripts` |
|
||||
| `just-task-logger` | A shared pretty logger used to display timestamps along with a message |
|
||||
|
||||
## Contributing
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. Please refer [Contribution guide](https://github.com/microsoft/just/.github/CONTRIBUTING.md) for more details
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"type": "minor",
|
||||
"comment": "Merge just-scripts-utils into this package",
|
||||
"packageName": "just-scripts",
|
||||
"email": "elcraig@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
},
|
||||
{
|
||||
"type": "minor",
|
||||
"comment": "Merge just-task-logger into this package",
|
||||
"packageName": "just-task",
|
||||
"email": "elcraig@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
CHANGELOG.*
|
||||
__tests__
|
|
@ -1,833 +0,0 @@
|
|||
{
|
||||
"name": "just-scripts-utils",
|
||||
"entries": [
|
||||
{
|
||||
"date": "Thu, 09 Mar 2023 08:02:09 GMT",
|
||||
"tag": "just-scripts-utils_v2.0.0",
|
||||
"version": "2.0.0",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "a509c1d0a5483b3e688f400c73da5969f5ae42c7",
|
||||
"comment": "Remove unused dep on `yargs`"
|
||||
},
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "8d487af7c6de3abe574921f3c408e0eeb922867e",
|
||||
"comment": "Remove unused deps on `glob` and `tar`"
|
||||
}
|
||||
],
|
||||
"major": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "8d487af7c6de3abe574921f3c408e0eeb922867e",
|
||||
"comment": "Remove unused `prettyPrintMarkdown` function and related deps (`marked`, `marked-terminal`)"
|
||||
},
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "8d487af7c6de3abe574921f3c408e0eeb922867e",
|
||||
"comment": "Remove unused `findMonoRepoRootPath` function"
|
||||
},
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "8d487af7c6de3abe574921f3c408e0eeb922867e",
|
||||
"comment": "Remove unused functions `rushUpdate`, `readRushJson`, `rushAddPackage` and related dep `jju`"
|
||||
},
|
||||
{
|
||||
"author": "beachball",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Bump just-task-logger to v1.2.1",
|
||||
"commit": "77dab724dfe9e042887caa13e8f2a7e66e33b570"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Thu, 09 Mar 2023 05:44:11 GMT",
|
||||
"tag": "just-scripts-utils_v1.2.1",
|
||||
"version": "1.2.1",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "c3711804c41b2abfb2df4766acc83be68b137b56",
|
||||
"comment": "Update mock-fs usage in tests"
|
||||
}
|
||||
],
|
||||
"patch": [
|
||||
{
|
||||
"author": "renovate@whitesourcesoftware.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "b85a978f31cbda6e61635389255190046089ce35",
|
||||
"comment": "Update dependency marked-terminal to v5"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 17 Feb 2023 23:04:40 GMT",
|
||||
"tag": "just-scripts-utils_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "db5d23d8fce67da62801311c83ff7c9036b21547",
|
||||
"comment": "Update devDependency @types/tar to v6.1.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Wed, 15 Feb 2023 08:01:34 GMT",
|
||||
"tag": "just-scripts-utils_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "df8892c64a12d738ee6e3af85b1faa69691d6dbf",
|
||||
"comment": "Update devDependency @types/yargs to v15.0.15"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 16 Dec 2022 08:02:09 GMT",
|
||||
"tag": "just-scripts-utils_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "7130869cff3e99722dcfad1823ae31611e7662bd",
|
||||
"comment": "Update @types devDependencies"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Sat, 19 Nov 2022 08:02:12 GMT",
|
||||
"tag": "just-scripts-utils_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "a1d4ca0f23c165cffc4c673c7a098c60401922c9",
|
||||
"comment": "Hoist widely-used devDependencies"
|
||||
},
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "61b714896f9600fb0d494927dedd92d52fa355d3",
|
||||
"comment": "Remove unused devDependency"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 18 Nov 2022 22:40:12 GMT",
|
||||
"tag": "just-scripts-utils_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "85d42c8a7e89413ee51b4fe9f731ad0e869addcd",
|
||||
"comment": "Require Node 14"
|
||||
},
|
||||
{
|
||||
"author": "beachball",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Bump just-task-logger to v1.2.0",
|
||||
"commit": "cccdde9738e63849969dc75300ff98d8f3fa9ffc"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Thu, 10 Nov 2022 08:02:07 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.7",
|
||||
"version": "1.1.7",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "78a1861afef421619ade087cc978f4253301ee84",
|
||||
"comment": "Update devDependency @types/semver to v7.3.13"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 30 Sep 2022 08:05:55 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.7",
|
||||
"version": "1.1.7",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "713b2a4514bc0b682b773f93749db41d02149723",
|
||||
"comment": "Update devDependency @types/tar to v6.1.3"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Sat, 10 Sep 2022 08:02:45 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.7",
|
||||
"version": "1.1.7",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "d2e870d10683d1809a4c11fda827aa5c3acb99b0",
|
||||
"comment": "Update devDependency @types/tar to v6"
|
||||
},
|
||||
{
|
||||
"author": "renovate@whitesourcesoftware.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "a0b21703c4b4330b1c885261c11486cb786eac0e",
|
||||
"comment": "Update devDependency @types/fs-extra to v9"
|
||||
}
|
||||
],
|
||||
"patch": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "0760a3c3afe3b93c501fb2cf9f0ffdf6ff995f2d",
|
||||
"comment": "Update dependency fs-extra to v10"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Sat, 10 Sep 2022 00:19:03 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.6",
|
||||
"version": "1.1.6",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "9fd466eb0c24ae5f5fed3381acfe229e74cc1bde",
|
||||
"comment": "Specify Node 12+ engines requirement"
|
||||
},
|
||||
{
|
||||
"author": "beachball",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Bump just-task-logger to v1.1.2",
|
||||
"commit": "9fd466eb0c24ae5f5fed3381acfe229e74cc1bde"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 08:02:06 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.5",
|
||||
"version": "1.1.5",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "c08c46745a95efabab5dbfc0f216d2e3b94ae03f",
|
||||
"comment": "Update devDependency mock-fs to v4.14.0"
|
||||
},
|
||||
{
|
||||
"author": "renovate@whitesourcesoftware.com",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "32b2d44a637fcfca27c0a2c1fbc80d25bb60d7ce",
|
||||
"comment": "Update devDependency ts-jest to v26.5.6"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 01:49:38 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.5",
|
||||
"version": "1.1.5",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "f080946c01915c3cff7445928b2697729fc2e93d",
|
||||
"comment": "Update @types packages"
|
||||
},
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "468be8479149975f59ee25f7f006afcc26746303",
|
||||
"comment": "Update devDependency @types/jju to v1.4.2"
|
||||
},
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "a88704b4f1f046e1440c0944145a8045273904c3",
|
||||
"comment": "Update devDependency @types/node to v12"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 00:10:40 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.5",
|
||||
"version": "1.1.5",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "renovate@whitesourcesoftware.com",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Update devDependency @types/marked to v4.0.7",
|
||||
"commit": "3c53024cf02a739c5cdc9f37db64020d190ad916"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 00:10:23 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.5",
|
||||
"version": "1.1.5",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "renovate@whitesourcesoftware.com",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Update devDependency @types/marked to v4.0.7",
|
||||
"commit": "ac702fe1b1b115a243f418fea2821729e38eb3ec"
|
||||
},
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Update devDependency @types/fs-extra to v8.1.2",
|
||||
"commit": "ac702fe1b1b115a243f418fea2821729e38eb3ec"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 00:04:18 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.5",
|
||||
"version": "1.1.5",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Pin devDependencies",
|
||||
"commit": "0dca4fef66c833623c3b923f426ee44d6887c5fe"
|
||||
},
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-scripts-utils",
|
||||
"commit": "0dca4fef66c833623c3b923f426ee44d6887c5fe",
|
||||
"comment": "Bump just-scripts-utils to v1.1.5"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Thu, 27 Jan 2022 23:06:07 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.5",
|
||||
"version": "1.1.5",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Bump marked to 4.0.12",
|
||||
"commit": "61ff9720d4347a4d050615472eb658c8ade55573"
|
||||
},
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-scripts-utils",
|
||||
"comment": "Remove unused handlebars dep",
|
||||
"commit": "61ff9720d4347a4d050615472eb658c8ade55573"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Wed, 04 Aug 2021 17:43:24 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.4",
|
||||
"version": "1.1.4",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Bump tar from 6.1.0 to 6.1.6",
|
||||
"author": "not specified",
|
||||
"commit": "10aa4fa4fa3f05e4cd7f963d130c131026241bc2",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Tue, 13 Jul 2021 17:19:50 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.3",
|
||||
"version": "1.1.3",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Error when parallel process is terminated",
|
||||
"author": "iancra@microsoft.com",
|
||||
"commit": "9a06e82c44800efb1eab26b0614c9a3136889dee",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Tue, 09 Feb 2021 03:08:41 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.2",
|
||||
"version": "1.1.2",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Bump marked to 2.0.0",
|
||||
"author": "dannyvv@microsoft.com",
|
||||
"commit": "a26e07ee6d0625f223a986e417f35f30b739437c",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Thu, 14 Jan 2021 20:55:06 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.1",
|
||||
"version": "1.1.1",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "fixing release pipeline and the empty lib folder",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "dd4f1b0db3fb6ce3769ed38ebf410bcc6d4da567",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Wed, 13 Jan 2021 23:22:52 GMT",
|
||||
"tag": "just-scripts-utils_v1.1.0",
|
||||
"version": "1.1.0",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Update typescript and other dependencies",
|
||||
"author": "elcraig@microsoft.com",
|
||||
"commit": "560caa2639b064a15764d7b5b58b64b620b59c35",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
],
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Bump just-task-logger to v1.1.0",
|
||||
"author": "elcraig@microsoft.com",
|
||||
"commit": "560caa2639b064a15764d7b5b58b64b620b59c35",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Mon, 02 Nov 2020 18:02:45 GMT",
|
||||
"tag": "just-scripts-utils_v1.0.3",
|
||||
"version": "1.0.3",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Update marked dependency to latest",
|
||||
"author": "1581488+christiango@users.noreply.github.com",
|
||||
"commit": "9ca62fa5f119301a4e6ece35d872dc89d2a0b3ce",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Mon, 02 Nov 2020 16:42:46 GMT",
|
||||
"tag": "just-scripts-utils_v1.0.2",
|
||||
"version": "1.0.2",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Bump yargs dependency",
|
||||
"author": "1581488+christiango@users.noreply.github.com",
|
||||
"commit": "bbbf4bb4b366c4df0cebb429c944d610b67d6d0f",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Mon, 02 Nov 2020 16:26:27 GMT",
|
||||
"tag": "just-scripts-utils_v1.0.1",
|
||||
"version": "1.0.1",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Publish src folder",
|
||||
"author": "1581488+christiango@users.noreply.github.com",
|
||||
"commit": "b5b171c31a995398d4bd6cbb0aa3ff2cf559afc3",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Tue, 06 Oct 2020 23:06:25 GMT",
|
||||
"tag": "just-scripts-utils_v1.0.0",
|
||||
"version": "1.0.0",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Remove implicit SDI usage",
|
||||
"author": "darthtrevino@gmail.com",
|
||||
"commit": "2301badd04f2581b262ff7ec304f612c717efc8c",
|
||||
"package": "just-scripts-utils"
|
||||
},
|
||||
{
|
||||
"comment": "fixes publish",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "2d81870dfead736767e12ab220d7f4001b5fe94e",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
],
|
||||
"major": [
|
||||
{
|
||||
"comment": "removed just-stack-*",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "7f6c1c32d5715a33b2a8be066796e941b4d9558b",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 12 Jun 2020 00:43:50 GMT",
|
||||
"tag": "just-scripts-utils_v0.9.1",
|
||||
"version": "0.9.1",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Fix downloadPackage unit test on clients running Node 12.",
|
||||
"author": "jagore@microsoft.com",
|
||||
"commit": "e4bcba65f863450ec4d82f6de24591e6eec82948",
|
||||
"package": "just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Mon, 13 Apr 2020 15:57:30 GMT",
|
||||
"tag": "just-scripts-utils_v0.9.0",
|
||||
"version": "0.9.0",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Add execSync utility",
|
||||
"author": "elcraig@microsoft.com",
|
||||
"commit": "91c6179993b4cc25076b8511b4d5d4726cd402d4"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Tue, 13 Aug 2019 21:00:51 GMT",
|
||||
"tag": "just-scripts-utils_v0.8.4",
|
||||
"version": "0.8.4",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Upgraded marked to 0.7.0 and marked-terminal to 3.3.0",
|
||||
"author": "altinokd@microsoft.com",
|
||||
"commit": "003c41cf6d3d3ac5bce48c6966475fcb6ceb7406"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Mon, 05 Aug 2019 06:10:22 GMT",
|
||||
"tag": "just-scripts-utils_v0.8.3",
|
||||
"version": "0.8.3",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Switches to using plop.js for codegen",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "2ea4e433c300ed8323aaab0fcf03f927ba8ab78b"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.8.1",
|
||||
"tag": "just-scripts-utils_v0.8.1",
|
||||
"date": "Sat, 01 Jun 2019 04:59:34 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Fix downloadPackage tests"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.8.0",
|
||||
"tag": "just-scripts-utils_v0.8.0",
|
||||
"date": "Fri, 31 May 2019 21:15:02 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Adds the ability to override registry in downloadPackage"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.7.3",
|
||||
"tag": "just-scripts-utils_v0.7.3",
|
||||
"date": "Wed, 15 May 2019 18:44:04 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Switch microsoft in repo URL to lowercase"
|
||||
}
|
||||
],
|
||||
"dependency": [
|
||||
{
|
||||
"comment": "Updating dependency \"just-task-logger\" from `>=0.2.0 <1.0.0` to `>=0.2.1 <1.0.0`"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.7.2",
|
||||
"tag": "just-scripts-utils_v0.7.2",
|
||||
"date": "Thu, 25 Apr 2019 18:29:49 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Fix #78 by using Spawn instead of Exec"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.7.1",
|
||||
"tag": "just-scripts-utils_v0.7.1",
|
||||
"date": "Wed, 24 Apr 2019 23:38:23 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "up dep"
|
||||
},
|
||||
{
|
||||
"comment": "add ability to use path for template"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.7.0",
|
||||
"tag": "just-scripts-utils_v0.7.0",
|
||||
"date": "Wed, 10 Apr 2019 20:30:38 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Fixing up the temp path to also use version in path"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.6.1",
|
||||
"tag": "just-scripts-utils_v0.6.1",
|
||||
"date": "Tue, 12 Mar 2019 20:07:18 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Exec error handling improvements"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.6.0",
|
||||
"tag": "just-scripts-utils_v0.6.0",
|
||||
"date": "Fri, 22 Feb 2019 23:37:36 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Consistent interface naming"
|
||||
}
|
||||
],
|
||||
"dependency": [
|
||||
{
|
||||
"comment": "Updating dependency \"just-task-logger\" from `>=0.1.2 <1.0.0` to `>=0.2.0 <1.0.0`"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.5.0",
|
||||
"tag": "just-scripts-utils_v0.5.0",
|
||||
"date": "Fri, 22 Feb 2019 22:50:01 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Move exec to just-scripts-utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.4.2",
|
||||
"tag": "just-scripts-utils_v0.4.2",
|
||||
"date": "Fri, 22 Feb 2019 19:03:38 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Update package metadata"
|
||||
}
|
||||
],
|
||||
"dependency": [
|
||||
{
|
||||
"comment": "Updating dependency \"just-task-logger\" from `>=0.1.1 <1.0.0` to `>=0.1.2 <1.0.0`"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.4.1",
|
||||
"tag": "just-scripts-utils_v0.4.1",
|
||||
"date": "Thu, 21 Feb 2019 23:25:53 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Use new logger package"
|
||||
}
|
||||
],
|
||||
"dependency": [
|
||||
{
|
||||
"comment": "Updating dependency \"just-task-logger\" from `>=0.1.0 <1.0.0` to `>=0.1.1 <1.0.0`"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.4.0",
|
||||
"tag": "just-scripts-utils_v0.4.0",
|
||||
"date": "Wed, 13 Feb 2019 22:31:47 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "API updates and error checking"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.3.3",
|
||||
"tag": "just-scripts-utils_v0.3.3",
|
||||
"date": "Mon, 04 Feb 2019 05:47:04 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "flexibility change"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.3.2",
|
||||
"tag": "just-scripts-utils_v0.3.2",
|
||||
"date": "Fri, 25 Jan 2019 07:08:59 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Fixes"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.3.1",
|
||||
"tag": "just-scripts-utils_v0.3.1",
|
||||
"date": "Wed, 23 Jan 2019 00:05:38 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "info as it is adding package"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.3.0",
|
||||
"tag": "just-scripts-utils_v0.3.0",
|
||||
"date": "Tue, 22 Jan 2019 22:31:23 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "move utils from scripts to here"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.2.2",
|
||||
"tag": "just-scripts-utils_v0.2.2",
|
||||
"date": "Mon, 21 Jan 2019 03:27:17 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "fix scripts to transform correctly with subdirs"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.2.1",
|
||||
"tag": "just-scripts-utils_v0.2.1",
|
||||
"date": "Mon, 21 Jan 2019 02:54:15 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "fix upgrade stack task"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"tag": "just-scripts-utils_v0.2.0",
|
||||
"date": "Mon, 21 Jan 2019 02:21:01 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "new publish!"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,320 +0,0 @@
|
|||
# Change Log - just-scripts-utils
|
||||
|
||||
This log was last generated on Thu, 09 Mar 2023 08:02:09 GMT and should not be manually modified.
|
||||
|
||||
<!-- Start content -->
|
||||
|
||||
## 2.0.0
|
||||
|
||||
Thu, 09 Mar 2023 08:02:09 GMT
|
||||
|
||||
### Major changes
|
||||
|
||||
- Remove unused `prettyPrintMarkdown` function and related deps (`marked`, `marked-terminal`) (elcraig@microsoft.com)
|
||||
- Remove unused `findMonoRepoRootPath` function (elcraig@microsoft.com)
|
||||
- Remove unused functions `rushUpdate`, `readRushJson`, `rushAddPackage` and related dep `jju` (elcraig@microsoft.com)
|
||||
- Bump just-task-logger to v1.2.1
|
||||
|
||||
### Patches
|
||||
|
||||
- Remove unused dep on `yargs` (elcraig@microsoft.com)
|
||||
- Remove unused deps on `glob` and `tar` (elcraig@microsoft.com)
|
||||
|
||||
## 1.2.1
|
||||
|
||||
Thu, 09 Mar 2023 05:44:11 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Update dependency marked-terminal to v5 (renovate@whitesourcesoftware.com)
|
||||
|
||||
## 1.2.0
|
||||
|
||||
Fri, 18 Nov 2022 22:40:12 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Require Node 14 (elcraig@microsoft.com)
|
||||
- Bump just-task-logger to v1.2.0
|
||||
|
||||
## 1.1.7
|
||||
|
||||
Sat, 10 Sep 2022 08:02:45 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Update dependency fs-extra to v10 (email not defined)
|
||||
|
||||
## 1.1.6
|
||||
|
||||
Sat, 10 Sep 2022 00:19:03 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Specify Node 12+ engines requirement (elcraig@microsoft.com)
|
||||
- Bump just-task-logger to v1.1.2
|
||||
|
||||
## 1.1.5
|
||||
|
||||
Thu, 27 Jan 2022 23:06:07 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Bump marked to 4.0.12 (elcraig@microsoft.com)
|
||||
- Remove unused handlebars dep (elcraig@microsoft.com)
|
||||
|
||||
## 1.1.4
|
||||
|
||||
Wed, 04 Aug 2021 17:43:24 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Bump tar from 6.1.0 to 6.1.6 (not specified)
|
||||
|
||||
## 1.1.3
|
||||
|
||||
Tue, 13 Jul 2021 17:19:50 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Error when parallel process is terminated (iancra@microsoft.com)
|
||||
|
||||
## 1.1.2
|
||||
|
||||
Tue, 09 Feb 2021 03:08:41 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Bump marked to 2.0.0 (dannyvv@microsoft.com)
|
||||
|
||||
## 1.1.1
|
||||
|
||||
Thu, 14 Jan 2021 20:55:06 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- fixing release pipeline and the empty lib folder (kchau@microsoft.com)
|
||||
|
||||
## 1.1.0
|
||||
|
||||
Wed, 13 Jan 2021 23:22:52 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Update typescript and other dependencies (elcraig@microsoft.com)
|
||||
|
||||
### Patches
|
||||
|
||||
- Bump just-task-logger to v1.1.0 (elcraig@microsoft.com)
|
||||
|
||||
## 1.0.3
|
||||
|
||||
Mon, 02 Nov 2020 18:02:45 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Update marked dependency to latest (1581488+christiango@users.noreply.github.com)
|
||||
|
||||
## 1.0.2
|
||||
|
||||
Mon, 02 Nov 2020 16:42:46 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Bump yargs dependency (1581488+christiango@users.noreply.github.com)
|
||||
|
||||
## 1.0.1
|
||||
|
||||
Mon, 02 Nov 2020 16:26:27 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Publish src folder (1581488+christiango@users.noreply.github.com)
|
||||
|
||||
## 1.0.0
|
||||
|
||||
Tue, 06 Oct 2020 23:06:25 GMT
|
||||
|
||||
### Major changes
|
||||
|
||||
- removed just-stack-* (kchau@microsoft.com)
|
||||
|
||||
### Patches
|
||||
|
||||
- Remove implicit SDI usage (darthtrevino@gmail.com)
|
||||
- fixes publish (kchau@microsoft.com)
|
||||
|
||||
## 0.9.1
|
||||
|
||||
Fri, 12 Jun 2020 00:43:50 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Fix downloadPackage unit test on clients running Node 12. (jagore@microsoft.com)
|
||||
|
||||
## 0.9.0
|
||||
Mon, 13 Apr 2020 15:57:30 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Add execSync utility (elcraig@microsoft.com)
|
||||
## 0.8.4
|
||||
Tue, 13 Aug 2019 21:00:51 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Upgraded marked to 0.7.0 and marked-terminal to 3.3.0 (altinokd@microsoft.com)
|
||||
|
||||
## 0.8.3
|
||||
Mon, 05 Aug 2019 06:10:22 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Switches to using plop.js for codegen (kchau@microsoft.com)
|
||||
|
||||
## 0.8.2
|
||||
Mon, 01 Jul 2019 20:15:20 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- introduce ESLint to sources (43081j@users.noreply.github.com)
|
||||
|
||||
## 0.8.1
|
||||
Wed, 12 Jun 2019 02:03:29 GMT
|
||||
|
||||
## 0.8.1
|
||||
Wed, 12 Jun 2019 01:49:55 GMT
|
||||
|
||||
## 0.8.1
|
||||
Sat, 01 Jun 2019 04:59:34 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Fix downloadPackage tests
|
||||
|
||||
## 0.8.0
|
||||
Fri, 31 May 2019 21:15:02 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Adds the ability to override registry in downloadPackage
|
||||
|
||||
## 0.7.3
|
||||
Wed, 15 May 2019 18:44:04 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Switch microsoft in repo URL to lowercase
|
||||
|
||||
## 0.7.2
|
||||
Thu, 25 Apr 2019 18:29:49 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Fix #78 by using Spawn instead of Exec
|
||||
|
||||
## 0.7.1
|
||||
Wed, 24 Apr 2019 23:38:23 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- up dep
|
||||
- add ability to use path for template
|
||||
|
||||
## 0.7.0
|
||||
Wed, 10 Apr 2019 20:30:38 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Fixing up the temp path to also use version in path
|
||||
|
||||
## 0.6.1
|
||||
Tue, 12 Mar 2019 20:07:18 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Exec error handling improvements
|
||||
|
||||
## 0.6.0
|
||||
Fri, 22 Feb 2019 23:37:36 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Consistent interface naming
|
||||
|
||||
## 0.5.0
|
||||
Fri, 22 Feb 2019 22:50:01 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Move exec to just-scripts-utils
|
||||
|
||||
## 0.4.2
|
||||
Fri, 22 Feb 2019 19:03:38 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Update package metadata
|
||||
|
||||
## 0.4.1
|
||||
Thu, 21 Feb 2019 23:25:53 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Use new logger package
|
||||
|
||||
## 0.4.0
|
||||
Wed, 13 Feb 2019 22:31:47 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- API updates and error checking
|
||||
|
||||
## 0.3.3
|
||||
Mon, 04 Feb 2019 05:47:04 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- flexibility change
|
||||
|
||||
## 0.3.2
|
||||
Fri, 25 Jan 2019 07:08:59 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Fixes
|
||||
|
||||
## 0.3.1
|
||||
Wed, 23 Jan 2019 00:05:38 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- info as it is adding package
|
||||
|
||||
## 0.3.0
|
||||
Tue, 22 Jan 2019 22:31:23 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- move utils from scripts to here
|
||||
|
||||
## 0.2.2
|
||||
Mon, 21 Jan 2019 03:27:17 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- fix scripts to transform correctly with subdirs
|
||||
|
||||
## 0.2.1
|
||||
Mon, 21 Jan 2019 02:54:15 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- fix upgrade stack task
|
||||
|
||||
## 0.2.0
|
||||
Mon, 21 Jan 2019 02:21:01 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- new publish!
|
|
@ -1 +0,0 @@
|
|||
module.exports = require('../../scripts/jest.config');
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"name": "just-scripts-utils",
|
||||
"version": "2.0.0",
|
||||
"description": "Utilities for Just stack scripts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/microsoft/just"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"start": "tsc -w --preserveWatchOutput",
|
||||
"test": "jest",
|
||||
"start-test": "jest --watch"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": "^10.0.0",
|
||||
"just-task-logger": ">=1.2.1 <2.0.0",
|
||||
"semver": "^7.0.0"
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
export interface RushProject {
|
||||
packageName: string;
|
||||
projectFolder: string;
|
||||
shouldPublish?: boolean;
|
||||
versionPolicyName?: string;
|
||||
}
|
||||
|
||||
export interface RushJson {
|
||||
projects: RushProject[];
|
||||
rushVersion: string;
|
||||
// more properties can be added as needed
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
export * from 'just-task-logger';
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
|
@ -29,7 +29,6 @@
|
|||
"diff-match-patch": "1.0.5",
|
||||
"fs-extra": "^10.0.0",
|
||||
"glob": "^7.1.3",
|
||||
"just-scripts-utils": "^2.0.0",
|
||||
"just-task": ">=1.7.1 <2.0.0",
|
||||
"prompts": "^2.4.0",
|
||||
"run-parallel-limit": "^1.0.6",
|
||||
|
|
|
@ -41,4 +41,4 @@ export { copyInstructions };
|
|||
|
||||
export * from 'just-task';
|
||||
|
||||
export { spawn } from 'just-scripts-utils';
|
||||
export { spawn } from './utils';
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
* Mock factory for the `just-scripts-utils/lib/exec` module. We don't want to really exec or spawn anything,
|
||||
* but we do want the rest of the exports to work.
|
||||
*/
|
||||
export function mockExecFactory() {
|
||||
const originalModule = jest.requireActual('just-scripts-utils/lib/exec');
|
||||
return {
|
||||
// Use real implementation of exports except for `exec` and `spawn`
|
||||
...originalModule,
|
||||
encodeArgs: jest
|
||||
.fn((cmdArgs: string[]) => {
|
||||
// Spy on encodeArgs, but keep its original implementation
|
||||
return originalModule.encodeArgs(cmdArgs);
|
||||
})
|
||||
.mockName('encodeArgs'),
|
||||
exec: jest
|
||||
.fn(() => {
|
||||
// Don't exec in real life
|
||||
return Promise.resolve();
|
||||
})
|
||||
.mockName('exec'),
|
||||
spawn: jest
|
||||
.fn(() => {
|
||||
// Don't spawn in real life
|
||||
return Promise.resolve();
|
||||
})
|
||||
.mockName('spawn'),
|
||||
};
|
||||
}
|
|
@ -1,14 +1,22 @@
|
|||
import * as mockfs from 'mock-fs';
|
||||
import { encodeArgs, exec, spawn } from 'just-scripts-utils';
|
||||
import { encodeArgs, exec, spawn } from '../../utils';
|
||||
import { TaskFunction } from 'just-task';
|
||||
import { tscTask, tscWatchTask, TscTaskOptions } from '../tscTask';
|
||||
import { callTaskForTest } from './callTaskForTest';
|
||||
import { normalizeCmdArgsForTest } from './normalizeCmdArgsForTest';
|
||||
|
||||
// Jest will hoist these before the imports above, so these modules will be mocked first
|
||||
jest.mock('just-scripts-utils/lib/exec', () => {
|
||||
const { mockExecFactory } = require('./mockExecFactory');
|
||||
return mockExecFactory();
|
||||
jest.mock('../../utils', () => {
|
||||
const originalModule = jest.requireActual('../../utils');
|
||||
return {
|
||||
// Use real implementation of most exports
|
||||
...originalModule,
|
||||
// Spy on encodeArgs, but keep its original implementation
|
||||
encodeArgs: jest.fn((cmdArgs: string[]) => originalModule.encodeArgs(cmdArgs)).mockName('encodeArgs'),
|
||||
// Don't exec or spawn anything
|
||||
exec: jest.fn(() => Promise.resolve()).mockName('exec'),
|
||||
spawn: jest.fn(() => Promise.resolve()).mockName('spawn'),
|
||||
};
|
||||
});
|
||||
jest.mock('just-task/lib/logger');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { resolve, logger, resolveCwd, TaskFunction } from 'just-task';
|
||||
import { encodeArgs, spawn } from 'just-scripts-utils';
|
||||
import { encodeArgs, spawn } from '../utils';
|
||||
import * as fs from 'fs';
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { resolve, logger, resolveCwd, TaskFunction, argv } from 'just-task';
|
||||
import { spawn, encodeArgs, readPackageJson } from 'just-scripts-utils';
|
||||
import { spawn, encodeArgs, readPackageJson } from '../utils';
|
||||
import { existsSync } from 'fs';
|
||||
import * as supportsColor from 'supports-color';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SpawnOptions } from 'child_process';
|
||||
import { spawn } from 'just-scripts-utils';
|
||||
import { spawn } from '../utils';
|
||||
import { logger, TaskFunction } from 'just-task';
|
||||
import { resolveCwd, _tryResolve } from 'just-task/lib/resolve';
|
||||
import { getTsNodeEnv } from '../typescript/getTsNodeEnv';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { logger, resolve, TaskFunction } from 'just-task';
|
||||
import { spawn } from 'just-scripts-utils';
|
||||
import { spawn } from '../utils';
|
||||
import { splitArrayIntoChunks } from '../arrayUtils/splitArrayIntoChunks';
|
||||
import * as path from 'path';
|
||||
import { arrayify } from '../arrayUtils/arrayify';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as ts from 'typescript';
|
||||
import { resolve, logger, resolveCwd, TaskFunction } from 'just-task';
|
||||
import { exec, encodeArgs, spawn } from 'just-scripts-utils';
|
||||
import { exec, encodeArgs, spawn } from '../utils';
|
||||
import * as fs from 'fs';
|
||||
|
||||
export type TscTaskOptions = { [key in keyof ts.CompilerOptions]?: string | boolean | string[] } & {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { resolve, logger, resolveCwd, TaskFunction } from 'just-task';
|
||||
import { exec, encodeArgs } from 'just-scripts-utils';
|
||||
import { exec, encodeArgs } from '../utils';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { logger, TaskFunction, resolve } from 'just-task';
|
||||
import { spawn } from 'just-scripts-utils';
|
||||
import { spawn } from '../utils';
|
||||
import { getTsNodeEnv } from '../typescript/getTsNodeEnv';
|
||||
import { findWebpackConfig } from '../webpack/findWebpackConfig';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// // WARNING: Careful about add more imports - only import types from webpack
|
||||
import { Configuration } from 'webpack';
|
||||
import { encodeArgs, spawn } from 'just-scripts-utils';
|
||||
import { encodeArgs, spawn } from '../utils';
|
||||
import { logger, resolve, resolveCwd, TaskFunction } from 'just-task';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { mergePackageJson, _shouldUpdateDep } from '../mergePackageJson';
|
||||
import { PackageJson } from '../interfaces/PackageJson';
|
||||
import { PackageJson } from '../../interfaces/PackageJson';
|
||||
|
||||
describe('_shouldUpdateDep', () => {
|
||||
it('returns true if old version is undefined', () => {
|
|
@ -1,7 +1,4 @@
|
|||
export * from './exec';
|
||||
export * from './interfaces/PackageJson';
|
||||
export * from './interfaces/RushJson';
|
||||
export * from './logger';
|
||||
export { mergePackageJson } from './mergePackageJson';
|
||||
export * from './paths';
|
||||
export * from './readPackageJson';
|
|
@ -1,4 +1,4 @@
|
|||
import { PackageJson } from './interfaces/PackageJson';
|
||||
import { PackageJson } from '../interfaces/PackageJson';
|
||||
import semver = require('semver');
|
||||
|
||||
/**
|
|
@ -1,5 +1,5 @@
|
|||
import * as path from 'path';
|
||||
import { PackageJson } from './interfaces/PackageJson';
|
||||
import { PackageJson } from '../interfaces/PackageJson';
|
||||
import fse = require('fs-extra');
|
||||
|
||||
/**
|
|
@ -1,2 +0,0 @@
|
|||
CHANGELOG.*
|
||||
__tests__
|
|
@ -1,288 +0,0 @@
|
|||
{
|
||||
"name": "just-task-logger",
|
||||
"entries": [
|
||||
{
|
||||
"date": "Thu, 09 Mar 2023 08:02:09 GMT",
|
||||
"tag": "just-task-logger_v1.2.1",
|
||||
"version": "1.2.1",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-task-logger",
|
||||
"commit": "a509c1d0a5483b3e688f400c73da5969f5ae42c7",
|
||||
"comment": "Use `yargs-parser` instead of `yargs` to get the `--verbose` argument"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Wed, 15 Feb 2023 08:01:34 GMT",
|
||||
"tag": "just-task-logger_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-task-logger",
|
||||
"commit": "df8892c64a12d738ee6e3af85b1faa69691d6dbf",
|
||||
"comment": "Update devDependency @types/yargs to v15.0.15"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Sat, 19 Nov 2022 08:02:12 GMT",
|
||||
"tag": "just-task-logger_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-task-logger",
|
||||
"commit": "a1d4ca0f23c165cffc4c673c7a098c60401922c9",
|
||||
"comment": "Hoist widely-used devDependencies"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 18 Nov 2022 22:40:12 GMT",
|
||||
"tag": "just-task-logger_v1.2.0",
|
||||
"version": "1.2.0",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-task-logger",
|
||||
"commit": "85d42c8a7e89413ee51b4fe9f731ad0e869addcd",
|
||||
"comment": "Require Node 14"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Sat, 10 Sep 2022 00:19:03 GMT",
|
||||
"tag": "just-task-logger_v1.1.2",
|
||||
"version": "1.1.2",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"author": "elcraig@microsoft.com",
|
||||
"package": "just-task-logger",
|
||||
"commit": "9fd466eb0c24ae5f5fed3381acfe229e74cc1bde",
|
||||
"comment": "Specify Node 12+ engines requirement"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 08:02:06 GMT",
|
||||
"tag": "just-task-logger_v1.1.1",
|
||||
"version": "1.1.1",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-task-logger",
|
||||
"commit": "c08c46745a95efabab5dbfc0f216d2e3b94ae03f",
|
||||
"comment": "Update devDependency mock-fs to v4.14.0"
|
||||
},
|
||||
{
|
||||
"author": "renovate@whitesourcesoftware.com",
|
||||
"package": "just-task-logger",
|
||||
"commit": "32b2d44a637fcfca27c0a2c1fbc80d25bb60d7ce",
|
||||
"comment": "Update devDependency ts-jest to v26.5.6"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 01:49:38 GMT",
|
||||
"tag": "just-task-logger_v1.1.1",
|
||||
"version": "1.1.1",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-task-logger",
|
||||
"commit": "a88704b4f1f046e1440c0944145a8045273904c3",
|
||||
"comment": "Update devDependency @types/node to v12"
|
||||
},
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-task-logger",
|
||||
"commit": "f080946c01915c3cff7445928b2697729fc2e93d",
|
||||
"comment": "Update @types packages"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Fri, 09 Sep 2022 00:04:18 GMT",
|
||||
"tag": "just-task-logger_v1.1.1",
|
||||
"version": "1.1.1",
|
||||
"comments": {
|
||||
"none": [
|
||||
{
|
||||
"author": "email not defined",
|
||||
"package": "just-task-logger",
|
||||
"comment": "Pin devDependencies",
|
||||
"commit": "0dca4fef66c833623c3b923f426ee44d6887c5fe"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Thu, 14 Jan 2021 20:55:06 GMT",
|
||||
"tag": "just-task-logger_v1.1.1",
|
||||
"version": "1.1.1",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "fixing release pipeline and the empty lib folder",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "dd4f1b0db3fb6ce3769ed38ebf410bcc6d4da567",
|
||||
"package": "just-task-logger"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Wed, 13 Jan 2021 23:22:52 GMT",
|
||||
"tag": "just-task-logger_v1.1.0",
|
||||
"version": "1.1.0",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Update typescript and other dependencies",
|
||||
"author": "elcraig@microsoft.com",
|
||||
"commit": "560caa2639b064a15764d7b5b58b64b620b59c35",
|
||||
"package": "just-task-logger"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Mon, 02 Nov 2020 16:42:46 GMT",
|
||||
"tag": "just-task-logger_v1.0.2",
|
||||
"version": "1.0.2",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Bump yargs dependency",
|
||||
"author": "1581488+christiango@users.noreply.github.com",
|
||||
"commit": "bbbf4bb4b366c4df0cebb429c944d610b67d6d0f",
|
||||
"package": "just-task-logger"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Mon, 02 Nov 2020 16:26:27 GMT",
|
||||
"tag": "just-task-logger_v1.0.1",
|
||||
"version": "1.0.1",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Publish src folder",
|
||||
"author": "1581488+christiango@users.noreply.github.com",
|
||||
"commit": "b5b171c31a995398d4bd6cbb0aa3ff2cf559afc3",
|
||||
"package": "just-task-logger"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Tue, 06 Oct 2020 23:06:25 GMT",
|
||||
"tag": "just-task-logger_v1.0.0",
|
||||
"version": "1.0.0",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Remove implicit SDI usage",
|
||||
"author": "darthtrevino@gmail.com",
|
||||
"commit": "2301badd04f2581b262ff7ec304f612c717efc8c",
|
||||
"package": "just-task-logger"
|
||||
},
|
||||
{
|
||||
"comment": "fixes publish",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "2d81870dfead736767e12ab220d7f4001b5fe94e",
|
||||
"package": "just-task-logger"
|
||||
}
|
||||
],
|
||||
"major": [
|
||||
{
|
||||
"comment": "removed just-stack-*",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "7f6c1c32d5715a33b2a8be066796e941b4d9558b",
|
||||
"package": "just-task-logger"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"date": "Thu, 11 Jul 2019 17:08:46 GMT",
|
||||
"tag": "just-task-logger_v0.3.0",
|
||||
"version": "0.3.0",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "adding perf logging",
|
||||
"author": "kchau@microsoft.com",
|
||||
"commit": "41f35e4f9c771f2ffb96d0f5ea8cfb1eb1475afc"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.2.1",
|
||||
"tag": "just-task-logger_v0.2.1",
|
||||
"date": "Wed, 15 May 2019 18:44:04 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Switch microsoft in repo URL to lowercase"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"tag": "just-task-logger_v0.2.0",
|
||||
"date": "Fri, 22 Feb 2019 23:37:36 GMT",
|
||||
"comments": {
|
||||
"minor": [
|
||||
{
|
||||
"comment": "Consistent interface naming"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.1.2",
|
||||
"tag": "just-task-logger_v0.1.2",
|
||||
"date": "Fri, 22 Feb 2019 19:03:38 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Update package metadata"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.1.1",
|
||||
"tag": "just-task-logger_v0.1.1",
|
||||
"date": "Thu, 21 Feb 2019 23:25:53 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Add logger package"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,112 +0,0 @@
|
|||
# Change Log - just-task-logger
|
||||
|
||||
This log was last generated on Thu, 09 Mar 2023 08:02:09 GMT and should not be manually modified.
|
||||
|
||||
<!-- Start content -->
|
||||
|
||||
## 1.2.1
|
||||
|
||||
Thu, 09 Mar 2023 08:02:09 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Use `yargs-parser` instead of `yargs` to get the `--verbose` argument (elcraig@microsoft.com)
|
||||
|
||||
## 1.2.0
|
||||
|
||||
Fri, 18 Nov 2022 22:40:12 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Require Node 14 (elcraig@microsoft.com)
|
||||
|
||||
## 1.1.2
|
||||
|
||||
Sat, 10 Sep 2022 00:19:03 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Specify Node 12+ engines requirement (elcraig@microsoft.com)
|
||||
|
||||
## 1.1.1
|
||||
|
||||
Thu, 14 Jan 2021 20:55:06 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- fixing release pipeline and the empty lib folder (kchau@microsoft.com)
|
||||
|
||||
## 1.1.0
|
||||
|
||||
Wed, 13 Jan 2021 23:22:52 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Update typescript and other dependencies (elcraig@microsoft.com)
|
||||
|
||||
## 1.0.2
|
||||
|
||||
Mon, 02 Nov 2020 16:42:46 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Bump yargs dependency (1581488+christiango@users.noreply.github.com)
|
||||
|
||||
## 1.0.1
|
||||
|
||||
Mon, 02 Nov 2020 16:26:27 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Publish src folder (1581488+christiango@users.noreply.github.com)
|
||||
|
||||
## 1.0.0
|
||||
|
||||
Tue, 06 Oct 2020 23:06:25 GMT
|
||||
|
||||
### Major changes
|
||||
|
||||
- removed just-stack-* (kchau@microsoft.com)
|
||||
|
||||
### Patches
|
||||
|
||||
- Remove implicit SDI usage (darthtrevino@gmail.com)
|
||||
- fixes publish (kchau@microsoft.com)
|
||||
|
||||
## 0.3.0
|
||||
Thu, 11 Jul 2019 17:08:46 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- adding perf logging (kchau@microsoft.com)
|
||||
|
||||
## 0.2.1
|
||||
Mon, 01 Jul 2019 20:15:20 GMT
|
||||
|
||||
## 0.2.1
|
||||
Wed, 15 May 2019 18:44:04 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Switch microsoft in repo URL to lowercase
|
||||
|
||||
## 0.2.0
|
||||
Fri, 22 Feb 2019 23:37:36 GMT
|
||||
|
||||
### Minor changes
|
||||
|
||||
- Consistent interface naming
|
||||
|
||||
## 0.1.2
|
||||
Fri, 22 Feb 2019 19:03:38 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Update package metadata
|
||||
|
||||
## 0.1.1
|
||||
Thu, 21 Feb 2019 23:25:53 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Add logger package
|
|
@ -1 +0,0 @@
|
|||
module.exports = require('../../scripts/jest.config');
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"name": "just-task-logger",
|
||||
"version": "1.2.1",
|
||||
"description": "Logger for Just scripts and tasks",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/microsoft/just"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"start": "tsc -w --preserveWatchOutput",
|
||||
"test": "jest",
|
||||
"start-test": "jest --watch"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^4.0.0",
|
||||
"yargs-parser": "^20.2.3"
|
||||
}
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
export { logger, Logger } from './logger';
|
||||
export { mark } from './perf';
|
|
@ -1,70 +0,0 @@
|
|||
import chalk = require('chalk');
|
||||
import * as parser from 'yargs-parser';
|
||||
import { getDeltaAndClearMark } from './perf';
|
||||
|
||||
const argv = parser(process.argv.slice(2));
|
||||
|
||||
function logInternal(method: 'info' | 'warn' | 'error', symbol: string, ...args: any[]) {
|
||||
const now = new Date();
|
||||
const timestamp = chalk.gray(`[${now.toLocaleTimeString()}]`);
|
||||
|
||||
console[method](timestamp, symbol, ...args);
|
||||
}
|
||||
|
||||
export interface Logger {
|
||||
/** Whether verbose logging is enabled. Default false unless --verbose arg is given. */
|
||||
enableVerbose: boolean;
|
||||
/** Log to `console.info` with a timestamp, but only if verbose logging is enabled. */
|
||||
verbose(...args: any[]): void;
|
||||
/** Log to `console.info` with a timestamp. */
|
||||
info(...args: any[]): void;
|
||||
/** Log to `console.warn` with a timestamp. */
|
||||
warn(...args: any[]): void;
|
||||
/** Log to `console.error` with a timestamp. */
|
||||
error(...args: any[]): void;
|
||||
/** Log perf marker data to `consold.info` with timestamp, only if verbose is enabled */
|
||||
perf(marker: string, ...args: any[]): void;
|
||||
}
|
||||
|
||||
const emptySquare = '\u25a1';
|
||||
const square = '\u25a0';
|
||||
const triangle = '\u25b2';
|
||||
|
||||
export const logger: Logger = {
|
||||
enableVerbose: !!argv.verbose,
|
||||
|
||||
verbose(...args: any[]) {
|
||||
if (logger.enableVerbose) {
|
||||
logInternal('info', chalk.gray(emptySquare), ...args);
|
||||
}
|
||||
},
|
||||
|
||||
info(...args: any[]) {
|
||||
logInternal('info', chalk.green(square), ...args);
|
||||
},
|
||||
|
||||
warn(...args: any[]) {
|
||||
logInternal('warn', chalk.yellow(triangle), ...args);
|
||||
},
|
||||
|
||||
error(...args: any[]) {
|
||||
logInternal('error', chalk.redBright('x'), ...args);
|
||||
},
|
||||
|
||||
perf(marker: string, ...args: any[]) {
|
||||
if (logger.enableVerbose) {
|
||||
const delta = getDeltaAndClearMark(marker);
|
||||
|
||||
if (delta) {
|
||||
const ns = delta[0] * 1e9 + delta[1];
|
||||
const deltaMsg = `${ns / 1e9}s`;
|
||||
logInternal(
|
||||
'info',
|
||||
chalk.cyan(square),
|
||||
`mark(${chalk.cyanBright(marker)}): took ${chalk.cyanBright(deltaMsg)}`,
|
||||
...args,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
|
@ -1,15 +0,0 @@
|
|||
const markers: { [marker: string]: [number, number] } = {};
|
||||
|
||||
export function mark(marker: string): void {
|
||||
markers[marker] = process.hrtime();
|
||||
}
|
||||
|
||||
export function getDeltaAndClearMark(marker: string): [number, number] | null {
|
||||
if (markers[marker]) {
|
||||
const delta = process.hrtime(markers[marker]);
|
||||
delete markers[marker];
|
||||
return delta;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
|
@ -28,7 +28,6 @@
|
|||
"bach": "^2.0.0",
|
||||
"chalk": "^4.0.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"just-task-logger": ">=1.2.1 <2.0.0",
|
||||
"resolve": "^1.19.0",
|
||||
"undertaker": "^1.3.0",
|
||||
"undertaker-registry": "^2.0.0",
|
||||
|
|
|
@ -3,7 +3,7 @@ import { argv } from './option';
|
|||
import { resolveCwd } from './resolve';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import { logger, mark } from 'just-task-logger';
|
||||
import { logger, mark } from './logger';
|
||||
import { findDependents } from './package/findDependents';
|
||||
import { findGitRoot } from './package/findGitRoot';
|
||||
import { spawnSync } from 'child_process';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { undertaker } from './undertaker';
|
||||
import { option, parseCommand } from './option';
|
||||
import { logger } from 'just-task-logger';
|
||||
import { logger } from './logger';
|
||||
import { TaskFunction } from './interfaces';
|
||||
import { readConfig } from './config';
|
||||
import { task } from './task';
|
||||
|
|
|
@ -3,7 +3,7 @@ import * as path from 'path';
|
|||
|
||||
import { argv } from './option';
|
||||
import { resolve } from './resolve';
|
||||
import { mark, logger } from 'just-task-logger';
|
||||
import { mark, logger } from './logger';
|
||||
import { enableTypeScript } from './enableTypeScript';
|
||||
import yargsParser = require('yargs-parser');
|
||||
import { TaskFunction } from './interfaces';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { resolve } from './resolve';
|
||||
import { logger } from 'just-task-logger';
|
||||
import { logger } from './logger';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export function enableTypeScript({ transpileOnly = true }): void {
|
||||
|
|
|
@ -1 +1,85 @@
|
|||
export * from 'just-task-logger';
|
||||
import chalk = require('chalk');
|
||||
import * as parser from 'yargs-parser';
|
||||
|
||||
const argv = parser(process.argv.slice(2));
|
||||
|
||||
function logInternal(method: 'info' | 'warn' | 'error', symbol: string, ...args: any[]) {
|
||||
const now = new Date();
|
||||
const timestamp = chalk.gray(`[${now.toLocaleTimeString()}]`);
|
||||
|
||||
console[method](timestamp, symbol, ...args);
|
||||
}
|
||||
|
||||
const markers: { [marker: string]: [number, number] } = {};
|
||||
|
||||
export function mark(marker: string): void {
|
||||
markers[marker] = process.hrtime();
|
||||
}
|
||||
|
||||
function getDeltaAndClearMark(marker: string): [number, number] | null {
|
||||
if (markers[marker]) {
|
||||
const delta = process.hrtime(markers[marker]);
|
||||
delete markers[marker];
|
||||
return delta;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export interface Logger {
|
||||
/** Whether verbose logging is enabled. Default false unless --verbose arg is given. */
|
||||
enableVerbose: boolean;
|
||||
/** Log to `console.info` with a timestamp, but only if verbose logging is enabled. */
|
||||
verbose(...args: any[]): void;
|
||||
/** Log to `console.info` with a timestamp. */
|
||||
info(...args: any[]): void;
|
||||
/** Log to `console.warn` with a timestamp. */
|
||||
warn(...args: any[]): void;
|
||||
/** Log to `console.error` with a timestamp. */
|
||||
error(...args: any[]): void;
|
||||
/** Log perf marker data to `consold.info` with timestamp, only if verbose is enabled */
|
||||
perf(marker: string, ...args: any[]): void;
|
||||
}
|
||||
|
||||
const emptySquare = '\u25a1';
|
||||
const square = '\u25a0';
|
||||
const triangle = '\u25b2';
|
||||
|
||||
export const logger: Logger = {
|
||||
enableVerbose: !!argv.verbose,
|
||||
|
||||
verbose(...args: any[]) {
|
||||
if (logger.enableVerbose) {
|
||||
logInternal('info', chalk.gray(emptySquare), ...args);
|
||||
}
|
||||
},
|
||||
|
||||
info(...args: any[]) {
|
||||
logInternal('info', chalk.green(square), ...args);
|
||||
},
|
||||
|
||||
warn(...args: any[]) {
|
||||
logInternal('warn', chalk.yellow(triangle), ...args);
|
||||
},
|
||||
|
||||
error(...args: any[]) {
|
||||
logInternal('error', chalk.redBright('x'), ...args);
|
||||
},
|
||||
|
||||
perf(marker: string, ...args: any[]) {
|
||||
if (logger.enableVerbose) {
|
||||
const delta = getDeltaAndClearMark(marker);
|
||||
|
||||
if (delta) {
|
||||
const ns = delta[0] * 1e9 + delta[1];
|
||||
const deltaMsg = `${ns / 1e9}s`;
|
||||
logInternal(
|
||||
'info',
|
||||
chalk.cyan(square),
|
||||
`mark(${chalk.cyanBright(marker)}): took ${chalk.cyanBright(deltaMsg)}`,
|
||||
...args,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as fs from 'fs';
|
|||
import * as path from 'path';
|
||||
import { resolveCwd } from '../resolve';
|
||||
import { findPackageRoot } from './findPackageRoot';
|
||||
import { logger, mark } from 'just-task-logger';
|
||||
import { logger, mark } from '../logger';
|
||||
import { findGitRoot } from './findGitRoot';
|
||||
import { isChildOf } from '../paths';
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче