declapract-typescript-ehmpathy 0.47.75 → 0.48.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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "dependencies": {
3
+ "simple-in-memory-cache": "@declapract{check.minVersion('0.4.3').ifPresent()}",
4
+ "simple-on-disk-cache": "@declapract{check.minVersion('1.7.10').ifPresent()}",
5
+ "with-simple-cache": "@declapract{check.minVersion('0.16.2').ifPresent()}"
6
+ }
7
+ }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "dependencies": {
3
3
  "sdk-config": "@declapract{check.minVersion('0.1.1')}",
4
- "simple-in-memory-cache": "@declapract{check.minVersion('0.4.0')}",
5
4
  "zod": "@declapract{check.minVersion('4.0.0')}"
6
5
  }
7
6
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "@ehmpathy/uni-time": "@declapract{check.minVersion('0.0.0')}"
4
+ }
5
+ }
@@ -0,0 +1,23 @@
1
+ // eslint-disable-next-line import/no-extraneous-dependencies
2
+ import { FileCheckType, type FileFixFunction } from 'declapract';
3
+
4
+ export const check = FileCheckType.CONTAINS;
5
+
6
+ export const fix: FileFixFunction = (contents) => {
7
+ if (!contents) return { contents }; // pass through if contents absent
8
+ const packageJSON = JSON.parse(contents);
9
+ const updatedPackageJSON = {
10
+ ...packageJSON,
11
+ dependencies: {
12
+ ...packageJSON.dependencies,
13
+ '@ehmpathy/uni-time': undefined,
14
+ },
15
+ devDependencies: {
16
+ ...packageJSON.devDependencies,
17
+ '@ehmpathy/uni-time': undefined,
18
+ },
19
+ };
20
+ return {
21
+ contents: JSON.stringify(updatedPackageJSON, null, 2),
22
+ };
23
+ };
@@ -0,0 +1,17 @@
1
+ // eslint-disable-next-line import/no-extraneous-dependencies
2
+ import type { FileCheckFunction, FileFixFunction } from 'declapract';
3
+
4
+ export const check: FileCheckFunction = (contents) => {
5
+ if (contents?.includes("from '@ehmpathy/uni-time'")) return; // matches if it includes this
6
+ throw new Error('does not match bad practice'); // does not otherwise
7
+ };
8
+
9
+ export const fix: FileFixFunction = (contents) => {
10
+ if (!contents) return {}; // pass through if contents absent
11
+ return {
12
+ contents: contents.replace(
13
+ /from '@ehmpathy\/uni-time'/g,
14
+ "from 'iso-time'",
15
+ ),
16
+ };
17
+ };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "dependencies": {
3
- "domain-objects": "@declapract{check.minVersion('0.31.9')}",
4
- "type-fns": "@declapract{check.minVersion('1.21.2')}"
3
+ "domain-objects": "@declapract{check.minVersion('0.31.13')}",
4
+ "type-fns": "@declapract{check.minVersion('1.21.3')}"
5
5
  }
6
6
  }
@@ -7,6 +7,7 @@ ignores:
7
7
  - rhachet-roles-bhrain
8
8
  - rhachet-roles-bhuild
9
9
  - rhachet-roles-ehmpathy
10
+ - rhachet-roles-rhachet
10
11
  - declapract
11
12
  - declapract-typescript-ehmpathy
12
13
  - "@commitlint/config-conventional"
@@ -20,3 +21,5 @@ ignores:
20
21
  - tsx
21
22
  - tsc-alias
22
23
  - yalc
24
+ - test-fns
25
+ - type-fns
package/dist/useCases.yml CHANGED
@@ -2,6 +2,7 @@
2
2
  use-cases:
3
3
  typescript-project:
4
4
  practices:
5
+ - cache
5
6
  - cicd-common
6
7
  - conventional-commits
7
8
  - husky
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "declapract-typescript-ehmpathy",
3
3
  "author": "ehmpathy",
4
4
  "description": "declapract best practices declarations for typescript",
5
- "version": "0.47.75",
5
+ "version": "0.48.0",
6
6
  "license": "MIT",
7
7
  "main": "src/index.js",
8
8
  "repository": "ehmpathy/declapract-typescript-ehmpathy",
@@ -43,7 +43,7 @@
43
43
  "preversion": "npm run prepush",
44
44
  "postversion": "git push origin HEAD --tags --no-verify",
45
45
  "prepare:husky": "husky install && chmod ug+x .husky/*",
46
- "prepare:rhachet": "rhachet init --hooks --roles mechanic behaver driver reviewer librarian ergonomist architect reflector dreamer",
46
+ "prepare:rhachet": "rhachet init --hooks --roles mechanic behaver driver architect ergonomist reviewer dreamer dispatcher",
47
47
  "prepare": "if [ -e .git ] && [ -z \"${CI:-}\" ]; then npm run prepare:husky && npm run prepare:rhachet; fi"
48
48
  },
49
49
  "dependencies": {
@@ -55,7 +55,7 @@
55
55
  "yaml": "2.8.2"
56
56
  },
57
57
  "peerDependencies": {
58
- "declapract": ">=0.13.16"
58
+ "declapract": ">=0.13.22"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@biomejs/biome": "2.3.8",