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/CONTRIBUTING.md DELETED
@@ -1,104 +0,0 @@
1
- # Contributing to odesli.js
2
-
3
- Thank you for your interest in contributing to odesli.js! This document provides guidelines and information for contributors.
4
-
5
- ## Code of Conduct
6
-
7
- This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
8
-
9
- ## How Can I Contribute?
10
-
11
- ### Reporting Bugs
12
-
13
- - Use the GitHub issue tracker
14
- - Include a clear and descriptive title
15
- - Provide steps to reproduce the issue
16
- - Include error messages and stack traces
17
- - Specify your environment (Node.js version, OS, etc.)
18
-
19
- ### Suggesting Enhancements
20
-
21
- - Use the GitHub issue tracker
22
- - Describe the enhancement clearly
23
- - Explain why this enhancement would be useful
24
- - Include examples if applicable
25
-
26
- ### Pull Requests
27
-
28
- 1. Fork the repository
29
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
30
- 3. Make your changes
31
- 4. Run the tests (`npm test`)
32
- 5. Run the linter (`npm run lint`)
33
- 6. Run the formatter (`npm run format`)
34
- 7. Commit your changes (`git commit -m 'Add some amazing feature'`)
35
- 8. Push to the branch (`git push origin feature/amazing-feature`)
36
- 9. Open a Pull Request
37
-
38
- ## Development Setup
39
-
40
- 1. Clone the repository:
41
-
42
- ```bash
43
- git clone https://github.com/MattrAus/odesli.js.git
44
- cd odesli.js
45
- ```
46
-
47
- 2. Install dependencies:
48
-
49
- ```bash
50
- npm install
51
- ```
52
-
53
- 3. Run tests:
54
-
55
- ```bash
56
- npm test
57
- ```
58
-
59
- 4. Run linting:
60
-
61
- ```bash
62
- npm run lint
63
- ```
64
-
65
- 5. Format code:
66
-
67
- ```bash
68
- npm run format
69
- ```
70
-
71
- ## Code Style
72
-
73
- - Follow the existing code style
74
- - Use ESLint and Prettier configurations
75
- - Write meaningful commit messages
76
- - Add tests for new features
77
- - Update documentation as needed
78
-
79
- ## Testing
80
-
81
- - Write tests for new features
82
- - Ensure all tests pass before submitting PR
83
- - Use descriptive test names
84
- - Mock external dependencies
85
-
86
- ## Documentation
87
-
88
- - Update README.md if adding new features
89
- - Add JSDoc comments for new functions
90
- - Update TypeScript definitions if needed
91
- - Add examples for new functionality
92
-
93
- ## Release Process
94
-
95
- 1. Update version in `package.json`
96
- 2. Update `CHANGELOG.md`
97
- 3. Create a GitHub release
98
- 4. The CI/CD pipeline will automatically publish to npm
99
-
100
- ## Questions?
101
-
102
- If you have questions about contributing, please open an issue or contact the maintainers.
103
-
104
- Thank you for contributing to odesli.js! 🎵
@@ -1,84 +0,0 @@
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
- ```js
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 DELETED
@@ -1,112 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- | Version | Supported |
6
- | ------- | ------------------ |
7
- | 1.0.x | :white_check_mark: |
8
-
9
- ## Reporting a Vulnerability
10
-
11
- We take security vulnerabilities seriously. If you discover a security vulnerability in odesli.js, please follow these steps:
12
-
13
- ### 1. **DO NOT** create a public GitHub issue
14
-
15
- Security vulnerabilities should be reported privately to avoid potential exploitation.
16
-
17
- ### 2. Email the maintainer
18
-
19
- Send a detailed report to: `me@mtr.gg`
20
-
21
- ### 3. Include the following information
22
-
23
- - **Description**: A clear description of the vulnerability
24
- - **Steps to reproduce**: Detailed steps to reproduce the issue
25
- - **Impact**: Potential impact of the vulnerability
26
- - **Suggested fix**: If you have suggestions for fixing the issue
27
- - **Affected versions**: Which versions are affected
28
- - **Proof of concept**: If applicable, include a proof of concept
29
-
30
- ### 4. Response timeline
31
-
32
- - **Initial response**: Within 48 hours
33
- - **Status update**: Within 1 week
34
- - **Fix timeline**: Depends on severity and complexity
35
-
36
- ## Security Best Practices
37
-
38
- ### For Users
39
-
40
- 1. **Keep dependencies updated**: Regularly update to the latest version
41
- 2. **Use HTTPS**: Always use HTTPS when making API calls
42
- 3. **Validate inputs**: Validate all user inputs before passing to the library
43
- 4. **Rate limiting**: Respect API rate limits to avoid being blocked
44
- 5. **API key security**: Store API keys securely and never commit them to version control
45
-
46
- ### For Contributors
47
-
48
- 1. **Code review**: All code changes require security review
49
- 2. **Dependency scanning**: Run `npm audit` before submitting PRs
50
- 3. **Input validation**: Always validate and sanitize inputs
51
- 4. **Error handling**: Don't expose sensitive information in error messages
52
- 5. **Testing**: Include security-focused tests
53
-
54
- ## Security Features
55
-
56
- ### Input Validation
57
-
58
- - URL validation and sanitization
59
- - Parameter type checking
60
- - Malformed response handling
61
-
62
- ### Error Handling
63
-
64
- - Safe error messages that don't expose internal details
65
- - Graceful handling of malformed API responses
66
- - Rate limiting error handling
67
-
68
- ### API Security
69
-
70
- - HTTPS-only communication
71
- - API key validation
72
- - Request parameter sanitization
73
-
74
- ## Dependency Security
75
-
76
- We regularly audit our dependencies for security vulnerabilities:
77
-
78
- ```bash
79
- # Check for vulnerabilities
80
- npm audit
81
-
82
- # Fix automatically fixable issues
83
- npm audit fix
84
-
85
- # Run security scan with Snyk
86
- npm run security
87
- ```
88
-
89
- ## Disclosure Policy
90
-
91
- When a security vulnerability is discovered:
92
-
93
- 1. **Private disclosure**: Issue is reported privately
94
- 2. **Investigation**: We investigate and validate the issue
95
- 3. **Fix development**: We develop and test a fix
96
- 4. **Release**: We release a patched version
97
- 5. **Public disclosure**: We publicly disclose the vulnerability with details
98
-
99
- ## Security Updates
100
-
101
- Security updates are released as patch versions (e.g., 1.0.1, 1.0.2) and should be applied immediately.
102
-
103
- ## Contact
104
-
105
- For security-related questions or concerns:
106
-
107
- - Email: `me@mtr.gg`
108
- - GitHub: [@MattrAus](https://github.com/MattrAus)
109
-
110
- ## Acknowledgments
111
-
112
- We appreciate security researchers and users who responsibly disclose vulnerabilities. Contributors to security improvements will be acknowledged in our release notes.