odesli.js 1.3.8 → 2.0.0

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.
package/lib/index.mjs CHANGED
@@ -1,3 +1,6 @@
1
- import cjs from './index.js';
2
- export const Odesli = cjs;
3
- export * from './index.js';
1
+ import cjs from './index.js'
2
+
3
+ export const Odesli = cjs
4
+ export const OdesliError = cjs.OdesliError
5
+ export const SUNSET_DOCS_URL = cjs.SUNSET_DOCS_URL
6
+ export default cjs
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "odesli.js",
3
- "version": "1.3.8",
4
- "description": "Node.js Client to query odesli.co (song.link/album.link) API",
3
+ "version": "2.0.0",
4
+ "description": "Node.js/TypeScript client for the Songlink/Odesli API (requires allowlisted API key; public API retired July 2026)",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -27,6 +27,11 @@
27
27
  "engines": {
28
28
  "node": ">=14.0.0"
29
29
  },
30
+ "files": [
31
+ "lib/",
32
+ "README.md",
33
+ "LICENSE"
34
+ ],
30
35
  "scripts": {
31
36
  "build": "tsc",
32
37
  "format": "prettier --write .",
@@ -36,6 +41,7 @@
36
41
  "test": "jest",
37
42
  "test:watch": "jest --watch",
38
43
  "test:coverage": "jest --coverage",
44
+ "test:live": "jest tests/live-api.test.js",
39
45
  "docs": "jsdoc lib/index.js -d docs",
40
46
  "audit": "npm audit",
41
47
  "audit:fix": "npm audit fix",
@@ -90,5 +96,8 @@
90
96
  "ts-jest": "^29.4.4",
91
97
  "typescript": "^5.9.3"
92
98
  },
99
+ "overrides": {
100
+ "js-yaml": "^4.1.1"
101
+ },
93
102
  "homepage": "https://github.com/MattrAus/odesli.js#readme"
94
103
  }
package/.eslintrc.js DELETED
@@ -1,33 +0,0 @@
1
- module.exports = {
2
- env: {
3
- node: true,
4
- es2021: true,
5
- jest: true,
6
- },
7
- extends: ['standard', 'plugin:jest/recommended', 'prettier'],
8
- parserOptions: {
9
- ecmaVersion: 'latest',
10
- sourceType: 'module',
11
- },
12
- plugins: ['jest', 'prettier'],
13
- rules: {
14
- 'jest/no-focused-tests': 'error',
15
- 'jest/no-identical-title': 'error',
16
- 'jest/prefer-to-have-length': 'warn',
17
- 'jest/valid-expect': 'error',
18
- 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
19
- 'prefer-const': 'error',
20
- 'no-var': 'error',
21
- 'prettier/prettier': 'error',
22
- 'comma-dangle': 'off',
23
- semi: 'off',
24
- },
25
- overrides: [
26
- {
27
- files: ['tests/**/*.js'],
28
- env: {
29
- jest: true,
30
- },
31
- },
32
- ],
33
- };
package/.gitattributes DELETED
@@ -1 +0,0 @@
1
- * text=auto eol=lf
@@ -1,56 +0,0 @@
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'
@@ -1,94 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- pull_request:
7
- branches: [master]
8
-
9
- permissions:
10
- contents: read
11
-
12
- jobs:
13
- test:
14
- runs-on: ubuntu-latest
15
-
16
- strategy:
17
- matrix:
18
- node-version: [18.x, 20.x, 22.x]
19
-
20
- steps:
21
- - name: Checkout code
22
- uses: actions/checkout@v4
23
-
24
- - name: Use Node.js ${{ matrix.node-version }}
25
- uses: actions/setup-node@v4
26
- with:
27
- node-version: ${{ matrix.node-version }}
28
- cache: 'npm'
29
-
30
- - name: Install dependencies
31
- run: npm ci
32
-
33
- - name: Run linting
34
- run: npm run lint
35
-
36
- - name: Check formatting
37
- run: npm run format:check
38
-
39
- - name: Run tests
40
- run: npm test
41
-
42
- - name: Run tests with coverage
43
- run: npm run test:coverage
44
-
45
- - name: Upload coverage to Codecov
46
- uses: codecov/codecov-action@v3
47
- with:
48
- file: ./coverage/lcov.info
49
- flags: unittests
50
- name: codecov-umbrella
51
- fail_ci_if_error: false
52
-
53
- security:
54
- runs-on: ubuntu-latest
55
- needs: test
56
-
57
- steps:
58
- - name: Checkout code
59
- uses: actions/checkout@v4
60
-
61
- - name: Use Node.js
62
- uses: actions/setup-node@v4
63
- with:
64
- node-version: '20.x'
65
- cache: 'npm'
66
-
67
- - name: Install dependencies
68
- run: npm ci
69
-
70
- - name: Run security audit
71
- run: npm audit --audit-level=moderate
72
-
73
- build:
74
- runs-on: ubuntu-latest
75
- needs: test
76
-
77
- steps:
78
- - name: Checkout code
79
- uses: actions/checkout@v4
80
-
81
- - name: Use Node.js
82
- uses: actions/setup-node@v4
83
- with:
84
- node-version: '20.x'
85
- cache: 'npm'
86
-
87
- - name: Install dependencies
88
- run: npm ci
89
-
90
- - name: Build project
91
- run: npm run build
92
-
93
- - name: Verify TypeScript compilation
94
- run: npx tsc --noEmit
@@ -1,137 +0,0 @@
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 }}
@@ -1,46 +0,0 @@
1
- name: Publish to GitHub Packages
2
-
3
- on:
4
- release:
5
- types: [published]
6
- workflow_dispatch:
7
-
8
- jobs:
9
- publish-github:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: read
13
- packages: write
14
-
15
- steps:
16
- - name: Checkout code
17
- uses: actions/checkout@v4
18
-
19
- - name: Setup Node.js
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: '20.x'
23
- cache: 'npm'
24
- registry-url: 'https://npm.pkg.github.com'
25
-
26
- - name: Install dependencies
27
- run: npm ci
28
-
29
- - name: Run tests
30
- run: npm test
31
-
32
- - name: Build project
33
- run: npm run build
34
-
35
- - name: Setup GitHub Packages Registry
36
- run: |
37
- echo "@mattraus:registry=https://npm.pkg.github.com" >> .npmrc
38
- echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
39
-
40
- - name: Update package name
41
- run: npm pkg set name="@mattraus/odesli.js"
42
-
43
- - name: Publish to GitHub Packages
44
- run: npm publish
45
- env:
46
- NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,49 +0,0 @@
1
- name: Publish to NPM
2
-
3
- on:
4
- release:
5
- types: [published]
6
- workflow_dispatch:
7
-
8
- jobs:
9
- publish-npm:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: read
13
- packages: write
14
-
15
- steps:
16
- - name: Checkout code
17
- uses: actions/checkout@v4
18
- with:
19
- ref: master
20
-
21
- - name: Use Node.js
22
- uses: actions/setup-node@v4
23
- with:
24
- node-version: '20.x'
25
- cache: 'npm'
26
- registry-url: 'https://registry.npmjs.org'
27
-
28
- - name: Install dependencies
29
- run: npm ci
30
-
31
- - name: Run tests
32
- run: npm test
33
-
34
- - name: Run linting
35
- run: npm run lint
36
-
37
- - name: Check formatting
38
- run: npm run format:check
39
-
40
- - name: Build project
41
- run: npm run build
42
-
43
- - name: Update package name for npm
44
- run: npm pkg set name="odesli.js"
45
-
46
- - name: Publish to NPM
47
- run: npm publish --access public
48
- env:
49
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.prettierignore DELETED
@@ -1,31 +0,0 @@
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
- Thumbs.db
package/.prettierrc DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "semi": true,
3
- "trailingComma": "es5",
4
- "singleQuote": true,
5
- "printWidth": 80,
6
- "tabWidth": 2,
7
- "useTabs": false,
8
- "bracketSpacing": true,
9
- "arrowParens": "avoid",
10
- "endOfLine": "lf"
11
- }