@gls_spain/gps-common 35.18.0 → 35.18.2

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,17 @@
1
+ ## [35.18.2](https://github.com/GLS-Spain/gps-common/compare/v35.18.1...v35.18.2) (2026-08-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update version minor ([a65e971](https://github.com/GLS-Spain/gps-common/commit/a65e9711e6472ca99505d06b33ef5ed2590b3888))
7
+
8
+ ## [35.18.1](https://github.com/GLS-Spain/gps-common/compare/v35.18.0...v35.18.1) (2026-08-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add Sunday in shopSchedule schema ([6ea0d8a](https://github.com/GLS-Spain/gps-common/commit/6ea0d8a9e3a0e0f591c82ca7f3c7791f64876112))
14
+
1
15
  # [35.18.0](https://github.com/GLS-Spain/gps-common/compare/v35.17.1...v35.18.0) (2026-06-17)
2
16
 
3
17
 
package/CLAUDE.md ADDED
@@ -0,0 +1,60 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Purpose
6
+
7
+ Shared library providing error classes, JSON schemas, and OpenAPI specifications for the GLS Parcel Shops (GPS) project. Published as `@gls_spain/gps-common`.
8
+
9
+ ## Build Commands
10
+
11
+ Standard `npm test` runs jest. Non-obvious scripts:
12
+
13
+ ```bash
14
+ npm run build-json-schemas # Compile schemas → build/schemas/
15
+ npm run build-documentation # Build HTML docs → build/documentation/documentation.html
16
+ npm run generate-documentation # rimraf build, then full rebuild of schemas + docs
17
+ ```
18
+
19
+ ## Code Style
20
+
21
+ Prettier is configured with non-default settings — always respect these:
22
+
23
+ - **Print width:** 140 characters (not the typical 80/100)
24
+ - **Quotes:** single quotes
25
+ - **Trailing commas:** `all`
26
+ - **Arrow parens:** `avoid` (omit parens for single-arg arrow functions)
27
+
28
+ ESLint extends `airbnb-base` + `prettier` with two overrides:
29
+ - `no-underscore-dangle`: off (underscores are used for DB fields like `_id`)
30
+ - `import/extensions`: off (file extensions omitted in imports)
31
+
32
+ ## Testing
33
+
34
+ Jest runs with `collectCoverage: true` by default. The `@gls_spain/*` scoped packages in `node_modules` are **not** excluded from transformation — they are transpiled as part of the test run.
35
+
36
+ ## Commits and Branching
37
+
38
+ Use conventional commits. Run `npm run commit` (commitizen) instead of `git commit` directly to get the interactive prompt that formats the commit message correctly.
39
+
40
+ The pre-commit Husky hook runs all tests — commits will be blocked if tests fail.
41
+
42
+ Branches follow the pattern `<JIRA-TICKET>-<description>` (e.g., `INN-563-Schema-lockers`).
43
+
44
+ ## Release
45
+
46
+ Releases are managed by semantic-release on the `master` branch, triggered manually:
47
+
48
+ ```bash
49
+ npm run semantic-release
50
+ ```
51
+
52
+ This publishes to npm, updates `CHANGELOG.md`, and creates a git tag. Requires `NPM_TOKEN` to be set.
53
+
54
+ ## NPM Auth
55
+
56
+ The `@gls_spain` scoped packages require npm authentication. Set `NPM_TOKEN` in your environment or configure `.npmrc` with the registry token before installing dependencies.
57
+
58
+ ## Adding Errors or Schemas
59
+
60
+ Mirror the structure of existing files in `errors/` and `schemas/definitions/`. Export new entries from the relevant `index.js` files.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "35.18.0",
3
+ "version": "35.18.2",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "keywords": [
6
6
  "gls"
@@ -2,4 +2,4 @@ const { objectWithUuid } = require('@gls_spain/common-json-schemas');
2
2
 
3
3
  const becomeRequest = () => objectWithUuid();
4
4
 
5
- module.exports = { becomeRequest };
5
+ module.exports = { becomeRequest };
@@ -58,7 +58,7 @@ const shopSchedule = () => ({
58
58
  saturday: shopDaySchedule(),
59
59
  sunday: shopDaySchedule(),
60
60
  },
61
- required: ['type', 'weekly', 'saturday'], // sunday not required
61
+ required: ['type', 'weekly'],// saturday and sunday are optional
62
62
  additionalProperties: false,
63
63
  },
64
64
  {
@@ -74,7 +74,7 @@ const shopSchedule = () => ({
74
74
  saturday: shopDaySchedule(),
75
75
  sunday: shopDaySchedule(),
76
76
  },
77
- required: ['type', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'], // sunday not required
77
+ required: ['type', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday'], // saturday and sunday are optional
78
78
  additionalProperties: false,
79
79
  },
80
80
  ],