@diplodoc/client 5.2.2 → 5.2.4

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,70 @@
1
+ # ⚠️ IMPORTANT: This workflow is a template from diplodoc/lint/scaffolding
2
+ # Do not edit this file in other packages - it is automatically copied from here.
3
+ # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
+ # and then run the scaffolding update process.
5
+ #
6
+ # This workflow is optional: it does not block merging even if it fails (continue-on-error).
7
+
8
+ name: Coverage
9
+
10
+ on:
11
+ push:
12
+ branches:
13
+ - master
14
+ - main
15
+ pull_request:
16
+ branches:
17
+ - master
18
+ - main
19
+ workflow_dispatch:
20
+
21
+ jobs:
22
+ coverage:
23
+ name: Test coverage
24
+ runs-on: ubuntu-latest
25
+ continue-on-error: true
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 0
31
+
32
+ - name: Setup Node.js
33
+ uses: actions/setup-node@v4
34
+ with:
35
+ node-version: 22
36
+ cache: 'npm'
37
+
38
+ - name: Install latest npm (>= 11.5.1)
39
+ run: |
40
+ [ "$(printf '%s\n' "11.5.1" "$(npm -v)" | sort -V | head -n1)" = "11.5.1" ] || npm install -g npm@latest
41
+ shell: bash
42
+
43
+ - name: Install dependencies
44
+ run: npm ci
45
+
46
+ - name: Run tests with coverage
47
+ id: coverage-run
48
+ run: |
49
+ if node -e "const s=require('./package.json').scripts; process.exit(s && s['test:coverage'] ? 0 : 1)"; then
50
+ npm run test:coverage
51
+ echo "ran=true" >> "$GITHUB_OUTPUT"
52
+ else
53
+ echo "test:coverage script not found, skipping."
54
+ echo "ran=false" >> "$GITHUB_OUTPUT"
55
+ fi
56
+
57
+ - name: Upload coverage artifact
58
+ if: success() && steps.coverage-run.outputs.ran == 'true'
59
+ uses: actions/upload-artifact@v4
60
+ with:
61
+ name: coverage
62
+ path: coverage/
63
+ retention-days: 7
64
+
65
+ - name: SonarCloud Scan
66
+ if: success() && steps.coverage-run.outputs.ran == 'true'
67
+ uses: SonarSource/sonarqube-scan-action@v7.0.0
68
+ env:
69
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -3,15 +3,25 @@
3
3
  # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
4
  # and then run the scaffolding update process.
5
5
 
6
- name: Release Package to npm
6
+ name: Release to npm
7
7
 
8
- # This workflow is configured in package.json publishConfig
9
- # It publishes the package to npm when a release is created
8
+ # This workflow handles both stable and prerelease publishing to npm
9
+ # - Stable: triggered by release event or manual dispatch with 'stable' type
10
+ # - Prerelease: triggered by manual dispatch with 'prerelease' type (only from non-protected branches)
10
11
 
11
12
  on:
12
13
  release:
13
14
  types: [published]
14
- workflow_dispatch: # Allow manual triggering
15
+ workflow_dispatch:
16
+ inputs:
17
+ release_type:
18
+ description: 'Release type'
19
+ required: true
20
+ default: 'prerelease'
21
+ type: choice
22
+ options:
23
+ - prerelease
24
+ - stable
15
25
 
16
26
  permissions:
17
27
  contents: read
@@ -21,6 +31,11 @@ jobs:
21
31
  publish:
22
32
  name: Publish to npm
23
33
  runs-on: ubuntu-latest
34
+ # For prerelease - only from non-protected branches
35
+ if: |
36
+ github.event_name == 'release' ||
37
+ (github.event_name == 'workflow_dispatch' && inputs.release_type == 'stable') ||
38
+ (github.event_name == 'workflow_dispatch' && inputs.release_type == 'prerelease' && github.ref_protected != true)
24
39
  steps:
25
40
  - name: Checkout code
26
41
  uses: actions/checkout@v4
@@ -50,6 +65,7 @@ jobs:
50
65
  - name: Build package
51
66
  run: npm run build
52
67
 
68
+ # === STABLE RELEASE STEPS ===
53
69
  - name: Check version matches release tag
54
70
  if: github.event_name == 'release'
55
71
  run: |
@@ -68,6 +84,19 @@ jobs:
68
84
  echo "Skipping publish for draft release"
69
85
  exit 0
