sync-lockfile 2.0.14 → 3.0.0

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 CHANGED
@@ -3,6 +3,26 @@
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
+ # [3.0.0](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@2.0.15...sync-lockfile@3.0.0) (2023-10-10)
7
+
8
+
9
+
10
+ ### 📌 Dependencies
11
+
12
+ * update deps ([8db6bc0](https://github.com/bluelovers/ws-yarn-workspaces/commit/8db6bc0189457346924022f9c38f4ae8162c5a5e))
13
+
14
+
15
+
16
+ ## [2.0.15](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@2.0.14...sync-lockfile@2.0.15) (2022-12-09)
17
+
18
+
19
+
20
+ ### 📌 Dependencies
21
+
22
+ * update deps ([fe41874](https://github.com/bluelovers/ws-yarn-workspaces/commit/fe41874d6fd01f5f2b773aa085b80ee2d0683edc))
23
+
24
+
25
+
6
26
  ## [2.0.14](https://github.com/bluelovers/ws-yarn-workspaces/compare/sync-lockfile@2.0.13...sync-lockfile@2.0.14) (2022-11-14)
7
27
 
8
28
  **Note:** Version bump only for package sync-lockfile
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,6CAAqD;AACrD,6EAA4C;AAC5C,gEAA0B;AAC1B,wDAAwB;AAExB,SAAgB,YAAY,CAAC,GAAW,EAAE,UAGtC,EAAE;IAEL,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IAExC,MAAM,EAAE,GAAG,IAAA,mBAAQ,EAAC;QACnB,GAAG;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,EAAE,CAAC,YAAY,EACpB;QACC,YAAY,IAAI,UAAU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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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,6CAAqD;AACrD,6EAA4C;AAC5C,gEAA0B;AAC1B,wDAAwB;AAExB,SAAgB,YAAY,CAAC,GAAW,EAAE,UAGtC,EAAE;IAEL,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IAExC,MAAM,EAAE,GAAG,IAAA,mBAAQ,EAAC;QACnB,GAAG;KACH,CAAC,CAAC;IAE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AK,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": "2.0.14",
3
+ "version": "3.0.0",
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",
@@ -23,6 +23,7 @@
23
23
  "lint": "npx eslint **/*.ts",
24
24
  "test": "echo \"Error: no test specified\"",
25
25
  "test:jest": "jest --passWithNoTests",
26
+ "test:jest:coverage": "yarn run test:jest -- --coverage",
26
27
  "test:jest:snapshot": "yarn run test:jest -- -u",
27
28
  "test:snapshot": "yarn run test -- -u",
28
29
  "test:tsd": "ynpx tsd",
@@ -36,14 +37,15 @@
36
37
  "ncu": "npx yarn-tool ncu -u",
37
38
  "sort-package-json": "npx yarn-tool sort",
38
39
  "tsc:default": "tsc -p tsconfig.json",
39
- "tsc:esm": "tsc -p tsconfig.esm.json"
40
+ "tsc:esm": "tsc -p tsconfig.esm.json",
41
+ "tsc:showConfig": "ynpx get-current-tsconfig -p"
40
42
  },
41
43
  "dependencies": {
42
44
  "@yarn-tool/find-root": "^2.0.13",
43
- "fs-extra": "^10.1.0",
45
+ "fs-extra": "^11.1.1",
44
46
  "tslib": ">=2",
45
- "ws-pkg-list": "^2.0.13",
46
- "yargs": "^17.6.2"
47
+ "ws-pkg-list": "^3.0.0",
48
+ "yargs": "^17.7.2"
47
49
  },
48
- "gitHead": "8939271c9e56d8e75885a1b9c243031eee6a8271"
50
+ "gitHead": "2b9ea5ea131c1852988b3270d38d594ad3e70559"
49
51
  }