Skip to content

Releases: martijnversluis/ChordSheetJS

v4.1.0

24 Feb 22:21
Compare
Choose a tag to compare

Changes

Document Song.paragraphs as Array (#229)
Add Metadata#get: reads a metadata value by key (#228)
Ignore more files from NPM package (#230)
Allow metadata array item lookup with negative index (#233)
Allow chords without spacing in between (#261)
Allow special characters in tag values (#262)
Allow special characters in chords, eg sharp sign (#263)

Thanks to @Glidias for reporting the bugs

Check the full diff here

v4.0.0

02 Jan 16:04
Compare
Choose a tag to compare

New features

  • A chord sheet parser (UltimateGuitarParser) was added to parse chord sheets from Ultimate Guitar while supporting directives like [Verse 1], [Chorus] and [Bridge]. Thanks to @ftes for the idea and the initial implementation.

API changes

  • The ChordProParser now uses PegJS to parse the sheet. Only one thing should be changed to the external API: comments are now also returned in the parsed song. If a line in the chord sheet contains a comment, it will be included in the items property of the Line object as a Comment object. The content property of the Comment object contains the comment text.
    Changing to PegJS hugely simplifies the parser and paves the way for supporting features like #46 (using metadata inside the chord sheet).

  • Song metadata is now a Metadata object instead of a plain object. Accessing metadata still works the same.

Deprecations

  • Song#metaData is now deprecated, it has been renamed to metadata (note the lower "d")

Development changes

  • The ESLint configuration and packages were outdated due to CodeClimate not supporting the latest ESLint. I moved the ESLint step from CodeClimate to Travis, and was able to update packages, configuration and ensured the code abided to the latest rules.

  • legacy files like .hound.yml and .jshintrc were removed

  • .eslintrc.json was renamed to .eslintrc

  • Travis does not build for NodeJS 11 any more

Documentation

  • the ChordPro.org website changed their URL structure, so all deeplinks to chordpro.org have been changed to their new counterpart.

v3.1.0

15 Nov 13:52
Compare
Choose a tag to compare

Development dependency updates

  • bumps jest to 26.6.3
  • bumps @babel/plugin-transform-runtime to 7.12.1
  • bumps @babel/cli to 7.12.1
  • bumps @babel/core to 7.12.3
  • bumps @babel/preset-env to 7.12.1
  • bumps lodash to 4.17.19

Documentation

ChordSheetParser was missing from the API docs due to a chord hand export default class ChordSheetParser, it has now been added.

v3.0.0

13 Jun 21:14
Compare
Choose a tag to compare

Breaking changes

Drops support for NodeJS < 10

Runtime dependency updates

  • bumps handlebars to 4.7.6

Development dependency updates

  • bumps jsdoc-to-markdown to 6.0.1
  • bumps mocha to 8.0.1

Code changes

Adds required prototype property whitelisting for Handlebars templates, see handlebars-lang/handlebars.js#1633

Documentation

Favour import notification over require()

Misc

Switched to Yarn

Extended directive support

28 Mar 08:55
Compare
Choose a tag to compare

This release multiple additions to the directive support:

Wrap paragraphs in tags

Use paragraph type in html formatters

This changes the HTML formatters to render per paragraph. It adds a CSS
class when the paragraph type can be determined from usage of
{start_of_verse}, {end_of_verse}, {start_of_chorus} or {end_of_chorus}.

Add support for {meta: key value} directive format

See: https://www.chordpro.org/chordpro/Directives-meta.html

Add support for more metadata directives

When using the ChordProParser, all official meta data directives are parsed and accessible as properties on the parsed song. For example:

const chordSheet = `
{title: Let it be}
{artist: The Beatles}

Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be
[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C]`.substring(1);

const parser = new ChordSheetJS.ChordProParser();
const song = parser.parse(chordSheet);

console.log(song.title);  // Prints "Let it be"
console.log(song.artist); // Prints "The Beatles"

Support is added for:

  • artist
  • composer
  • lyricist
  • copyright
  • album
  • year
  • key
  • time
  • tempo
  • duration
  • capo

See: https://www.chordpro.org/chordpro/ChordPro-Directives.html#meta-data-directives

Allow multiple values for meta data directives

For example, for a chord sheet:

{composer: John}
{composer: Jane}

song.composer will return ['John', 'Jane']

Correctly handle custom meta data

All meta data directives with a name starting with x_ are stored in
song.metaData

See https://www.chordpro.org/chordpro/ChordPro-Directives.html#custom-extensions.

2.8.1

27 Mar 13:47
Compare
Choose a tag to compare
v2.8.1

2.8.1

Mark verse and chorus

27 Mar 13:45
Compare
Choose a tag to compare

This release is a preparation for #17 (grouping the lines of a paragraph in a tag and adding the paragraph type, such as verse, chorus etc., as a CSS class). It makes sure the paragraph type is recognised and added as type property on Lines and Paragraphs. Currently the tags start_of_chorus (soc), end_of_chorus (eoc), start_of_verse and end_of_verse are used to determine the paragraph type.

Fix automatic deployment

27 Mar 13:45
Compare
Choose a tag to compare

Fix automatic deployment

Ensure automatic publish

27 Mar 13:44
Compare
Choose a tag to compare

Ensure automatic publish to NPM

Simplify formatters by using templates

27 Mar 13:43
Compare
Choose a tag to compare

This release changes the HTML formatters to use a HandleBars template instead of JS logic.