70
86
 
71
- - name: Publish to npm
72
- if: github.event.release.draft == false || github.event_name == 'workflow_dispatch'
87
+ - name: Publish stable to npm
88
+ if: (github.event_name == 'release' && github.event.release.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.release_type == 'stable')
73
89
  run: npm publish --provenance --access public
90
+ env:
91
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
92
+
93
+ # === PRERELEASE STEPS ===
94
+ - name: Set prerelease version
95
+ if: github.event_name == 'workflow_dispatch' && inputs.release_type == 'prerelease'
96
+ run: npm version --no-git-tag-version 0.0.0-rc-$(git branch --show-current)-${{github.run_id}}
97
+
98
+ - name: Publish prerelease to npm
99
+ if: github.event_name == 'workflow_dispatch' && inputs.release_type == 'prerelease'
100
+ run: npm publish --tag $(git branch --show-current) --provenance --access public
101
+ env:
102
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -3,7 +3,7 @@
3
3
  # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
4
  # and then run the scaffolding update process.
5
5
 
6
- name: Tests
6
+ name: Quality
7
7
 
8
8
  on:
9
9
  push:
package/.husky/commit-msg CHANGED
@@ -23,14 +23,14 @@ if echo "$SUBJECT" | grep -qE '^(fixup!|squash!)'; then
23
23
  fi
24
24
 
25
25
  # Check Conventional Commits format: <type>(<scope>): <subject>
26
- # Types: feat, fix, perf, refactor, docs, chore, revert
26
+ # Types: feat, fix, perf, refactor, docs, chore, revert, deps
27
27
  # Scope is optional
28
- if ! echo "$SUBJECT" | grep -qE '^(feat|fix|perf|refactor|docs|chore|revert)(\([^)]+\))?: .+'; then
28
+ if ! echo "$SUBJECT" | grep -qE '^(feat|fix|perf|refactor|docs|chore|revert|deps)(\([^)]+\))?: .+'; then
29
29
  echo "❌ Error: Commit message does not follow Conventional Commits format."
30
30
  echo ""
31
31
  echo "Expected format: <type>(<scope>): <subject>"
32
32
  echo ""
33
- echo "Types: feat, fix, perf, refactor, docs, chore, revert"
33
+ echo "Types: feat, fix, perf, refactor, docs, chore, revert, deps"
34
34
  echo "Scope is optional"
35
35
  echo ""
36
36
  echo "Examples:"
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "5.2.2"
2
+ ".": "5.2.4"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.2.4](https://github.com/diplodoc-platform/client/compare/v5.2.3...v5.2.4) (2026-02-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **deps:** Update @diplodoc/components to 5.2.5 ([#254](https://github.com/diplodoc-platform/client/issues/254)) ([ad0fcc6](https://github.com/diplodoc-platform/client/commit/ad0fcc624caf210b62fbd64e2fdb5e20d6c27ace))
9
+
10
+ ## [5.2.3](https://github.com/diplodoc-platform/client/compare/v5.2.2...v5.2.3) (2026-02-26)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **deps:** Update @diplodoc/components to 5.2.4 ([#253](https://github.com/diplodoc-platform/client/issues/253)) ([b27a896](https://github.com/diplodoc-platform/client/commit/b27a896e39ad9c07d66573b08b05f5a7805af3e1))
16
+ * Update infra to v1.13.2 ([6cabb6a](https://github.com/diplodoc-platform/client/commit/6cabb6a368f53c94237c53f589e59066c6f073cf))
17
+
3
18
  ## [5.2.2](https://github.com/diplodoc-platform/client/compare/v5.2.1...v5.2.2) (2026-02-02)
4
19
 
5
20
 
@@ -4,7 +4,7 @@
4
4
  "976-40cbc1d2518eb8ea.js"
5
5
  ],
6
6
  "js": [
7
- "vendor-42f1b39e64aa43b8.js",
7
+ "vendor-38a8fe9ee299ccc3.js",
8
8
  "search-b6246854f4238deb.js",
9
9
  "react-869ecca253e3f1ec.js"
10
10
  ],
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "js": [
24
24
  "app-c87e24eeaae1b0dc.js",
25
- "vendor-42f1b39e64aa43b8.js",
25
+ "vendor-38a8fe9ee299ccc3.js",
26
26
  "react-869ecca253e3f1ec.js"
27
27
  ],
28
28
  "css": [