sync-lockfile 1.0.47 → 1.0.51
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 +41 -0
- package/bin/sync-lockfile.js +2 -2
- package/bin/sync-lockfile.js.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,47 @@
|
|
|
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.51](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@1.0.50...sync-lockfile@1.0.51) (2021-12-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ♻️ Chores
|
|
10
|
+
|
|
11
|
+
* **deps:** update deps ([2915799](https://github.com/bluelovers/ws-yarn-workspaces/commit/2915799b24c73c0116d5bd48eeb724944bb39fbe))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.0.50](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@1.0.49...sync-lockfile@1.0.50) (2021-12-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 🔖 Miscellaneous
|
|
21
|
+
|
|
22
|
+
* . ([104475f](https://github.com/bluelovers/ws-yarn-workspaces/commit/104475f2baa62e53dcc4cd6f3fb3a425cba1c88d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [1.0.49](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@1.0.48...sync-lockfile@1.0.49) (2021-12-06)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### ♻️ Chores
|
|
32
|
+
|
|
33
|
+
* **deps:** update deps ([0377f3d](https://github.com/bluelovers/ws-yarn-workspaces/commit/0377f3da359fd07fb6cfaa86accaefaef993036c))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [1.0.48](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@1.0.47...sync-lockfile@1.0.48) (2021-11-28)
|
|
40
|
+
|
|
41
|
+
**Note:** Version bump only for package sync-lockfile
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
6
47
|
## [1.0.47](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@1.0.46...sync-lockfile@1.0.47) (2021-11-23)
|
|
7
48
|
|
|
8
49
|
**Note:** Version bump only for package sync-lockfile
|
package/bin/sync-lockfile.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
|
-
const yargs_1 =
|
|
9
|
-
const index_1 =
|
|
8
|
+
const yargs_1 = tslib_1.__importDefault(require("yargs"));
|
|
9
|
+
const index_1 = tslib_1.__importDefault(require("../index"));
|
|
10
10
|
let argv = yargs_1.default
|
|
11
11
|
.option('cwd', {
|
|
12
12
|
alias: ['c'],
|
package/bin/sync-lockfile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-lockfile.js","sourceRoot":"","sources":["sync-lockfile.ts"],"names":[],"mappings":";;AAEA;;GAEG;;;AAEH
|
|
1
|
+
{"version":3,"file":"sync-lockfile.js","sourceRoot":"","sources":["sync-lockfile.ts"],"names":[],"mappings":";;AAEA;;GAEG;;;AAEH,0DAA0B;AAC1B,6DAAoC;AAEpC,IAAI,IAAI,GAAG,eAAK;KACd,MAAM,CAAC,KAAK,EAAE;IACd,KAAK,EAAE,CAAC,GAAG,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;IACtB,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;CACZ,CAAC;KACD,MAAM,CAAC,QAAQ,EAAE;IACjB,OAAO,EAAE,IAAI;CACb,CAAC;KACD,IAAI,CAAC,IAAI,CAAC;KACV,cAAc,CAAC,IAAI,CAAC;KACpB,SAAS,EAAE,CACZ;AAED,IAAA,eAAY,EAAC,IAAI,CAAC,GAAG,EAAE;IACtB,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM;CACnB,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\n/**\n * Created by user on 2020/1/8.\n */\n\nimport yargs from 'yargs';\nimport syncLockfile from '../index';\n\nlet argv = yargs\n\t.option('cwd', {\n\t\talias: ['c'],\n\t\tdefault: process.cwd(),\n\t\tnormalize: true,\n\t\tstring: true,\n\t})\n\t.option('silent', {\n\t\tboolean: true,\n\t})\n\t.help(true)\n\t.showHelpOnFail(true)\n\t.parseSync()\n;\n\nsyncLockfile(argv.cwd, {\n\tprint: !argv.silent,\n});\n"]}
|
package/index.js
CHANGED
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.syncLockfile = void 0;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const ws_pkg_list_1 = require("ws-pkg-list");
|
|
9
|
-
const find_root_1 =
|
|
10
|
-
const fs_extra_1 =
|
|
11
|
-
const path_1 =
|
|
9
|
+
const find_root_1 = tslib_1.__importDefault(require("@yarn-tool/find-root"));
|
|
10
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
11
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
12
|
function syncLockfile(cwd, options = {}) {
|
|
13
13
|
const { print, noThrowError } = options;
|
|
14
14
|
const ws = (0, find_root_1.default)({
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,6CAAqD;AACrD,
|
|
1
|
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AAE,QAAQ,CAAC,EAAE;YACxD,SAAS,EAAE,IAAI;YACf,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;SACjB,CAAC,CAAA;IAEH,CAAC,CAAC,CACF;IAED,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEhC,OAAO,IAAI,CAAC;AACb,CAAC;AAjDD,oCAiDC;AAED,SAAS,UAAU,CAAC,OAAe;IAElC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAA;AACzB,CAAC;AAED,kBAAe,YAAY,CAAA","sourcesContent":["/**\n * Created by user on 2020/1/8.\n */\n\nimport { workspacesPackagesList } from 'ws-pkg-list';\nimport findRoot from '@yarn-tool/find-root';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nexport function syncLockfile(cwd: string, options: {\n\tprint?: boolean,\n\tnoThrowError?: boolean,\n} = {})\n{\n\tconst { print, noThrowError } = options;\n\n\tconst ws = findRoot({\n\t\tcwd\n\t});\n\n\tif (!ws.hasWorkspace)\n\t{\n\t\tnoThrowError || throwError(`target dir not a yarn workspaces, ${ws.root}`);\n\t\treturn null;\n\t}\n\n\tconst lockfile = `yarn.lock`;\n\tconst lockfile_root = path.join(ws.root, lockfile);\n\n\tif (!fs.pathExistsSync(lockfile_root))\n\t{\n\t\tnoThrowError || throwError(`yarn.lock not exists`);\n\t\treturn null;\n\t}\n\n\tprint && console.log(`workspaces:`, ws.root, '\\n');\n\n\tconst label = `copy done`;\n\n\tprint && console.time(label);\n\n\tworkspacesPackagesList(ws.root, true)\n\t\t.forEach(pkg_dir => {\n\n\t\t\tprint && console.log(`copy to... ${path.relative(ws.root, pkg_dir)}`);\n\n\t\t\tfs.copySync(lockfile_root, path.join(pkg_dir, lockfile), {\n\t\t\t\toverwrite: true,\n\t\t\t\tpreserveTimestamps: true,\n\t\t\t\tdereference: true,\n\t\t\t})\n\n\t\t})\n\t;\n\n\tprint && console.timeEnd(label);\n\n\treturn true;\n}\n\nfunction throwError(message: string)\n{\n\tthrow new Error(message)\n}\n\nexport default syncLockfile\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sync-lockfile",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.51",
|
|
4
4
|
"description": "sync yarn.lock to each packages in yarn workspaces",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/bluelovers/ws-yarn-workspaces/tree/master/packages/sync-lockfile#readme",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"tsc:esm": "tsc -p tsconfig.esm.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@yarn-tool/find-root": "^1.0.
|
|
37
|
+
"@yarn-tool/find-root": "^1.0.59",
|
|
38
38
|
"fs-extra": "^10.0.0",
|
|
39
39
|
"tslib": "^2.3.1",
|
|
40
|
-
"ws-pkg-list": "^1.0.
|
|
41
|
-
"yargs": "^17.
|
|
40
|
+
"ws-pkg-list": "^1.0.71",
|
|
41
|
+
"yargs": "^17.3.1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "94c353980d59a7cebfd89d3d6d62bef692d95f69"
|
|
44
44
|
}
|