@forsakringskassan/commitlint-config 3.3.4 → 3.3.6
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/dist/commitlint.js +8248 -7893
- package/dist/format.js +1 -4
- package/dist/install.js +6 -6
- package/dist/templates/template.hbs +1 -0
- package/package.json +1 -1
package/dist/format.js
CHANGED
package/dist/install.js
CHANGED
|
@@ -481,9 +481,9 @@ var require_is_ci = __commonJS({
|
|
|
481
481
|
|
|
482
482
|
// src/install.ts
|
|
483
483
|
var import_is_ci = __toESM(require_is_ci(), 1);
|
|
484
|
-
import * as fsp from "fs/promises";
|
|
485
484
|
import { spawnSync } from "node:child_process";
|
|
486
485
|
import fs3 from "node:fs";
|
|
486
|
+
import * as fsp from "node:fs/promises";
|
|
487
487
|
import path3 from "node:path";
|
|
488
488
|
|
|
489
489
|
// node_modules/nano-spawn/source/context.js
|
|
@@ -3757,15 +3757,15 @@ var Ui = Object.assign(ts, { stream: Bt, iterate: Ut });
|
|
|
3757
3757
|
var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync: Ui, globStream: Qe, stream: Ii, globStreamSync: Bt, streamSync: ji, globIterate: es, iterate: Bi, globIterateSync: Ut, iterateSync: zi, Glob: I, hasMagic: le, escape: tt, unescape: W });
|
|
3758
3758
|
Ze.glob = Ze;
|
|
3759
3759
|
|
|
3760
|
-
// src/
|
|
3760
|
+
// src/verify-package.ts
|
|
3761
3761
|
var nonAllowedPackages = ["husky", "simple-git-hooks", "lint-staged"];
|
|
3762
3762
|
function invalidInstalledPackages(packageJson) {
|
|
3763
|
-
const dependencies = [
|
|
3763
|
+
const dependencies = /* @__PURE__ */ new Set([
|
|
3764
3764
|
...Object.keys(packageJson.dependencies ?? {}),
|
|
3765
3765
|
...Object.keys(packageJson.devDependencies ?? {})
|
|
3766
|
-
];
|
|
3766
|
+
]);
|
|
3767
3767
|
for (const item of nonAllowedPackages) {
|
|
3768
|
-
if (dependencies.
|
|
3768
|
+
if (dependencies.has(item)) {
|
|
3769
3769
|
console.error(
|
|
3770
3770
|
`
|
|
3771
3771
|
@forsakringskassan/commitlint-config
|
|
@@ -3853,7 +3853,7 @@ async function setupGitHooks() {
|
|
|
3853
3853
|
const originCwd = process.env["INIT_CWD"] ?? "";
|
|
3854
3854
|
const packageJson = JSON.parse(
|
|
3855
3855
|
await fsp.readFile(path3.join(originCwd, "package.json"), {
|
|
3856
|
-
encoding: "
|
|
3856
|
+
encoding: "utf8"
|
|
3857
3857
|
})
|
|
3858
3858
|
);
|
|
3859
3859
|
if (invalidInstalledPackages(packageJson) || existingSimpleGitConfig(packageJson) || await existingHuskyConfig(originCwd, fs3)) {
|