@shibanet0/datamitsu-config 0.0.1-alpha-6 → 0.0.1-alpha-8

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/datamitsu.js CHANGED
@@ -863,14 +863,14 @@ var mapOfApps = {
863
863
 
864
864
  // package.json
865
865
  var name = "@shibanet0/datamitsu-config";
866
- var version = "0.0.1-alpha-5";
866
+ var version = "0.0.1-alpha-8";
867
867
  var dependencies = {
868
868
  "@antebudimir/eslint-plugin-vanilla-extract": "1.16.0",
869
869
  "@commitlint/cli": "20.2.0",
870
870
  "@commitlint/config-conventional": "20.2.0",
871
871
  "@commitlint/format": "20.2.0",
872
872
  "@commitlint/types": "20.2.0",
873
- "@datamitsu/datamitsu": "0.0.1-alpha-13",
873
+ "@datamitsu/datamitsu": "0.0.1-alpha-18",
874
874
  "@eslint/config-helpers": "0.5.0",
875
875
  "@eslint/js": "9.39.2",
876
876
  "@prettier/plugin-xml": "3.4.2",
@@ -1685,11 +1685,12 @@ var prettierGlobs = [
1685
1685
  "**/*.ts",
1686
1686
  "**/*.mts",
1687
1687
  "**/*.cts",
1688
+ "**/*.tsx",
1688
1689
  "**/*.json",
1689
1690
  "**/*.yaml",
1690
1691
  "**/*.md"
1691
1692
  ];
1692
- var eslintGlobs = ["**/*.js", "**/*.mjs", "**/*.cjs", "**/*.ts", "**/*.mts", "**/*.cts"];
1693
+ var eslintGlobs = ["**/*.js", "**/*.mjs", "**/*.cjs", "**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx"];
1693
1694
  var toolsConfig = {
1694
1695
  eslint: {
1695
1696
  name: "Eslint",
@@ -1710,18 +1711,18 @@ var toolsConfig = {
1710
1711
  },
1711
1712
  projectTypes: ["npm-package"]
1712
1713
  },
1713
- gitleaks: {
1714
- name: "gitleaks",
1715
- operations: {
1716
- lint: {
1717
- args: ["--config", tools.Path.join(facts().cwd, ".gitleaks.toml"), "dir"],
1718
- command: "gitleaks",
1719
- globs: ["**/*"],
1720
- mode: "whole-project",
1721
- rootOnly: true
1722
- }
1723
- }
1724
- },
1714
+ // gitleaks: {
1715
+ // name: "gitleaks",
1716
+ // operations: {
1717
+ // lint: {
1718
+ // args: ["--config", tools.Path.join(facts().cwd, ".gitleaks.toml"), "dir"],
1719
+ // command: "gitleaks",
1720
+ // globs: ["**/*"],
1721
+ // mode: "whole-project",
1722
+ // rootOnly: true,
1723
+ // },
1724
+ // },
1725
+ // },
1725
1726
  "golangci-lint": {
1726
1727
  name: "golangci-lint - Go Linter",
1727
1728
  operations: {
@@ -1743,18 +1744,18 @@ var toolsConfig = {
1743
1744
  },
1744
1745
  projectTypes: ["golang-package"]
1745
1746
  },
1746
- knip: {
1747
- name: "Knip",
1748
- operations: {
1749
- lint: {
1750
- args: ["--config", tools.Path.join(facts().gitRoot, "knip.config.js")],
1751
- command: "knip",
1752
- globs: [],
1753
- mode: "whole-project"
1754
- }
1755
- },
1756
- projectTypes: ["npm-package"]
1757
- },
1747
+ // knip: {
1748
+ // name: "Knip",
1749
+ // operations: {
1750
+ // lint: {
1751
+ // args: ["--config", tools.Path.join(facts().gitRoot, "knip.config.js")],
1752
+ // command: "knip",
1753
+ // globs: [],
1754
+ // mode: "whole-project",
1755
+ // },
1756
+ // },
1757
+ // projectTypes: ["npm-package"],
1758
+ // },
1758
1759
  prettier: {
1759
1760
  name: "Prettier - Code Formatter",
1760
1761
  operations: {
@@ -1785,35 +1786,35 @@ var toolsConfig = {
1785
1786
  // },
1786
1787
  // },
1787
1788
  // },
1788
- shellcheck: {
1789
- name: "ShellCheck - Shell Script Linter",
1790
- operations: {
1791
- lint: {
1792
- args: ["-x", "{file}"],
1793
- command: "shellcheck",
1794
- globs: ["**/*.sh", "**/*.bash"],
1795
- mode: "per-file"
1796
- }
1797
- }
1798
- },
1799
- shfmt: {
1800
- name: "shfmt - Shell Script Formatter",
1801
- operations: {
1802
- fix: {
1803
- args: ["-w", "-i", "2", "-ci", "-sr", "{file}"],
1804
- command: "shfmt",
1805
- globs: ["**/*.sh", "**/*.bash"],
1806
- mode: "per-file",
1807
- priority: 0
1808
- },
1809
- lint: {
1810
- args: ["-d", "-i", "2", "-ci", "-sr", "{file}"],
1811
- command: "shfmt",
1812
- globs: ["**/*.sh", "**/*.bash"],
1813
- mode: "per-file"
1814
- }
1815
- }
1816
- },
1789
+ // shellcheck: {
1790
+ // name: "ShellCheck - Shell Script Linter",
1791
+ // operations: {
1792
+ // lint: {
1793
+ // args: ["-x", "{file}"],
1794
+ // command: "shellcheck",
1795
+ // globs: ["**/*.sh", "**/*.bash"],
1796
+ // mode: "per-file",
1797
+ // },
1798
+ // },
1799
+ // },
1800
+ // shfmt: {
1801
+ // name: "shfmt - Shell Script Formatter",
1802
+ // operations: {
1803
+ // fix: {
1804
+ // args: ["-w", "-i", "2", "-ci", "-sr", "{file}"],
1805
+ // command: "shfmt",
1806
+ // globs: ["**/*.sh", "**/*.bash"],
1807
+ // mode: "per-file",
1808
+ // priority: 0,
1809
+ // },
1810
+ // lint: {
1811
+ // args: ["-d", "-i", "2", "-ci", "-sr", "{file}"],
1812
+ // command: "shfmt",
1813
+ // globs: ["**/*.sh", "**/*.bash"],
1814
+ // mode: "per-file",
1815
+ // },
1816
+ // },
1817
+ // },
1817
1818
  "sort-package-json": {
1818
1819
  name: "sort-package-json",
1819
1820
  operations: {
@@ -0,0 +1,27 @@
1
+ import type { PackageJson } from "type-fest";
2
+ export interface CleanPackageOptions {
3
+ /**
4
+ * Dry run - don't write changes
5
+ * @default false
6
+ */
7
+ dryRun?: boolean;
8
+ /**
9
+ * Fields to remove from package.json
10
+ * @default ["scripts", "devDependencies", "packageManager"]
11
+ */
12
+ fieldsToRemove?: (keyof PackageJson)[];
13
+ /**
14
+ * Path to package.json file
15
+ * @default "package.json"
16
+ */
17
+ packagePath?: string;
18
+ }
19
+ /**
20
+ * Clean package.json by removing specified fields
21
+ * Useful for prepack/prepublishOnly hooks
22
+ */
23
+ export declare const cleanPackage: (options?: CleanPackageOptions) => void;
24
+ /**
25
+ * CLI entry point
26
+ */
27
+ export declare const main: () => void;
@@ -1,17 +1,9 @@
1
1
  // src/clean-package/index.ts
2
2
  import { readFileSync, writeFileSync } from "fs";
3
3
  import { resolve } from "path";
4
- var DEFAULT_FIELDS_TO_REMOVE = [
5
- "scripts",
6
- "devDependencies",
7
- "packageManager"
8
- ];
4
+ var DEFAULT_FIELDS_TO_REMOVE = ["scripts", "devDependencies", "packageManager"];
9
5
  var cleanPackage = (options = {}) => {
10
- const {
11
- packagePath = "package.json",
12
- fieldsToRemove = DEFAULT_FIELDS_TO_REMOVE,
13
- dryRun = false
14
- } = options;
6
+ const { dryRun = false, fieldsToRemove = DEFAULT_FIELDS_TO_REMOVE, packagePath = "package.json" } = options;
15
7
  const absolutePath = resolve(process.cwd(), packagePath);
16
8
  try {
17
9
  const packageJson = JSON.parse(readFileSync(absolutePath, "utf-8"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shibanet0/datamitsu-config",
3
- "version": "0.0.1-alpha-6",
3
+ "version": "0.0.1-alpha-8",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  "@commitlint/config-conventional": "20.2.0",
64
64
  "@commitlint/format": "20.2.0",
65
65
  "@commitlint/types": "20.2.0",
66
- "@datamitsu/datamitsu": "0.0.1-alpha-16",
66
+ "@datamitsu/datamitsu": "0.0.1-alpha-18",
67
67
  "@eslint/config-helpers": "0.5.0",
68
68
  "@eslint/js": "9.39.2",
69
69
  "@prettier/plugin-xml": "3.4.2",