Skip to content

DOM instantiation fails #243

@Martii

Description

@Martii

Thanks for having this project available. :)

On to business...In the ./node_modules/diff/dist/diff.js there is some code of:

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
  (global = global || self, factory(global.Diff = {}));
}(this, function (exports) { 'use strict';

This redefines the Object reference to be Diff instead of JsDiff with the snippet of global.Diff = {} for DOM usage as detailed in the current README.md under "Basic example in a web page".

Was this intended as one of the breaking changes with your semver major switch? e.g. are you wanting to change the DOCS to match the npmjs.com package name instead of the GitHub repo name?

Solutions I can think of are:

  1. Fix the build system (which is currently beyond my expertise at the moment since I've never done this particular one)
  2. Fix the README.md to this new norm. (I can PR this if needed/wanted but will also do the node identifiers for symmetry)
  3. Something else?

... e.g. What was intended?

Thanks for the look.

Affected versions:

  • diff@4.0.0
  • diff@4.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions