odesli.js 1.3.4 → 1.3.5

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,56 @@
1
+ version: 2
2
+ updates:
3
+ # Enable version updates for npm
4
+ - package-ecosystem: 'npm'
5
+ directory: '/'
6
+ schedule:
7
+ interval: 'weekly'
8
+ day: 'monday'
9
+ time: '09:00'
10
+ timezone: 'America/New_York'
11
+
12
+ # Group minor and patch updates together
13
+ groups:
14
+ minor-and-patch:
15
+ patterns:
16
+ - '*'
17
+ update-types:
18
+ - 'minor'
19
+ - 'patch'
20
+
21
+ # Commit message format
22
+ commit-message:
23
+ prefix: 'chore'
24
+ prefix-development: 'chore'
25
+ include: 'scope'
26
+
27
+ # PR settings
28
+ open-pull-requests-limit: 10
29
+ reviewers:
30
+ - 'MattrAus'
31
+ assignees:
32
+ - 'MattrAus'
33
+ labels:
34
+ - 'dependencies'
35
+ - 'automated'
36
+
37
+ # Ignore certain updates
38
+ ignore:
39
+ # Ignore major version updates for critical dependencies
40
+ - dependency-name: 'typescript'
41
+ update-types: ['version-update:semver-major']
42
+ - dependency-name: 'jest'
43
+ update-types: ['version-update:semver-major']
44
+ - dependency-name: 'eslint'
45
+ update-types: ['version-update:semver-major']
46
+ # Ignore major updates that break compatibility
47
+ - dependency-name: 'eslint-plugin-promise'
48
+ update-types: ['version-update:semver-major']
49
+ - dependency-name: 'node-fetch'
50
+ update-types: ['version-update:semver-major']
51
+
52
+ # Rebase strategy
53
+ rebase-strategy: 'auto'
54
+
55
+ # Versioning strategy
56
+ versioning-strategy: 'auto'
@@ -0,0 +1,137 @@
1
+ name: Dependabot Auto Merge
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened, ready_for_review]
6
+ branches: [master]
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+ packages: write
12
+
13
+ jobs:
14
+ dependabot-auto-merge:
15
+ runs-on: ubuntu-latest
16
+ if: github.actor == 'dependabot[bot]'
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+ with:
22
+ ref: ${{ github.head_ref }}
23
+ token: ${{ secrets.GITHUB_TOKEN }}
24
+
25
+ - name: Use Node.js
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ node-version: '20.x'
29
+ cache: 'npm'
30
+
31
+ - name: Install dependencies
32
+ run: npm ci
33
+
34
+ - name: Run linting
35
+ run: npm run lint
36
+
37
+ - name: Check formatting
38
+ run: npm run format:check
39
+
40
+ - name: Run tests
41
+ run: npm test
42
+
43
+ - name: Run security audit
44
+ run: npm audit --audit-level=moderate
45
+
46
+ - name: Build project
47
+ run: npm run build
48
+
49
+ - name: Auto-approve PR
50
+ uses: actions/github-script@v7
51
+ with:
52
+ script: |
53
+ github.rest.pulls.createReview({
54
+ owner: context.repo.owner,
55
+ repo: context.repo.repo,
56
+ pull_number: context.issue.number,
57
+ event: 'APPROVE',
58
+ body: '✅ Automated approval: All tests passed successfully!'
59
+ })
60
+
61
+ - name: Comment on PR
62
+ uses: actions/github-script@v7
63
+ with:
64
+ script: |
65
+ github.rest.issues.createComment({
66
+ owner: context.repo.owner,
67
+ repo: context.repo.repo,
68
+ issue_number: context.issue.number,
69
+ body: '✅ All tests passed! This PR is ready for merge.'
70
+ })
71
+
72
+ # Auto-release after Dependabot PR is merged
73
+ auto-release:
74
+ runs-on: ubuntu-latest
75
+ needs: dependabot-auto-merge
76
+ if: github.actor == 'dependabot[bot]' && github.event.pull_request.merged == true
77
+
78
+ steps:
79
+ - name: Checkout code
80
+ uses: actions/checkout@v4
81
+ with:
82
+ token: ${{ secrets.GITHUB_TOKEN }}
83
+
84
+ - name: Use Node.js
85
+ uses: actions/setup-node@v4
86
+ with:
87
+ node-version: '20.x'
88
+ cache: 'npm'
89
+
90
+ - name: Install dependencies
91
+ run: npm ci
92
+
93
+ - name: Bump version
94
+ id: version
95
+ run: |
96
+ npm run version:patch
97
+ VERSION=$(node -p "require('./package.json').version")
98
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
99
+
100
+ - name: Create git tag
101
+ run: |
102
+ VERSION=$(node -p "require('./package.json').version")
103
+ git config --local user.email "action@github.com"
104
+ git config --local user.name "GitHub Action"
105
+ git add package.json
106
+ git commit -m "chore: bump version to $VERSION"
107
+ git tag "v$VERSION"
108
+ git push origin HEAD:master --tags
109
+
110
+ - name: Create Release
111
+ uses: actions/create-release@v1
112
+ env:
113
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114
+ with:
115
+ tag_name: v${{ steps.version.outputs.version }}
116
+ release_name: Release v${{ steps.version.outputs.version }}
117
+ body: |
118
+ ## 🔄 Dependabot Update
119
+
120
+ This release includes dependency updates from Dependabot.
121
+
122
+ ### Changes
123
+ - Updated dependencies to latest versions
124
+ - All tests passing ✅
125
+ - Security audit passed ✅
126
+
127
+ ### Updated Dependencies
128
+ ${{ github.event.pull_request.body }}
129
+ draft: false
130
+ prerelease: false
131
+
132
+ - name: Publish to NPM
133
+ run: |
134
+ npm pkg set name="odesli.js"
135
+ npm publish --access public
136
+ env:
137
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.prettierignore CHANGED
@@ -1,31 +1,31 @@
1
- # Dependencies
2
- node_modules/
3
-
4
- # Build outputs
5
- lib/
6
- dist/
7
- build/
8
-
9
- # Coverage reports
10
- coverage/
11
-
12
- # Logs
13
- *.log
14
-
15
- # Environment files
16
- .env*
17
-
18
- # Package files
19
- package-lock.json
20
- yarn.lock
21
-
22
- # Git
23
- .git/
24
-
25
- # IDE
26
- .vscode/
27
- .idea/
28
-
29
- # OS
30
- .DS_Store
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build outputs
5
+ lib/
6
+ dist/
7
+ build/
8
+
9
+ # Coverage reports
10
+ coverage/
11
+
12
+ # Logs
13
+ *.log
14
+
15
+ # Environment files
16
+ .env*
17
+
18
+ # Package files
19
+ package-lock.json
20
+ yarn.lock
21
+
22
+ # Git
23
+ .git/
24
+
25
+ # IDE
26
+ .vscode/
27
+ .idea/
28
+
29
+ # OS
30
+ .DS_Store
31
31
  Thumbs.db
