odesli.js 1.1.0 โ†’ 1.1.1

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/.eslintrc.js CHANGED
@@ -4,12 +4,12 @@ module.exports = {
4
4
  es2021: true,
5
5
  jest: true,
6
6
  },
7
- extends: ['standard', 'plugin:jest/recommended'],
7
+ extends: ['standard', 'plugin:jest/recommended', 'prettier'],
8
8
  parserOptions: {
9
9
  ecmaVersion: 'latest',
10
10
  sourceType: 'module',
11
11
  },
12
- plugins: ['jest'],
12
+ plugins: ['jest', 'prettier'],
13
13
  rules: {
14
14
  'jest/no-disabled-tests': 'warn',
15
15
  'jest/no-focused-tests': 'error',
@@ -19,6 +19,9 @@ module.exports = {
19
19
  'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
20
20
  'prefer-const': 'error',
21
21
  'no-var': 'error',
22
+ 'prettier/prettier': 'error',
23
+ 'comma-dangle': 'off',
24
+ semi: 'off',
22
25
  },
23
26
  overrides: [
24
27
  {
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
package/CHANGELOG.md CHANGED
@@ -5,17 +5,20 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [1.1.0] - 2025-06-22
9
9
 
10
10
  ### Added
11
11
 
12
- - Comprehensive test suite with Jest
12
+ - Comprehensive test suite with Jest (40 tests, 100% coverage)
13
13
  - ESLint configuration for code quality
14
14
  - Prettier configuration for code formatting
15
15
  - GitHub Actions CI/CD workflows
16
16
  - Example code in `examples/` directory
17
17
  - Improved TypeScript configuration
18
18
  - Better error handling and validation
19
+ - Professional documentation with badges
20
+ - Security scanning with Snyk
21
+ - Development tools and scripts
19
22
 
20
23
  ### Fixed
21
24
 
@@ -23,26 +26,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
26
  - Simplified async logic in all methods
24
27
  - Removed unnecessary Promise.all wrappers
25
28
  - Improved error handling in `_request` method
29
+ - Enhanced TypeScript type definitions
26
30
 
27
31
  ### Changed
28
32
 
29
- - Updated package.json with better metadata
33
+ - Updated package.json with better metadata and exports
30
34
  - Enhanced README with comprehensive documentation
31
35
  - Added proper TypeScript declarations
32
36
  - Improved code structure and maintainability
37
+ - Modern ES modules support
38
+ - Professional project structure
33
39
 
34
40
  ## [1.0.3] - 2024-01-XX
35
41
 
36
- ### Added
42
+ ### Features
37
43
 
38
44
  - Initial release
39
45
  - Basic Odesli API client functionality
40
46
  - Support for fetch, getByParams, and getById methods
41
47
  - TypeScript definitions
42
48
  - Basic documentation
43
-
44
- ### Features
45
-
46
49
  - Fetch songs by URL from any streaming platform
47
50
  - Get song information by platform, type, and ID
48
51
  - Get song information by entity ID
@@ -113,7 +113,7 @@ the community.
113
113
 
114
114
  This Code of Conduct is adapted from the [Contributor Covenant][homepage],
115
115
  version 2.0, available at
116
- https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
116
+ [contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
117
117
 
118
118
  Community Impact Guidelines were inspired by [Mozilla's code of conduct
119
119
  enforcement ladder](https://github.com/mozilla/diversity).
@@ -121,5 +121,5 @@ enforcement ladder](https://github.com/mozilla/diversity).
121
121
  [homepage]: https://www.contributor-covenant.org
122
122
 
123
123
  For answers to common questions about this code of conduct, see the FAQ at
124
- https://www.contributor-covenant.org/faq. Translations are available at
125
- https://www.contributor-covenant.org/translations.
124
+ [contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at
125
+ [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
package/CONTRIBUTING.md CHANGED
@@ -63,6 +63,7 @@ This project and everyone participating in it is governed by our Code of Conduct
63
63
  ```
64
64
 
65
65
  5. Format code:
66
+
66
67
  ```bash
67
68
  npm run format
68
69
  ```
package/README.md CHANGED
@@ -12,25 +12,30 @@ A Node.js client for the [Odesli API](https://odesli.co/) (formerly song.link/al
12
12
 
13
13
  ## ๐Ÿ“‹ Table of Contents
14
14
 
15
- - [Features](#features)
16
- - [Installation](#installation)
17
- - [Quick Start](#quick-start)
18
- - [API Key](#api-key)
19
- - [Usage](#usage)
20
- - [Fetch by URL](#fetch-by-url)
21
- - [Fetch by Parameters](#fetch-by-parameters)
22
- - [Fetch by Entity ID](#fetch-by-entity-id)
23
- - [Country-Specific Results](#country-specific-results)
24
- - [Error Handling](#error-handling)
25
- - [Advanced Usage](#advanced-usage)
26
- - [Response Format](#response-format)
27
- - [Supported Platforms](#supported-platforms)
28
- - [TypeScript Support](#typescript-support)
29
- - [Examples](#examples)
30
- - [API Documentation](#api-documentation)
31
- - [Contributing](#contributing)
32
- - [License](#license)
33
- - [Support](#support)
15
+ - [odesli.js](#odeslijs)
16
+ - [๐Ÿ“‹ Table of Contents](#-table-of-contents)
17
+ - [Features](#features)
18
+ - [Installation](#installation)
19
+ - [Quick Start](#quick-start)
20
+ - [API Key](#api-key)
21
+ - [Usage](#usage)
22
+ - [Fetch by URL](#fetch-by-url)
23
+ - [Fetch by Parameters](#fetch-by-parameters)
24
+ - [Fetch by Entity ID](#fetch-by-entity-id)
25
+ - [Country-Specific Results](#country-specific-results)
26
+ - [Error Handling](#error-handling)
27
+ - [Advanced Usage](#advanced-usage)
28
+ - [Batch Processing](#batch-processing)
29
+ - [Working with Different Platforms](#working-with-different-platforms)
30
+ - [Error Recovery](#error-recovery)
31
+ - [Response Format](#response-format)
32
+ - [Supported Platforms](#supported-platforms)
33
+ - [TypeScript Support](#typescript-support)
34
+ - [Examples](#examples)
35
+ - [API Documentation](#api-documentation)
36
+ - [Contributing](#contributing)
37
+ - [License](#license)
38
+ - [Support](#support)
34
39
 
35
40
  ## Features
36
41
 
@@ -0,0 +1,84 @@
1
+ # Release v1.1.0 - Major Improvements & Professional Setup
2
+
3
+ ## ๐ŸŽ‰ What's New
4
+
5
+ This release brings significant improvements to the odesli.js package, transforming it from a basic client into a production-ready, professionally maintained library.
6
+
7
+ ## โœจ Key Features Added
8
+
9
+ ### ๐Ÿงช **Comprehensive Testing**
10
+
11
+ - **40 comprehensive tests** with 100% coverage
12
+ - Jest test suite with mocking for reliable testing
13
+ - Edge case handling and error scenario testing
14
+ - Automated test runs in CI/CD pipeline
15
+
16
+ ### ๐Ÿ› ๏ธ **Development Tools**
17
+
18
+ - **ESLint** configuration for code quality
19
+ - **Prettier** for consistent code formatting
20
+ - **TypeScript 5.0** with enhanced type definitions
21
+ - **Security scanning** with Snyk integration
22
+
23
+ ### ๐Ÿš€ **CI/CD Pipeline**
24
+
25
+ - **GitHub Actions** workflows for automated testing
26
+ - **Automated publishing** on release tags
27
+ - **Code quality checks** (linting, formatting, security)
28
+ - **Multi-platform testing** support
29
+
30
+ ### ๐Ÿ“š **Documentation & Examples**
31
+
32
+ - **Professional README** with badges and comprehensive guides
33
+ - **Example scripts** for basic and advanced usage
34
+ - **TypeScript support** documentation
35
+ - **Error handling** examples and best practices
36
+
37
+ ### ๐Ÿ”ง **Code Improvements**
38
+
39
+ - **Enhanced error handling** with descriptive messages
40
+ - **Simplified async logic** for better performance
41
+ - **Modern ES modules** support
42
+ - **Better TypeScript** type definitions
43
+ - **Professional project structure**
44
+
45
+ ## ๐Ÿ› Bug Fixes
46
+
47
+ - Fixed API parameter mismatch (`api` โ†’ `apiKey`)
48
+ - Removed unnecessary Promise.all wrappers
49
+ - Improved error handling in request methods
50
+ - Enhanced TypeScript compatibility
51
+
52
+ ## ๐Ÿ“ฆ Installation
53
+
54
+ ```bash
55
+ npm install odesli.js@1.1.0
56
+ ```
57
+
58
+ ## ๐Ÿš€ Quick Start
59
+
60
+ ```javascript
61
+ const Odesli = require('odesli.js');
62
+
63
+ const odesli = new Odesli();
64
+ const song = await odesli.fetch(
65
+ 'https://open.spotify.com/track/4Km5HrUvYTaSUfiSGPJeQR'
66
+ );
67
+ console.log(`${song.title} by ${song.artist[0]}`);
68
+ ```
69
+
70
+ ## ๐Ÿ”— Links
71
+
72
+ - **NPM Package**: [npmjs.com/package/odesli.js](https://www.npmjs.com/package/odesli.js)
73
+ - **GitHub Repository**: [github.com/MattrAus/odesli.js](https://github.com/MattrAus/odesli.js)
74
+ - **Documentation**: [github.com/MattrAus/odesli.js#readme](https://github.com/MattrAus/odesli.js#readme)
75
+
76
+ ## ๐Ÿ™ Thanks
77
+
78
+ Thank you to all contributors and users who provided feedback and suggestions for this release!
79
+
80
+ ---
81
+
82
+ **Breaking Changes**: None - This is a backward-compatible release.
83
+
84
+ **Migration**: No migration required. Simply update to version 1.1.0 for all improvements.
package/SECURITY.md CHANGED
@@ -18,7 +18,7 @@ Security vulnerabilities should be reported privately to avoid potential exploit
18
18
 
19
19
  Send a detailed report to: `me@mtr.gg`
20
20
 
21
- ### 3. Include the following information:
21
+ ### 3. Include the following information
22
22
 
23
23
  - **Description**: A clear description of the vulnerability
24
24
  - **Steps to reproduce**: Detailed steps to reproduce the issue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odesli.js",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
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",
@@ -55,17 +55,21 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@types/node": "^24.0.3",
58
- "node-fetch": "^2.6.1"
58
+ "node-fetch": "^2.7.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/jest": "^29.5.0",
61
+ "@types/eslint-config-prettier": "^6.11.3",
62
+ "@types/eslint-plugin-prettier": "^3.1.3",
63
+ "@types/jest": "^30.0.0",
62
64
  "@types/prettier": "^2.7.3",
63
- "eslint": "^8.45.0",
65
+ "eslint": "^8.57.1",
66
+ "eslint-config-prettier": "^10.1.5",
64
67
  "eslint-config-standard": "^17.1.0",
65
68
  "eslint-plugin-import": "^2.28.0",
66
- "eslint-plugin-jest": "^27.2.1",
69
+ "eslint-plugin-jest": "^29.0.1",
67
70
  "eslint-plugin-node": "^11.1.0",
68
- "eslint-plugin-promise": "^6.1.1",
71
+ "eslint-plugin-prettier": "^5.5.0",
72
+ "eslint-plugin-promise": "^6.6.0",
69
73
  "jest": "^29.5.0",
70
74
  "jsdoc": "^4.0.2",
71
75
  "prettier": "^3.0.0",