@devopsplaybook.io/otel-utils 1.0.6 → 1.0.7-beta.6.01832d5

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,117 @@
1
+ name: Main Build
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ test-and-build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Setup Node.js
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: "18"
20
+ cache: "npm"
21
+
22
+ - name: Install dependencies
23
+ run: npm ci
24
+
25
+ - name: Run linting
26
+ run: npm run lint || echo "No lint script found, skipping"
27
+
28
+ - name: Run tests
29
+ run: npm test || echo "No test script found, skipping"
30
+
31
+ - name: Build package
32
+ run: npm run build
33
+
34
+ publish-release:
35
+ runs-on: ubuntu-latest
36
+ needs: test-and-build
37
+
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ with:
41
+ fetch-depth: 0 # Need full history for version comparison
42
+
43
+ - name: Setup Node.js
44
+ uses: actions/setup-node@v4
45
+ with:
46
+ node-version: "18"
47
+ cache: "npm"
48
+ registry-url: "https://registry.npmjs.org"
49
+
50
+ - name: Install dependencies
51
+ run: npm ci
52
+
53
+ - name: Build package
54
+ run: npm run build
55
+
56
+ - name: Check if version changed
57
+ id: version-check
58
+ run: |
59
+ # Get current version from package.json
60
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
61
+ echo "current-version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
62
+
63
+ # Check if this version exists on npm
64
+ if npm view @devopsplaybook.io/otel-utils@${CURRENT_VERSION} version &> /dev/null; then
65
+ echo "version-exists=true" >> $GITHUB_OUTPUT
66
+ echo "Version ${CURRENT_VERSION} already exists on npm"
67
+ else
68
+ echo "version-exists=false" >> $GITHUB_OUTPUT
69
+ echo "Version ${CURRENT_VERSION} is new, will publish"
70
+ fi
71
+
72
+ - name: Publish release package
73
+ if: steps.version-check.outputs.version-exists == 'false'
74
+ run: |
75
+ echo "Publishing version ${{ steps.version-check.outputs.current-version }}"
76
+ npm publish
77
+ env:
78
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
79
+
80
+ - name: Create Git Tag
81
+ if: steps.version-check.outputs.version-exists == 'false'
82
+ run: |
83
+ git config --local user.email "action@github.com"
84
+ git config --local user.name "GitHub Action"
85
+ git tag -a v${{ steps.version-check.outputs.current-version }} -m "Release v${{ steps.version-check.outputs.current-version }}"
86
+ git push origin v${{ steps.version-check.outputs.current-version }}
87
+
88
+ - name: Create GitHub Release
89
+ if: steps.version-check.outputs.version-exists == 'false'
90
+ uses: actions/create-release@v1
91
+ env:
92
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93
+ with:
94
+ tag_name: v${{ steps.version-check.outputs.current-version }}
95
+ release_name: Release v${{ steps.version-check.outputs.current-version }}
96
+ draft: false
97
+ prerelease: false
98
+ body: |
99
+ ## Release v${{ steps.version-check.outputs.current-version }}
100
+
101
+ **Package**: `@devopsplaybook.io/otel-utils@${{ steps.version-check.outputs.current-version }}`
102
+
103
+ Install with:
104
+ ```bash
105
+ npm install @devopsplaybook.io/otel-utils@${{ steps.version-check.outputs.current-version }}
106
+ # or for latest
107
+ npm install @devopsplaybook.io/otel-utils
108
+ ```
109
+
110
+ ### Changes
111
+ This release includes all changes merged since the previous version.
112
+
113
+ - name: Skip publish - version exists
114
+ if: steps.version-check.outputs.version-exists == 'true'
115
+ run: |
116
+ echo "⚠️ Version ${{ steps.version-check.outputs.current-version }} already exists on npm."
117
+ echo "To publish a new version, update the version in package.json first."
@@ -0,0 +1,98 @@
1
+ name: PR Check
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ["main"]
6
+
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: pr-${{ github.event.pull_request.number || github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ test-and-build:
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "18"
24
+ cache: "npm"
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Run linting
30
+ run: npm run lint || echo "No lint script found, skipping"
31
+
32
+ - name: Run tests
33
+ run: npm test || echo "No test script found, skipping"
34
+
35
+ - name: Build package
36
+ run: npm run build
37
+
38
+ publish-beta:
39
+ runs-on: ubuntu-latest
40
+ needs: test-and-build
41
+ if: github.event_name == 'pull_request'
42
+
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+
46
+ - name: Setup Node.js
47
+ uses: actions/setup-node@v4
48
+ with:
49
+ node-version: "18"
50
+ cache: "npm"
51
+ registry-url: "https://registry.npmjs.org"
52
+
53
+ - name: Install dependencies
54
+ run: npm ci
55
+
56
+ - name: Build package
57
+ run: npm run build
58
+
59
+ - name: Generate beta version
60
+ id: beta-version
61
+ run: |
62
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
63
+ PR_NUMBER=${{ github.event.pull_request.number }}
64
+ COMMIT_SHA=${GITHUB_SHA:0:7}
65
+ BETA_VERSION="${CURRENT_VERSION}-beta.${PR_NUMBER}.${COMMIT_SHA}"
66
+ echo "version=${BETA_VERSION}" >> $GITHUB_OUTPUT
67
+ echo "Beta version will be: ${BETA_VERSION}"
68
+
69
+ - name: Update package.json with beta version
70
+ run: |
71
+ npm version ${{ steps.beta-version.outputs.version }} --no-git-tag-version
72
+
73
+ - name: Publish beta package
74
+ run: npm publish --tag beta
75
+ env:
76
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
77
+
78
+ - name: Comment PR with beta version info
79
+ uses: actions/github-script@v7
80
+ with:
81
+ script: |
82
+ github.rest.issues.createComment({
83
+ issue_number: context.issue.number,
84
+ owner: context.repo.owner,
85
+ repo: context.repo.repo,
86
+ body: `🚀 **Beta version published!**
87
+
88
+ **Package**: \`@devopsplaybook.io/otel-utils@${{ steps.beta-version.outputs.version }}\`
89
+
90
+ Install with:
91
+ \`\`\`bash
92
+ npm install @devopsplaybook.io/otel-utils@${{ steps.beta-version.outputs.version }}
93
+ # or
94
+ npm install @devopsplaybook.io/otel-utils@beta
95
+ \`\`\`
96
+
97
+ This beta version will be available for testing until the PR is merged.`
98
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopsplaybook.io/otel-utils",
3
- "version": "1.0.6",
3
+ "version": "1.0.7-beta.6.01832d5",
4
4
  "description": "Utility to simplify integration with Open Telemetry",
5
5
  "keywords": [
6
6
  "Open",
@@ -20,24 +20,24 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@opentelemetry/api": "^1.9.0",
23
- "@opentelemetry/api-logs": "^0.204.0",
24
- "@opentelemetry/auto-instrumentations-node": "^0.63.0",
25
- "@opentelemetry/exporter-logs-otlp-http": "^0.204.0",
26
- "@opentelemetry/exporter-trace-otlp-http": "^0.204.0",
23
+ "@opentelemetry/api-logs": "^0.205.0",
24
+ "@opentelemetry/auto-instrumentations-node": "^0.64.1",
25
+ "@opentelemetry/exporter-logs-otlp-http": "^0.205.0",
26
+ "@opentelemetry/exporter-trace-otlp-http": "^0.205.0",
27
27
  "@opentelemetry/id-generator-aws-xray": "^2.0.1",
28
28
  "@opentelemetry/resources": "^2.1.0",
29
- "@opentelemetry/sdk-logs": "^0.204.0",
30
- "@opentelemetry/sdk-node": "^0.204.0",
29
+ "@opentelemetry/sdk-logs": "^0.205.0",
30
+ "@opentelemetry/sdk-node": "^0.205.0",
31
31
  "@opentelemetry/sdk-trace-base": "^2.1.0",
32
32
  "@opentelemetry/sdk-trace-web": "^2.1.0",
33
33
  "@opentelemetry/semantic-conventions": "^1.37.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@eslint/js": "^9.35.0",
37
- "@types/node": "^24.3.1",
36
+ "@eslint/js": "^9.36.0",
37
+ "@types/node": "^24.5.2",
38
38
  "@types/sqlite3": "^5.1.0",
39
39
  "ts-node": "^10.9.2",
40
- "typescript-eslint": "^8.43.0",
40
+ "typescript-eslint": "^8.44.1",
41
41
  "typescript": "^5.9.2"
42
42
  },
43
43
  "publishConfig": {