Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

musicbrainz-api

Package Overview
Dependencies
Maintainers
0
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

musicbrainz-api - npm Package Compare versions

Comparing version 0.18.2 to 0.19.0

lib/default.cjs

4

lib/index.d.ts
export * from './coverartarchive-api.js';
export * from './musicbrainz-api.js';
/**
* CommonJS (only) function to load `musicbrainz-api` ESM module
*/
export declare function loadMusicBrainzApi(): Promise<typeof import('musicbrainz-api')>;

10

package.json
{
"name": "musicbrainz-api",
"version": "0.18.2",
"version": "0.19.0",
"description": "MusicBrainz API client for reading and submitting metadata",
"exports": "./lib/index.js",
"exports": {
"import": "./lib/index.js",
"require": "./lib/default.cjs"
},
"types": "lib/index.d.ts",
"files": [
"lib/**/*.js",
"lib/**/*.d.ts"
"lib/**/*.d.ts",
"lib/default.cjs"
],

@@ -11,0 +15,0 @@ "type": "module",

@@ -14,4 +14,6 @@ [![Node.js CI](https://github.com/Borewit/musicbrainz-api/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/musicbrainz-api/actions/workflows/nodejs-ci.yml)

A MusicBrainz-API-client for reading and submitting metadata
A MusicBrainz-API-client for reading and submitting metadata.
<img src="doc/musicbrainz-api-logo.png" width="40%" style="center"></img>
## Features

@@ -28,2 +30,5 @@ - **Access Metadata**: Retrieve detailed metadata from the [MusicBrainz database](https://musicbrainz.org/).

> [!NOTE]
> See also [CommonJS backward compatibility](#commonjs-backward-compatibility)
### Requirements

@@ -71,2 +76,5 @@ - Node.js: Requires [Node.js version 16](https://nodejs.org/en/about/previous-releases) or higher.

> [!NOTE]
> See also [CommonJS backward compatibility](#commonjs-backward-compatibility)
### Configuration Options

@@ -469,1 +477,27 @@

## CommonJS backward compatibility
For legacy CommonJS projects needing to load the `music-metadata` ESM module, you can use the `loadMusicMetadata` function:
```js
const { loadMusicBrainzApi } = require('musicbrainz-api');
(async () => {
// Dynamically loads the ESM module in a CommonJS project
const {MusicBrainzApi} = await loadMusicBrainzApi();
const mbApi = new MusicBrainzApi({
appName: 'my-app',
appVersion: '0.1.0',
appContactInfo: 'user@mail.org',
});
const releaseList = await mbApi.search('release', {query: {barcode: 602537479870}});
for(const release of releaseList.releases) {
console.log(release.title);
}
})();
```
> [!NOTE]
> The `loadMusicMetadata` function is experimental.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc