Skip to content

Releases: mscgenjs/mscgenjs-core

v4.0.5

13 Feb 20:45
Compare
Choose a tag to compare
  • build(npm): ⬆️ @types/jest, @types/node, dependency-cruiser, tslint, typescript, webpack, webpack-cli
  • bugfix(legal): happy 2020
  • doc(*): add a vector variant of the dependency graph
  • doc(*): tweak display dependency graph display

v4.0.1

26 Aug 18:47
Compare
Choose a tag to compare
  • build(npm): ⬆️ @types/jest, @types/node, dependency-cruiser, jest, tslint, upem, webpack, webpack-cli

v4.0.0

28 Jul 12:07
Compare
Choose a tag to compare
  • de-support node 6 & low usage versions 7, 9 and 11 (BREAKING CHANGE)
  • ⬆️ @types/node, dependency-cruiser, upem, webpack, webpack-cli

v3.0.3

25 May 17:12
Compare
Choose a tag to compare
  • build(npm): explain why we keep ts-jest pinned for now
  • build(npm): ⬆️ webpack, webpack-cli and a bunch of other devDependencies (pushed this version as webpack/ webpack-cli produced a different bundle with the latest update)

v3.0.2

25 Jan 21:15
Compare
Choose a tag to compare
  • ci(npm): auto-generate internal structure doc on version bump
  • build(npm): ⬆️ webpack, webpack-cli, typescript, ts-loader, tslint, jsdom, jest, @types/jest, dependency-cruiser

v3.0.1

31 Dec 11:46
Compare
Choose a tag to compare
  • build(npm): ⬆️ webpack, ts-loader, typescript, @types/node, @types/jest, tslint, dependency-cruiser, jsdom, rpm-run-all
  • πŸ‘· small tweaks

v3.0.0

17 Nov 20:22
Compare
Choose a tag to compare

What's changed & new?

  • πŸ₯ support for ES modules, so you can rollpack, webup and shake trees to your heart's content
  • modernized tool chain, that's easier to get into and (far) easier to work with:
    • πŸ‘· straight webpack & npm scripts
    • πŸ‘· more stuff automated (a.o. version bumping, mirror-pushing)
    • πŸ”§ the codebase is now in typescript
    • πŸ” mscgenjs-core now uses jest for testing
  • ⬆️ latest versions of all dependencies & development dependencies
  • πŸ”§ various refactorings that should make it easier to hack on mscgenjs-core and add some features.

If you're a user of the mscgenjs atom package, the online interpreter or the cli: you have been using version 3 of mscgenjs for some months already.

Breaking change: internal interfaces

Although the external interface (mscgenjs = require('mscgenjs') + accompanying method signatures) have remained the same from 2.0.0 -> 3.0.0, some of the internal interfaces have moved to a new spot:

Impact

  • None for typical use.
  • Low if you were using modules directly from the distribution instead of the root module.

Migrating

  • If you're using modules directly from the distribution instead of the root module:
    • try to use the root module instead and/ or ...
    • if that fails: the individual modules have just moved from src/yadda to dist/cjs/yadda, so just updating that should get you sorted:
      before:
var xuParser = require('mscgenjs/src/parse/xuparser');
var lAST = xuParser.parse('msc { a;b; a=> b [label="hello"];}');
// do nice things with the AST

after

var xuParser = require('mscgenjs/dist/cjs/parse/xuparser');
var lAST = xuParser.parse('msc { a;b; a=> b [label="hello"];}');
// do nice things with the AST
  • If you're using AMD/ requirejs and internal modules
    • try to use the root module instead and/ or ...
    • migrate to something that can handle either commonjs or ES modules and then use the strategy mentioned above.

v2.0.0

27 May 12:47
Compare
Choose a tag to compare

A major release for the first time in 2.5 years. The major 'breaking change' for this release is that mscgenjs doesn't support running or building on node 4 anymore. This version also gets rid of some deprecated interfaces and simplifies one function in the external interface. More information below.

  • πŸ”§ External API change: translateMsc doesn't take a callback anymore, but is properly sync now.
  • πŸ”§ moves all sources under src and remove/ rename some deprecated internal interfaces -> if you depended on mscgenjs' internal modules (which you shouldn't) you got to migrate - see below for more information.
  • πŸ₯ adds a json schema for the AST so it's easier to guarantee correctness
  • πŸ”§ Various refactoring to ease readability and maintenance.
  • πŸ‘ž de-support node 4
  • πŸ” mscgenjs is now using jest for test automation. Mocha was doing fine (and is in fact (a lot!) faster), but jest has some features that save time in other aspects: snapshot testing (which mscgenjs was using anyway, but hand rolled - eases maintenance) and automatically testing stuff that has changed (so no need to muck around with describe.only and it.only's anymore ...).

Breaking changes

translateMsc signature from async(y) to sync

Impact: none to medium

Only applicable if you were using the translateMsc function in the first place.
Migration is straightforward (see below) but has to be done if you were using it.

Rationale

The translateMsc was never asynchronous in nature in the first place, so the
signature with the callback just added unnecessary hassle, while offering no
benefits - so it got killed.

Migration path:

where you did that thing with a callback before ...

const mscgenjs = require("mscgenjs");
  let lResult = mscgenjs.translateMsc(
        "Mac=>Beth: shall I compare thee to a Summer's day?;",
        { inputType: "msgenny", outputType: "mscgen" },
        function(pError, pResult) {
            if (pError) {
               console.error(pError);
           }
           console.log(pResult);
        }
  );

You can now simply use a try/ catch:

const mscgenjs = require("mscgenjs");
try {
  let lResult = mscgenjs.translateMsc(
        "Mac=>Beth: shall I compare thee to a Summer's day?;",
        { inputType: "msgenny", outputType: "mscgen" }
  );
  console.log(lResult);
} catch (pError) {
  console.error(pError);
}

node 4 de-support

Impact: low

Migration to a higher version is usually a doddle. The number of people still on node 4 should be super low.

Rationale

Node 4 is not supported anymore by the Node.js foundation

Migration path

Upgrade to a more recent version of node. If you (really) can't there's still version 1 of mscgenjs. Note that mscgenjs might still run & build on node 4 - I just don't support it anymore

source re-organization

Impact: very low

... Unless you were using internal mscgenjs modules to get things done, in which case you had to

Rationale

It makes maintaining mscgenjs-core more straightforward.

Migration path

  • use the external, documented API (see the readme for a howto) or
  • If you can't (yet): sources got moved into src, so where you used something like mscgenjs/render/graphics/renderast before, you would now use mscgenjs/src/render/graphics/renderast

remove the deprecated indexAMD

Impact: very low

Rationale

It was already deprecated

Migration path

Instead use the regular index - it has the same functions & function signatures.

internal API: removed renderAST from the graphics renderer

Impact: non-existent to very low

Only some impact if you were using internal mscgenjs modules directly.

Rationale

Simplify the internal interfaces for easier maintenance.

Migration paths:

  • use the external, documented API (see the readme for a howto) or
  • use the new render function which has the same functionality

internal API: renamed renderASTNew to render

Impact: non-existent to very low

Only some impact if you were using internal mscgenjs modules directly.

Rationale

Simplify the internal interfaces for easier maintenance.

Migration paths:

  • use the external, documented API (see the readme for a howto) or
  • replace renderASTNew with render - which is a function with the same signature and internal working.

v1.13.0-beta-1

02 Feb 11:33
Compare
Choose a tag to compare
v1.13.0-beta-1 Pre-release
Pre-release
  • 🐣 add typescript type definitions

1.12.9

05 Jan 20:33
Compare
Choose a tag to compare
  • Implements a workaround for an issue in webpack 2+ that prevented mscgenjs from being used in webpack bundles (#46)
  • ⬆️ dependency-cruiser, eslint, js-makedepend, mocha, npm-check-updates