package/LICENSE CHANGED
@@ -1,15 +1,15 @@
1
- ISC License
2
-
3
- Copyright (c) 2024, Mattr
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1
+ ISC License
2
+
3
+ Copyright (c) 2024, Mattr
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
15
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # odesli.js
2
2
 
3
- [![npm version](https://badge.fury.io/js/odesli.js.svg)](https://badge.fury.io/js/odesli.js)
4
- [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
5
- [![Node.js CI](https://github.com/MattrAus/odesli.js/workflows/CI/badge.svg)](https://github.com/MattrAus/odesli.js/actions/workflows/ci.yml)
3
+ [![npm version](https://img.shields.io/npm/v/odesli.js.svg)](https://www.npmjs.com/package/odesli.js)
4
+ [![npm license](https://img.shields.io/npm/l/odesli.js)](https://github.com/MattrAus/odesli.js/blob/master/LICENSE)
5
+ [![CI](https://github.com/MattrAus/odesli.js/actions/workflows/ci.yml/badge.svg)](https://github.com/MattrAus/odesli.js/actions/workflows/ci.yml)
6
6
  [![Test Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)](https://github.com/MattrAus/odesli.js)
7
7
  [![Bundle Size](https://img.shields.io/bundlephobia/min/odesli.js)](https://bundlephobia.com/result?p=odesli.js)
8
8
  [![Downloads](https://img.shields.io/npm/dm/odesli.js.svg)](https://www.npmjs.com/package/odesli.js)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odesli.js",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Node.js Client to query odesli.co (song.link/album.link) API",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",
@@ -54,7 +54,7 @@
54
54
  "url": "https://github.com/MattrAus/odesli.js/issues"
55
55
  },
56
56
  "dependencies": {
57
- "@types/node": "^24.0.3",
57
+ "@types/node": "^24.0.13",
58
58
  "node-fetch": "^2.7.0"
59
59
  },
60
60
  "devDependencies": {
@@ -68,13 +68,13 @@
68
68
  "eslint-plugin-import": "^2.28.0",
69
69
  "eslint-plugin-jest": "^29.0.1",
70
70
  "eslint-plugin-node": "^11.1.0",
71
- "eslint-plugin-prettier": "^5.5.0",
71
+ "eslint-plugin-prettier": "^5.5.1",
72
72
  "eslint-plugin-promise": "^6.6.0",
73
73
  "jest": "^29.5.0",
74
74
  "jest-fetch-mock": "^3.0.3",
75
75
  "jsdoc": "^4.0.2",
76
- "prettier": "^3.0.0",
77
- "snyk": "^1.1234.0",
76
+ "prettier": "^3.6.2",
77
+ "snyk": "^1.1297.3",
78
78
  "ts-jest": "^29.1.0",
79
79
  "typescript": "^5.0.0"
80
80
  },
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ /**
7
+ * Automatically bump version based on dependency changes
8
+ * Usage: node scripts/version-bump.js [patch|minor|major]
9
+ */
10
+
11
+ function bumpVersion(type = 'patch') {
12
+ const packagePath = path.join(__dirname, '..', 'package.json');
13
+ const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
14
+
15
+ const currentVersion = packageJson.version;
16
+ const [major, minor, patch] = currentVersion.split('.').map(Number);
17
+
18
+ let newVersion;
19
+ switch (type) {
20
+ case 'major':
21
+ newVersion = `${major + 1}.0.0`;
22
+ break;
23
+ case 'minor':
24
+ newVersion = `${major}.${minor + 1}.0`;
25
+ break;
26
+ case 'patch':
27
+ default:
28
+ newVersion = `${major}.${minor}.${patch + 1}`;
29
+ break;
30
+ }
31
+
32
+ packageJson.version = newVersion;
33
+ fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + '\n');
34
+
35
+ console.log(`Version bumped from ${currentVersion} to ${newVersion}`);
36
+ return newVersion;
37
+ }
38
+
39
+ // Get version type from command line argument
40
+ const versionType = process.argv[2] || 'patch';
41
+ bumpVersion(versionType);