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

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.1.4
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,103 @@
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
+ permissions:
14
+ contents: read
15
+ pull-requests: write
16
+ issues: write
17
+
18
+ jobs:
19
+ test-and-build:
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Setup Node.js
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ node-version: "18"
29
+ cache: "npm"
30
+
31
+ - name: Install dependencies
32
+ run: npm ci
33
+
34
+ - name: Run linting
35
+ run: npm run lint || echo "No lint script found, skipping"
36
+
37
+ - name: Run tests
38
+ run: npm test || echo "No test script found, skipping"
39
+
40
+ - name: Build package
41
+ run: npm run build
42
+
43
+ publish-beta:
44
+ runs-on: ubuntu-latest
45
+ needs: test-and-build
46
+ if: github.event_name == 'pull_request'
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+
51
+ - name: Setup Node.js
52
+ uses: actions/setup-node@v4
53
+ with:
54
+ node-version: "18"
55
+ cache: "npm"
56
+ registry-url: "https://registry.npmjs.org"
57
+
58
+ - name: Install dependencies
59
+ run: npm ci
60
+
61
+ - name: Build package
62
+ run: npm run build
63
+
64
+ - name: Generate beta version
65
+ id: beta-version
66
+ run: |
67
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
68
+ PR_NUMBER=${{ github.event.pull_request.number }}
69
+ COMMIT_SHA=${GITHUB_SHA:0:7}
70
+ BETA_VERSION="${CURRENT_VERSION}-beta.${PR_NUMBER}.${COMMIT_SHA}"
71
+ echo "version=${BETA_VERSION}" >> $GITHUB_OUTPUT
72
+ echo "Beta version will be: ${BETA_VERSION}"
73
+
74
+ - name: Update package.json with beta version
75
+ run: |
76
+ npm version ${{ steps.beta-version.outputs.version }} --no-git-tag-version
77
+
78
+ - name: Publish beta package
79
+ run: npm publish --tag beta
80
+ env:
81
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
82
+
83
+ - name: Comment PR with beta version info
84
+ uses: actions/github-script@v7
85
+ with:
86
+ script: |
87
+ github.rest.issues.createComment({
88
+ issue_number: context.issue.number,
89
+ owner: context.repo.owner,
90
+ repo: context.repo.repo,
91
+ body: `🚀 **Beta version published!**
92
+
93
+ **Package**: \`@devopsplaybook.io/otel-utils@${{ steps.beta-version.outputs.version }}\`
94
+
95
+ Install with:
96
+ \`\`\`bash
97
+ npm install @devopsplaybook.io/otel-utils@${{ steps.beta-version.outputs.version }}
98
+ # or
99
+ npm install @devopsplaybook.io/otel-utils@beta
100
+ \`\`\`
101
+
102
+ This beta version will be available for testing until the PR is merged.`
103
+ })
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.1843428",
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": {