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.
@@ -1,318 +0,0 @@
1
- # Odesli.js API Improvements
2
-
3
- This document outlines the comprehensive improvements made to the Odesli API client to enhance functionality, reliability, and developer experience.
4
-
5
- ## 🚀 New Constructor Parameters
6
-
7
- ### Enhanced Configuration Options
8
-
9
- The constructor now accepts a comprehensive options object with the following parameters:
10
-
11
- ```js
12
- const odesli = new Odesli({
13
- // Core options
14
- apiKey: 'your-api-key', // Optional API key for higher rate limits
15
- version: 'v1-alpha.1', // API version (defaults to 'v1-alpha.1')
16
-
17
- // Caching and performance
18
- cache: true, // Enable response caching (defaults to true)
19
- timeout: 10000, // Request timeout in milliseconds (defaults to 10000)
20
-
21
- // Retry logic
22
- maxRetries: 3, // Maximum retry attempts (defaults to 3)
23
- retryDelay: 1000, // Base delay between retries (defaults to 1000)
24
-
25
- // Customization
26
- headers: { 'User-Agent': 'MyApp/1.0' }, // Additional request headers
27
- baseUrl: 'https://api.song.link', // Custom base URL
28
- validateParams: true, // Enable parameter validation (defaults to true)
29
- logger: (message, level) => console.log(`[${level}] ${message}`), // Custom logger
30
- });
31
- ```
32
-
33
- ## 🔧 Enhanced Method Parameters
34
-
35
- ### Options Object Support
36
-
37
- All methods now support both backward-compatible string parameters and new options objects:
38
-
39
- #### `fetch(url, options)`
40
-
41
- ```js
42
- // Backward compatible
43
- const song = await odesli.fetch(url, 'GB');
44
-
45
- // New options object
46
- const song = await odesli.fetch(url, {
47
- country: 'GB',
48
- skipCache: true,
49
- timeout: 5000,
50
- });
51
- ```
52
-
53
- #### `getByParams(platform, type, id, options)`
54
-
55
- ```js
56
- // Backward compatible
57
- const song = await odesli.getByParams('spotify', 'song', '123', 'GB');
58
-
59
- // New options object
60
- const song = await odesli.getByParams('spotify', 'song', '123', {
61
- country: 'GB',
62
- skipCache: false,
63
- timeout: 8000,
64
- });
65
- ```
66
-
67
- #### `getById(id, options)`
68
-
69
- ```js
70
- // Backward compatible
71
- const song = await odesli.getById('SPOTIFY_SONG::123', 'GB');
72
-
73
- // New options object
74
- const song = await odesli.getById('SPOTIFY_SONG::123', {
75
- country: 'GB',
76
- skipCache: true,
77
- timeout: 6000,
78
- });
79
- ```
80
-
81
- ## 🆕 New Utility Methods
82
-
83
- ### Batch Operations
84
-
85
- ```js
86
- // Fetch multiple songs with concurrency control
87
- const urls = [
88
- 'https://open.spotify.com/track/123',
89
- 'https://open.spotify.com/track/456',
90
- 'https://open.spotify.com/track/789',
91
- ];
92
-
93
- const results = await odesli.fetchBatch(urls, {
94
- country: 'US',
95
- concurrency: 3,
96
- skipCache: false,
97
- });
98
- ```
99
-
100
- ### Platform Detection
101
-
102
- ```js
103
- // Detect platform from URL
104
- const platform = odesli.detectPlatform('https://open.spotify.com/track/123');
105
- console.log(platform); // 'spotify'
106
-
107
- // Extract ID from platform URL
108
- const id = odesli.extractId(
109
- 'https://open.spotify.com/track/4Km5HrUvYTaSUfiSGPJeQR'
110
- );
111
- console.log(id); // '4Km5HrUvYTaSUfiSGPJeQR'
112
- ```
113
-
114
- ### Platform Information
115
-
116
- ```js
117
- // Get list of supported platforms
118
- const platforms = odesli.getSupportedPlatforms();
119
- console.log(platforms); // ['spotify', 'appleMusic', 'youtube', ...]
120
- ```
121
-
122
- ### Enhanced Cache Statistics
123
-
124
- ```js
125
- // Get detailed cache statistics
126
- const stats = odesli.getCacheStats();
127
- console.log(`Cache size: ${stats.size}`);
128
- console.log(`Hit rate: ${stats.hitRate}%`);
129
- console.log(`Total requests: ${stats.totalRequests}`);
130
- ```
131
-
132
- ## 🛡️ Improved Error Handling & Validation
133
-
134
- ### Parameter Validation
135
-
136
- - **URL validation**: Ensures valid URL format
137
- - **Country code validation**: Validates ISO 3166-1 Alpha-2 format
138
- - **Platform validation**: Ensures platform is supported
139
- - **Type validation**: Validates 'song' or 'album' types
140
-
141
- ### Retry Logic
142
-
143
- - **Exponential backoff**: Intelligent retry delays
144
- - **Non-retryable errors**: Skips retries for 4xx/5xx errors
145
- - **Configurable retries**: Customizable retry attempts and delays
146
-
147
- ### Enhanced Error Messages
148
-
149
- ```js
150
- // Clear, descriptive error messages
151
- try {
152
- await odesli.fetch('invalid-url');
153
- } catch (error) {
154
- console.log(error.message); // "Invalid URL format provided to odesli.fetch()"
155
- }
156
-
157
- try {
158
- await odesli.getByParams('invalid-platform', 'song', '123');
159
- } catch (error) {
160
- console.log(error.message); // "Invalid platform 'invalid-platform'. Must be one of: spotify, itunes, ..."
161
- }
162
- ```
163
-
164
- ## 🔄 Backward Compatibility
165
-
166
- All existing code continues to work without modification:
167
-
168
- ```js
169
- // These all still work exactly as before
170
- const song1 = await odesli.fetch('https://open.spotify.com/track/123');
171
- const song2 = await odesli.fetch('https://open.spotify.com/track/123', 'GB');
172
- const song3 = await odesli.getByParams('spotify', 'song', '123');
173
- const song4 = await odesli.getByParams('spotify', 'song', '123', 'GB');
174
- const song5 = await odesli.getById('SPOTIFY_SONG::123');
175
- const song6 = await odesli.getById('SPOTIFY_SONG::123', 'GB');
176
- ```
177
-
178
- ## 📊 Performance Improvements
179
-
180
- ### Intelligent Caching
181
-
182
- - **Configurable TTL**: 5-minute default cache duration
183
- - **Per-request cache control**: Skip cache for specific requests
184
- - **Cache statistics**: Monitor cache performance
185
-
186
- ### Request Optimization
187
-
188
- - **Custom headers**: Add application-specific headers
189
- - **Configurable timeouts**: Per-request timeout overrides
190
- - **Base URL customization**: Support for different API endpoints
191
-
192
- ### Concurrency Control
193
-
194
- - **Batch processing**: Efficient parallel requests
195
- - **Configurable concurrency**: Control request rate
196
- - **Error resilience**: Graceful handling of failed requests
197
-
198
- ## 🧪 Enhanced Testing & Debugging
199
-
200
- ### Logging Support
201
-
202
- ```js
203
- const odesli = new Odesli({
204
- logger: (message, level) => {
205
- console.log(`[${level.toUpperCase()}] ${message}`);
206
- },
207
- });
208
- ```
209
-
210
- ### Validation Control
211
-
212
- ```js
213
- // Disable validation for performance
214
- const odesli = new Odesli({
215
- validateParams: false,
216
- });
217
- ```
218
-
219
- ## 📈 TypeScript Improvements
220
-
221
- ### Enhanced Type Definitions
222
-
223
- - **Comprehensive options types**: Full type safety for all parameters
224
- - **Union types**: Support for both string and object parameters
225
- - **Detailed return types**: Complete response object definitions
226
-
227
- ## 🎯 Use Cases
228
-
229
- ### Production Applications
230
-
231
- ```js
232
- const odesli = new Odesli({
233
- apiKey: process.env.ODESLI_API_KEY,
234
- maxRetries: 3,
235
- retryDelay: 1000,
236
- timeout: 15000,
237
- validateParams: true,
238
- logger: (message, level) => {
239
- if (level === 'error') {
240
- console.error(`[ODESLI] ${message}`);
241
- }
242
- },
243
- });
244
- ```
245
-
246
- ### Development & Testing
247
-
248
- ```js
249
- const odesli = new Odesli({
250
- cache: false,
251
- validateParams: true,
252
- timeout: 5000,
253
- logger: console.log,
254
- });
255
- ```
256
-
257
- ### High-Volume Processing
258
-
259
- ```js
260
- const odesli = new Odesli({
261
- apiKey: process.env.ODESLI_API_KEY,
262
- maxRetries: 5,
263
- retryDelay: 500,
264
- timeout: 10000,
265
- });
266
-
267
- // Process large batches efficiently
268
- const results = await odesli.fetchBatch(largeUrlArray, {
269
- concurrency: 10,
270
- skipCache: true,
271
- });
272
- ```
273
-
274
- ## 🔮 Future Considerations
275
-
276
- These improvements provide a solid foundation for future enhancements:
277
-
278
- - **Rate limiting**: Built-in rate limit handling
279
- - **Webhook support**: Real-time updates
280
- - **Advanced caching**: Redis/Memcached integration
281
- - **Metrics collection**: Request/response analytics
282
- - **Plugin system**: Extensible functionality
283
-
284
- ## 📝 Migration Guide
285
-
286
- ### For Existing Users
287
-
288
- No migration required! All existing code continues to work unchanged.
289
-
290
- ### For New Features
291
-
292
- Use the new options objects for enhanced functionality:
293
-
294
- ```js
295
- // Old way (still works)
296
- const song = await odesli.fetch(url, 'GB');
297
-
298
- // New way (recommended)
299
- const song = await odesli.fetch(url, {
300
- country: 'GB',
301
- skipCache: false,
302
- timeout: 8000,
303
- });
304
- ```
305
-
306
- ## 🎉 Summary
307
-
308
- The improved Odesli API client now provides:
309
-
310
- - ✅ **Enhanced configuration** with comprehensive options
311
- - ✅ **Better error handling** with validation and retry logic
312
- - ✅ **New utility methods** for common operations
313
- - ✅ **Improved performance** with intelligent caching
314
- - ✅ **Full backward compatibility** with existing code
315
- - ✅ **Enhanced TypeScript support** with complete type definitions
316
- - ✅ **Production-ready features** for enterprise use cases
317
-
318
- These improvements make the Odesli client more robust, flexible, and developer-friendly while maintaining full compatibility with existing implementations.
package/CHANGELOG.md DELETED
@@ -1,246 +0,0 @@
1
- <!-- markdownlint-disable MD024 -->
2
-
3
- # Changelog
4
-
5
- All notable changes to this project will be documented in this file.
6
-
7
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
-
10
- ## [1.3.8] - 2025-01-27
11
-
12
- ### Changed
13
-
14
- - **Dependency Updates**: Updated multiple development dependencies to their latest compatible versions for improved security and performance
15
- - Updated `@types/node` from 24.0.13 to 24.6.2
16
- - Updated `@types/jest` from 30.0.0 (already on latest)
17
- - Updated `eslint-config-prettier` from 10.1.5 to 10.1.8
18
- - Updated `eslint-plugin-import` from 2.28.0 to 2.32.0
19
- - Updated `eslint-plugin-prettier` from 5.5.1 to 5.5.4
20
- - Updated `jest` from 29.5.0 to 30.2.0 (major version update)
21
- - Updated `jsdoc` from 4.0.2 to 4.0.4
22
- - Updated `snyk` from 1.1297.3 to 1.1299.1
23
- - Updated `ts-jest` from 29.1.0 to 29.4.4
24
- - Updated `typescript` from 5.0.0 to 5.9.3
25
-
26
- ### Notes
27
-
28
- - Kept `eslint` at 8.57.1 (ESLint 9 requires configuration migration)
29
- - Kept `node-fetch` at 2.7.0 (v3 is ESM-only, incompatible with current CommonJS setup)
30
- - Kept `eslint-plugin-promise` at 6.6.0 (v7 has peer dependency conflicts with eslint-config-standard)
31
- - All tests passing with 100% test suite coverage
32
- - No security vulnerabilities detected
33
-
34
- ## [1.3.7] - 2025-01-27
35
-
36
- ### Fixed
37
-
38
- - **Enhanced TypeScript Definitions**: Improved type definitions for better IntelliSense and type safety
39
- - **Batch Operations Support**: Added proper types for batch URL fetching with error handling
40
- - **Entity Data Completeness**: Added missing properties to EntityData interface (thumbnailWidth, thumbnailHeight, apiProvider, platforms)
41
- - **Platform Link Enhancement**: Added entityUniqueId property to PlatformLink interface
42
- - **Configuration Options**: Added metrics configuration option to OdesliOptions interface
43
-
44
- ### Added
45
-
46
- - **BatchError Interface**: Proper error typing for batch operations with specific error categories
47
- - **BatchResult Type**: Type-safe return type for batch fetch operations
48
- - **Enhanced Error Types**: Added specific error types (BAD_REQUEST, UNAUTHORIZED, RATE_LIMITED, etc.)
49
-
50
- ## [1.3.6] - 2025-07-12
51
-
52
- ### Changed
53
-
54
- - Version bump for dependency updates and workflow improvements
55
-
56
- ## [1.3.5] - 2025-07-12
57
-
58
- ### Added
59
-
60
- - **Automated Workflows**: Enhanced Dependabot auto-merge workflow with version bumping and tagging
61
- - **Dependency Updates**: Updated development dependencies for security and compatibility
62
-
63
- ### Changed
64
-
65
- - Improved CI/CD pipeline automation
66
- - Enhanced dependency management workflows
67
-
68
- ## [1.3.4] - 2025-06-23
69
-
70
- ### Changed
71
-
72
- - **Code Refactoring**: Removed redundant `fetchBatch` method to improve code maintainability
73
- - **Documentation Updates**: Updated README badges and documentation links
74
-
75
- ### Fixed
76
-
77
- - **Build System**: Fixed build configuration for better cross-platform compatibility
78
- - **Dependencies**: Updated development dependencies for improved security
79
-
80
- ## [1.3.3] - 2025-06-23
81
-
82
- ### Changed
83
-
84
- - Version bump for registry publishing and workflow improvements
85
-
86
- ## [1.3.2] - 2025-06-23
87
-
88
- ### Fixed
89
-
90
- - **Security Vulnerabilities**: Fixed security vulnerabilities in dependencies
91
- - **Test Dependencies**: Added missing `jest-fetch-mock` dependency for proper testing
92
- - **User-Agent Validation**: Relaxed user-agent check in tests for better compatibility
93
- - **Publishing Workflows**: Streamlined publishing workflows for both npm and GitHub Packages
94
-
95
- ### Changed
96
-
97
- - Updated package-lock.json and package.json for security improvements
98
- - Enhanced build and deployment processes
99
-
100
- ## [1.3.1] - 2025-06-23
101
-
102
- ### Changed
103
-
104
- - Version bump for GitHub Packages release and registry configuration
105
-
106
- ## [1.3.0] - 2025-06-23
107
-
108
- ### Fixed
109
-
110
- - Fixed a critical bug where an un-referenced `setInterval` in the `MetricsCollector` would cause Node.js processes to hang and not exit gracefully.
111
-
112
- ### Added
113
-
114
- - The `Odesli` constructor now accepts `{ metrics: false }` as an option to completely disable the metrics collection feature.
115
-
116
- ### Changed
117
-
118
- - **Code Formatting**: Applied Prettier formatting for consistent code style
119
- - **Linting**: Resolved linting and formatting errors for better code quality
120
- - **Metrics Stability**: Improved metrics collector stability and performance
121
-
122
- > **Note**: For a comprehensive overview of all recent API enhancements and features, please see the [API Improvements](./API_IMPROVEMENTS.md) documentation.
123
-
124
- ## [1.2.0] - 2025-06-22
125
-
126
- ### Added
127
-
128
- - **Country Code Validation**: Added strict TypeScript validation for country codes using ISO 3166-1 alpha-2 standard
129
- - **getCountryOptions() Method**: New static method that returns all valid country codes with full country names for UI dropdowns
130
- - **Enhanced TypeScript Support**: Added `CountryCode` union type for strict country code validation
131
- - **Improved Examples**: Updated all examples to demonstrate new country code features and comprehensive usage
132
- - **Comprehensive Testing**: Added extensive tests for country code validation and getCountryOptions method
133
- - **Better Documentation**: Updated README with TypeScript examples and country code usage patterns
134
-
135
- ### Features
136
-
137
- - TypeScript autocomplete now shows only valid country codes
138
- - Full country names available for UI dropdowns via `getCountryOptions()`
139
- - 249 supported countries with ISO 3166-1 alpha-2 codes
140
- - Enhanced error handling for invalid country codes
141
- - Improved batch fetching with country-specific options
142
-
143
- ### Technical Improvements
144
-
145
- - Added comprehensive test coverage for new country code features
146
- - Updated TypeScript definitions with strict country code validation
147
- - Enhanced examples demonstrating all new features
148
- - Improved documentation with practical usage examples
149
-
150
- ## [1.1.2] - 2024-12-18
151
-
152
- ### Fixed
153
-
154
- - Fixed User-Agent format to match expected pattern
155
- - Improved error handling and propagation
156
- - Fixed test failures related to response handling
157
- - **ESLint Compatibility**: Resolved ESLint structuredClone compatibility issue
158
- - **Formatting Issues**: Fixed formatting issues causing CI failure
159
- - **Workflow Configuration**: Updated workflows to use master branch for CI badge
160
-
161
- ### Added
162
-
163
- - **GitHub Packages Support**: Added automated GitHub Packages publishing workflows
164
- - **Enhanced Documentation**: Updated documentation and policy files
165
- - **CI/CD Improvements**: Added comprehensive CI/CD pipeline with automated testing and publishing
166
-
167
- ### Changed
168
-
169
- - **Dependencies**: Updated and reverted dependencies for better compatibility
170
- - **Line Endings**: Added .gitattributes for consistent line endings across platforms
171
- - **Linting**: Fixed lint and formatting issues for CI compliance
172
-
173
- ## [1.1.1] - 2024-12-18
174
-
175
- ### Fixed
176
-
177
- - Fixed linter errors caused by Windows line endings
178
- - Improved code formatting and consistency
179
- - **GitHub Packages Workflow**: Enhanced GitHub Packages workflow with debugging and GITHUB_TOKEN usage
180
- - **Package Configuration**: Fixed package names configuration for different registries
181
- - **Permissions**: Added proper permissions to npm publish job
182
-
183
- ### Added
184
-
185
- - **Manual Trigger Support**: Added manual trigger support to publish workflows
186
- - **Dedicated Tokens**: Implemented dedicated GH_PACKAGES_TOKEN for GitHub Packages publishing
187
-
188
- ### Changed
189
-
190
- - **Workflow Splitting**: Split deployment workflows for npm and GitHub Packages
191
- - **Documentation Links**: Updated API documentation links to correct Odesli API docs
192
-
193
- ## [1.1.0] - 2024-12-18
194
-
195
- ### Added
196
-
197
- - **Unified Fetch API**: Single `fetch()` method that handles both single URLs and arrays of URLs
198
- - **Enhanced Parameter Handling**: Better validation and processing of request parameters
199
- - **Retry Logic**: Configurable retry mechanism with exponential backoff
200
- - **Custom Headers**: Support for custom request headers including User-Agent customization
201
- - **Base URL Customization**: Ability to override the default API base URL
202
- - **Parameter Validation Toggle**: Option to enable/disable parameter validation
203
- - **Logging Support**: Built-in logging with customizable log levels
204
- - **Utility Methods**: Added `detectPlatform()`, `extractId()`, and `getSupportedPlatforms()`
205
- - **Cache Statistics**: Enhanced cache with detailed statistics and hit rate tracking
206
- - **Rate Limiter**: Advanced rate limiting with multiple strategies (token-bucket, leaky-bucket, sliding-window)
207
- - **Metrics Collector**: Comprehensive metrics collection for monitoring and analytics
208
- - **Plugin System**: Extensible plugin architecture with hooks, middleware, and transformers
209
- - **Batch Processing**: Efficient batch fetching with concurrency control and error handling
210
-
211
- ### Changed
212
-
213
- - **Breaking Change**: Replaced individual methods with unified `fetch()` API
214
- - **Enhanced Error Handling**: More detailed error messages and better error propagation
215
- - **Improved TypeScript Support**: Better type definitions and stricter validation
216
- - **Better Documentation**: Comprehensive examples and API documentation
217
-
218
- ### Technical Improvements
219
-
220
- - Added comprehensive test suite with 100% coverage
221
- - Enhanced error handling and validation
222
- - Improved performance with optimized batch processing
223
- - Better memory management and resource cleanup
224
- - Enhanced logging and debugging capabilities
225
-
226
- ## [1.0.0] - 2024-12-17
227
-
228
- ### Added
229
-
230
- - Initial release of odesli.js
231
- - Basic API client for Odesli.co (formerly song.link/album.link)
232
- - Support for fetching song and album links across multiple platforms
233
- - TypeScript definitions
234
- - Basic caching mechanism
235
- - Error handling and validation
236
- - Support for API keys and rate limiting
237
- - Documentation and examples
238
-
239
- ### Features
240
-
241
- - Cross-platform music link fetching
242
- - Support for Spotify, Apple Music, YouTube Music, and more
243
- - Multi-country support
244
- - Optional API key for higher rate limits
245
- - Lightweight and fast performance
246
- - Comprehensive error handling
@@ -1,125 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, religion, or sexual identity
10
- and orientation.
11
-
12
- We pledge to act and interact in ways that contribute to an open, welcoming,
13
- diverse, inclusive, and healthy community.
14
-
15
- ## Our Standards
16
-
17
- Examples of behavior that contributes to a positive environment for our
18
- community include:
19
-
20
- - Demonstrating empathy and kindness toward other people
21
- - Being respectful of differing opinions, viewpoints, and experiences
22
- - Giving and gracefully accepting constructive feedback
23
- - Accepting responsibility and apologizing to those affected by our mistakes,
24
- and learning from the experience
25
- - Focusing on what is best not just for us as individuals, but for the
26
- overall community
27
-
28
- Examples of unacceptable behavior include:
29
-
30
- - The use of sexualized language or imagery, and sexual attention or
31
- advances of any kind
32
- - Trolling, insulting or derogatory comments, and personal or political attacks
33
- - Public or private harassment
34
- - Publishing others' private information, such as a physical or email
35
- address, without their explicit permission
36
- - Other conduct which could reasonably be considered inappropriate in a
37
- professional setting
38
-
39
- ## Enforcement Responsibilities
40
-
41
- Community leaders are responsible for clarifying and enforcing our standards of
42
- acceptable behavior and will take appropriate and fair corrective action in
43
- response to any behavior that they deem inappropriate, threatening, offensive,
44
- or harmful.
45
-
46
- Community leaders have the right and responsibility to remove, edit, or reject
47
- comments, commits, code, wiki edits, issues, and other contributions that are
48
- not aligned to this Code of Conduct, and will communicate reasons for moderation
49
- decisions when appropriate.
50
-
51
- ## Scope
52
-
53
- This Code of Conduct applies within all community spaces, and also applies when
54
- an individual is officially representing the community in public spaces.
55
-
56
- ## Enforcement
57
-
58
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
59
- reported to the community leaders responsible for enforcement at
60
- [INSERT CONTACT METHOD].
61
- All complaints will be reviewed and investigated promptly and fairly.
62
-
63
- All community leaders are obligated to respect the privacy and security of the
64
- reporter of any incident.
65
-
66
- ## Enforcement Guidelines
67
-
68
- Community leaders will follow these Community Impact Guidelines in determining
69
- the consequences for any action they deem in violation of this Code of Conduct:
70
-
71
- ### 1. Correction
72
-
73
- **Community Impact**: Use of inappropriate language or other behavior deemed
74
- unprofessional or unwelcome in the community.
75
-
76
- **Consequence**: A private, written warning from community leaders, providing
77
- clarity around the nature of the violation and an explanation of why the
78
- behavior was inappropriate. A public apology may be requested.
79
-
80
- ### 2. Warning
81
-
82
- **Community Impact**: A violation through a single incident or series
83
- of actions.
84
-
85
- **Consequence**: A warning with consequences for continued behavior. No
86
- interaction with the people involved, including unsolicited interaction with
87
- those enforcing the Code of Conduct, for a specified period of time. This
88
- includes avoiding interactions in community spaces as well as external channels
89
- like social media. Violating these terms may lead to a temporary or
90
- permanent ban.
91
-
92
- ### 3. Temporary Ban
93
-
94
- **Community Impact**: A serious violation of community standards, including
95
- sustained inappropriate behavior.
96
-
97
- **Consequence**: A temporary ban from any sort of interaction or public
98
- communication with the community for a specified period of time. No public or
99
- private interaction with the people involved, including unsolicited interaction
100
- with those enforcing the Code of Conduct, is allowed during this period.
101
- Violating these terms may lead to a permanent ban.
102
-
103
- ### 4. Permanent Ban
104
-
105
- **Community Impact**: Demonstrating a pattern of violation of community
106
- standards, including sustained inappropriate behavior, harassment of an
107
- individual, or aggression toward or disparagement of classes of individuals.
108
-
109
- **Consequence**: A permanent ban from any sort of public interaction within
110
- the community.
111
-
112
- ## Attribution
113
-
114
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
115
- version 2.0, available at
116
- [contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
117
-
118
- Community Impact Guidelines were inspired by [Mozilla's code of conduct
119
- enforcement ladder](https://github.com/mozilla/diversity).
120
-
121
- [homepage]: https://www.contributor-covenant.org
122
-
123
- For answers to common questions about this code of conduct, see the FAQ at
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).