@carecard/validate 3.6.0 → 3.6.1

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.
@@ -5,6 +5,10 @@ description: 'Follow the shared SO_CareCardCa/CareCard workspace coding, testing
5
5
 
6
6
  # CareCard Workspace Standards
7
7
 
8
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
9
+
10
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
11
+
8
12
  ## Purpose
9
13
 
10
14
  Use before modifying, testing, reviewing, or debugging any CareCard workspace repository or cross-repository contract.
@@ -5,6 +5,10 @@ description: 'Use only when the user explicitly asks for remote Git or GitHub PR
5
5
 
6
6
  # Pull Request Create
7
7
 
8
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
9
+
10
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
11
+
8
12
  ## Purpose
9
13
 
10
14
  After the user explicitly asks for remote Git or GitHub PR work, create,
@@ -5,6 +5,10 @@ description: 'Use only when the user explicitly asks for remote Git or GitHub PR
5
5
 
6
6
  # Pull Request Merge Close
7
7
 
8
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
9
+
10
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
11
+
8
12
  ## Purpose
9
13
 
10
14
  After the user explicitly asks for remote Git or GitHub PR work, push the
@@ -5,6 +5,10 @@ description: 'Use when changing shared validation behavior for app-dashboard log
5
5
 
6
6
  # Logged-In User Profile Page
7
7
 
8
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
9
+
10
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
11
+
8
12
  ## Scope
9
13
 
10
14
  Use this skill inside `pkg-validate` when dashboard profile/settings behavior
@@ -5,6 +5,10 @@ description: 'Use in pkg-* repositories when publishable package code changes re
5
5
 
6
6
  # npm Package Flow
7
7
 
8
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
9
+
10
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
11
+
8
12
  ## Purpose
9
13
 
10
14
  Use this skill in a `pkg-*` repository when package code changes need to be
@@ -5,6 +5,10 @@ description: 'Use when changing pkg-validate validators, sanitizers, whitelist b
5
5
 
6
6
  # Package Validate
7
7
 
8
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
9
+
10
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
11
+
8
12
  ## Purpose
9
13
 
10
14
  CareCard validation package for deterministic validators, sanitization, whitelist validation, nested paths, error mapping, exports, and tests.
@@ -5,6 +5,10 @@ description: 'Use every time before coding, refactoring, debugging, or reviewing
5
5
 
6
6
  # Software Design Patterns And Clean Code
7
7
 
8
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
9
+
10
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
11
+
8
12
  ## Purpose
9
13
 
10
14
  Use this skill with every coding, refactoring, debugging, or review task in
package/.codex/AGENTS.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Codex Instructions For pkg-validate
2
2
 
3
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
4
+
3
5
  These instructions apply to the `pkg-validate` repository. This file is self-contained:
4
6
  it includes the workspace-level instructions that were previously read from
5
7
  `/Users/pankajpriscilla/SO_CareCardCa/.codex/AGENTS.md`, followed by
@@ -46,7 +46,7 @@ jobs:
46
46
 
47
47
  steps:
48
48
  - name: Checkout repository
49
- uses: actions/checkout@v4
49
+ uses: actions/checkout@v5
50
50
 
51
51
  - name: Set up Node.js
52
52
  uses: actions/setup-node@v4
@@ -59,7 +59,12 @@ function shouldRequireScope(roleRequest, requireScope) {
59
59
  if (requireScope === true) return true;
60
60
  if (requireScope !== REQUIRE_SCOPE_WHEN_ROLE_OR_SCOPE_PRESENT) return false;
61
61
 
62
- return roleRequest.role_name !== undefined || roleRequest.institution_id !== undefined || roleRequest.campus_id !== undefined;
62
+ return (
63
+ roleRequest.role_name !== undefined ||
64
+ roleRequest.institution_id !== undefined ||
65
+ roleRequest.campus_id !== undefined ||
66
+ roleRequest.program_id !== undefined
67
+ );
63
68
  }
64
69
 
65
70
  function requireNewUserRoleRequestScope(roleRequest) {
@@ -167,6 +167,8 @@ function validateProperties(obj = {}) {
167
167
  case 'campusId':
168
168
  case 'program_id':
169
169
  case 'programId':
170
+ case 'program_term_id':
171
+ case 'programTermId':
170
172
  case 'template_id':
171
173
  case 'templateId':
172
174
  case 'program_template_id':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carecard/validate",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/CareCard-ca/pkg-validate.git"
package/readme.md CHANGED
@@ -9,6 +9,12 @@ invalid values from `validateProperties`, and throws CareCard `BAD_INPUT` errors
9
9
  from `validateWhitelistProperties` when required or provided whitelist values do
10
10
  not pass validation.
11
11
 
12
+ ## Development Rule
13
+
14
+ Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
15
+
16
+ Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
17
+
12
18
  ## Installation
13
19
 
14
20
  ```sh