@storm-software/git-tools 1.2.18 β†’ 1.2.20

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
@@ -1,3 +1,26 @@
1
+ ## [1.2.19](https://github.com/storm-software/storm-ops/compare/git-tools-v1.2.18...git-tools-v1.2.19) (2023-11-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **git-tools:** Add origin to git lfs command ([4c33508](https://github.com/storm-software/storm-ops/commit/4c335088d426535eb443b01d653696576dc1d237))
7
+ * **git-tools:** Added branch name to git command ([f411035](https://github.com/storm-software/storm-ops/commit/f41103595cfa383256b347c5e93635445a051fda))
8
+ * **git-tools:** Ensure full path is added to remote branch params ([bb2c668](https://github.com/storm-software/storm-ops/commit/bb2c668ccb959b038929a30436163088b4c02a7d))
9
+ * **git-tools:** More updates to variables in hooks ([1096948](https://github.com/storm-software/storm-ops/commit/10969481676eba0b86118dff0e1365adfbf4bd75))
10
+ * **git-tools:** Remove git-lfs variables from the husky ([0f80794](https://github.com/storm-software/storm-ops/commit/0f80794418bb82000e73029df6c7d738d289ca78))
11
+ * **git-tools:** Remove git-lfs variables from the husky hooks ([cad7eff](https://github.com/storm-software/storm-ops/commit/cad7eff3c2ed3a1f0b318d9973b6756b8446eb0a))
12
+ * **git-tools:** Resolved issue calling git-lfs commands on current branch ([f5c4dd8](https://github.com/storm-software/storm-ops/commit/f5c4dd8331f1df05e0661b1aa72dcd1260a972ad))
13
+ * **git-tools:** Update code to use the provided git variables ([f5acee1](https://github.com/storm-software/storm-ops/commit/f5acee1da47f1d0ec730a82a20aaaff9f6e77e54))
14
+ * **git-tools:** Update hook execution scripts ([1d1b426](https://github.com/storm-software/storm-ops/commit/1d1b4265ad99ad9fc97764dd89f5cf2cf5f9a2ca))
15
+ * **git-tools:** Update use of command line variables ([a6c0d18](https://github.com/storm-software/storm-ops/commit/a6c0d1858a19791d92316a4fc2ec520f4bf69d98))
16
+
17
+ ## [1.2.18](https://github.com/storm-software/storm-ops/compare/git-tools-v1.2.17...git-tools-v1.2.18) (2023-11-10)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **git-tools:** Updated code that checks for git-lfs in hooks ([ec4e632](https://github.com/storm-software/storm-ops/commit/ec4e632fe5db27eba12e7dffbbab7ef96c2ef40e))
23
+
1
24
  ## [1.2.17](https://github.com/storm-software/storm-ops/compare/git-tools-v1.2.16...git-tools-v1.2.17) (2023-11-10)
2
25
 
3
26
 
package/README.md CHANGED
@@ -15,7 +15,7 @@ This package is part of the <b>⚑Storm-Ops</b> monorepo. The Storm-Ops packages
15
15
 
16
16
  <h3 align="center">πŸ’» Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
17
17
 
18
- [![Version](https://img.shields.io/badge/version-1.2.15-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
18
+ [![Version](https://img.shields.io/badge/version-1.2.19-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
19
  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
20
20
 
21
21
  <h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
@@ -5,8 +5,12 @@ const { execSync } = require("node:child_process");
5
5
  try {
6
6
  console.log("Running Storm post-checkout hook...");
7
7
 
8
+ const changed = execSync(
9
+ "git diff-tree -r --name-only --no-commit-id $1 $2",
10
+ "utf8"
11
+ );
8
12
  execSync(
9
- 'changedFiles="$(git diff-tree -r --name-only --no-commit-id $1 $2)" && node @storm-software/git-tools/scripts/package-version-warning.cjs $changedFiles'
13
+ `node @storm-software/git-tools/scripts/package-version-warning.cjs ${changed}`
10
14
  );
11
15
 
12
16
  const result = execSync("git-lfs -v", "utf8");
@@ -17,7 +21,7 @@ try {
17
21
  process.exit(1);
18
22
  }
19
23
 
20
- execSync('git lfs post-checkout "$@"');
24
+ execSync("git lfs post-checkout origin main");
21
25
  } catch (e) {
22
26
  console.error(e);
23
27
  process.exit(1);
@@ -13,7 +13,7 @@ try {
13
13
  process.exit(1);
14
14
  }
15
15
 
16
- execSync('git lfs post-commit "$@"');
16
+ execSync("git lfs post-commit origin main");
17
17
  } catch (e) {
18
18
  console.error(e);
19
19
  process.exit(1);
@@ -5,8 +5,12 @@ const { execSync } = require("node:child_process");
5
5
  try {
6
6
  console.log("Running Storm post-merge hook...");
7
7
 
8
+ const changed = execSync(
9
+ "git diff-tree -r --name-only --no-commit-id $1 $2",
10
+ "utf8"
11
+ );
8
12
  execSync(
9
- 'changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" && @storm-software/git-tools/scripts/package-version-warning.cjs $changedFiles'
13
+ `node @storm-software/git-tools/scripts/package-version-warning.cjs ${changed}`
10
14
  );
11
15
 
12
16
  const result = execSync("git-lfs -v", "utf8");
@@ -17,7 +21,7 @@ try {
17
21
  process.exit(1);
18
22
  }
19
23
 
20
- execSync('git lfs post-merge "$@"');
24
+ execSync("git lfs post-merge origin main");
21
25
  } catch (e) {
22
26
  console.error(e);
23
27
  process.exit(1);
package/bin/pre-push.cjs CHANGED
@@ -1,11 +1,47 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { execSync } = require("node:child_process");
4
+ const fs = require("fs");
4
5
 
5
6
  try {
6
7
  console.log("Running Storm pre-push hook...");
7
8
 
8
- execSync("node @storm-software/git-tools/scripts/check-lock-file.cjs");
9
+ console.log("πŸ”’πŸ”’πŸ”’ Validating lock files πŸ”’πŸ”’πŸ”’\n");
10
+
11
+ const errors = [];
12
+ if (fs.existsSync("package-lock.json")) {
13
+ errors.push(
14
+ 'Invalid occurrence of "package-lock.json" file. Please remove it and use only "pnpm-lock.yaml"'
15
+ );
16
+ }
17
+ if (fs.existsSync("yarn.lock")) {
18
+ errors.push(
19
+ 'Invalid occurrence of "yarn.lock" file. Please remove it and use only "pnpm-lock.yaml"'
20
+ );
21
+ }
22
+
23
+ try {
24
+ const content = fs.readFileSync("pnpm-lock.yaml", "utf-8");
25
+ if (content.match(/localhost:487/)) {
26
+ errors.push(
27
+ 'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
28
+ );
29
+ }
30
+ if (content.match(/resolution: \{tarball/)) {
31
+ errors.push(
32
+ 'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
33
+ );
34
+ }
35
+ } catch {
36
+ errors.push('The "pnpm-lock.yaml" does not exist or cannot be read');
37
+ }
38
+
39
+ if (errors.length > 0) {
40
+ errors.forEach(e => console.error(e));
41
+ process.exit(1);
42
+ }
43
+
44
+ console.log("Lock file is valid πŸ‘");
9
45
 
10
46
  const result = execSync("git-lfs -v", "utf8");
11
47
  if (result && Number.isInteger(Number.parseInt(result)) && Number(result)) {
@@ -15,7 +51,7 @@ try {
15
51
  process.exit(1);
16
52
  }
17
53
 
18
- execSync('git lfs pre-push "$@"');
54
+ execSync("git lfs pre-push origin main");
19
55
  } catch (e) {
20
56
  console.error(e);
21
57
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/git-tools",
3
- "version": "1.2.18",
3
+ "version": "1.2.20",
4
4
  "private": false,
5
5
  "description": "⚑ A package containing various git tools used in Storm workspaces.",
6
6
  "keywords": [
@@ -1,4 +1,4 @@
1
- <div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/logo-banner.png" width="100%" altText="Storm Software" /></div>
1
+ <div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/storm-banner.gif" width="100%" altText="Storm Software" /></div>
2
2
 
3
3
  <div align="center">
4
4
  <a href="https://stormsoftware.org" target="_blank">Website</a> | <a href="https://stormsoftware.org/contact" target="_blank">Contact</a> | <a href="https://github.com/storm-software/stormstack" target="_blank">Repository</a> | <a href="https://stormstack.github.io/stormstack/" target="_blank">Documentation</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=enhancement&template=feature-request.yml&title=Feature Request%3A+">Request a Feature</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=documentation&template=documentation.yml&title=Documentation Request%3A+">Request Documentation</a> | <a href="https://github.com/storm-software/stormstack/discussions">Ask a Question</a>
@@ -1,39 +0,0 @@
1
- const fs = require("fs");
2
-
3
- console.log("πŸ”’πŸ”’πŸ”’ Validating lock files πŸ”’πŸ”’πŸ”’\n");
4
-
5
- const errors = [];
6
- if (fs.existsSync("package-lock.json")) {
7
- errors.push(
8
- 'Invalid occurrence of "package-lock.json" file. Please remove it and use only "pnpm-lock.yaml"'
9
- );
10
- }
11
- if (fs.existsSync("yarn.lock")) {
12
- errors.push(
13
- 'Invalid occurrence of "yarn.lock" file. Please remove it and use only "pnpm-lock.yaml"'
14
- );
15
- }
16
-
17
- try {
18
- const content = fs.readFileSync("pnpm-lock.yaml", "utf-8");
19
- if (content.match(/localhost:487/)) {
20
- errors.push(
21
- 'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
22
- );
23
- }
24
- if (content.match(/resolution: \{tarball/)) {
25
- errors.push(
26
- 'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
27
- );
28
- }
29
- } catch {
30
- errors.push('The "pnpm-lock.yaml" does not exist or cannot be read');
31
- }
32
-
33
- if (errors.length > 0) {
34
- errors.forEach(e => console.log(e));
35
- process.exit(1);
36
- } else {
37
- console.log("Lock file is valid πŸ‘");
38
- process.exit(0);
39
- }