cap-domain 3.0.0 → 3.0.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.
@@ -0,0 +1,37 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+ id-token: write
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: 22
19
+ registry-url: https://registry.npmjs.org
20
+
21
+ # Trusted publishing (OIDC) requires npm CLI >=11.5.1; GitHub-hosted runners bundle an older one
22
+ - run: npm install -g npm@latest
23
+
24
+ - run: npm install
25
+
26
+ - run: npm test --if-present
27
+
28
+ - name: Publish if version changed
29
+ run: |
30
+ PKG_NAME=$(node -p "require('./package.json').name")
31
+ LOCAL_VERSION=$(node -p "require('./package.json').version")
32
+ PUBLISHED_VERSION=$(npm view "$PKG_NAME" version 2>/dev/null || echo "none")
33
+ if [ "$PUBLISHED_VERSION" = "$LOCAL_VERSION" ]; then
34
+ echo "Version $LOCAL_VERSION already published, skipping."
35
+ else
36
+ npm publish --access public
37
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cap-domain",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "SAP CAP Field Control Plugin - dynamic field visibility, editability and validation",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,5 +5,7 @@ module.exports = {
5
5
  testMatch: ['**/test/**/*.test.js'],
6
6
  coveragePathIgnorePatterns: ['/test'],
7
7
  silent: true,
8
- setupFilesAfterEnv: ['./test/setup.js']
8
+ setupFilesAfterEnv: ['./test/setup.js'],
9
+ // default 5000ms hook timeout is too tight for cds.test() bootstrap on a cold CI runner
10
+ testTimeout: 30000
9
11
  };