deps: replace inherits with inherits-browser

This increase the safety of our build; external consumers
do no longer need to account for the `browser` field to
bundle bpmn-js (or otherwise bundle a Node shim, unintentionally).
This commit is contained in:
Nico Rehwaldt 2022-04-06 21:38:27 +02:00 committed by fake-join[bot]
parent e02fd6138d
commit 7478388070
62 changed files with 66 additions and 68 deletions

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import Ids from 'ids';

View File

@ -25,7 +25,7 @@ import {
import Diagram from 'diagram-js';
import BpmnModdle from 'bpmn-moddle';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
importBpmnDiagram

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import BaseModeler from './BaseModeler';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import Viewer from './Viewer';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CoreModule from './core';
import TranslateModule from 'diagram-js/lib/i18n/translate';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
isObject,

View File

@ -1,6 +1,6 @@
import AutoResize from 'diagram-js/lib/features/auto-resize/AutoResize';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import { is } from '../../util/ModelUtil';

View File

@ -1,6 +1,6 @@
import { is } from '../../util/ModelUtil';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import { forEach } from 'min-dash';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
import { is } from '../../util/ModelUtil';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import EditorActions from 'diagram-js/lib/features/editor-actions/EditorActions';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import KeyboardBindings from 'diagram-js/lib/features/keyboard/KeyboardBindings';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
assign

View File

@ -3,7 +3,7 @@ import {
forEach
} from 'min-dash';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
remove as collectionRemove,

View File

@ -4,7 +4,7 @@ import {
isObject
} from 'min-dash';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
getBusinessObject,

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import BaseModeling from 'diagram-js/lib/features/modeling/Modeling';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
getOrientation,

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import { is } from '../../../util/ModelUtil';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import { is } from '../../../util/ModelUtil';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import { is } from '../../../util/ModelUtil';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
assign,

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -2,7 +2,7 @@ import {
assign
} from 'min-dash';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
is,

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import { is } from '../../../util/ModelUtil';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -4,7 +4,7 @@ import {
matchPattern
} from 'min-dash';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import { forEach } from 'min-dash';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
find,

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,5 +1,5 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import OrderingProvider from 'diagram-js/lib/features/ordering/OrderingProvider';

View File

@ -1,6 +1,6 @@
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import cssEscape from 'css.escape';

View File

@ -5,7 +5,7 @@ import {
some
} from 'min-dash';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
is,

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import CreateMoveSnapping from 'diagram-js/lib/features/snapping/CreateMoveSnapping';

7
package-lock.json generated
View File

@ -5997,6 +5997,11 @@
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"inherits-browser": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/inherits-browser/-/inherits-browser-0.0.1.tgz",
"integrity": "sha512-kaDA3DkCdCpvrKIo/1T/3yVn+qpFUHLjYtSHmTYewb+QfjfaQy6FGQ7LwBu7st0tG9UvYad/XAlqQmdIh6CICw=="
},
"ini": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
@ -6627,7 +6632,7 @@
},
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
},

View File

@ -103,7 +103,7 @@
"diagram-js": "^8.3.0",
"diagram-js-direct-editing": "^1.6.3",
"ids": "^1.0.0",
"inherits": "^2.0.4",
"inherits-browser": "0.0.1",
"min-dash": "^3.5.2",
"min-dom": "^3.2.0",
"object-refs": "^0.3.0",

View File

@ -97,13 +97,7 @@ function pgl(plugins=[], env='production') {
replace({
'process.env.NODE_ENV': JSON.stringify(env)
}),
nodeResolve({
mainFields: [
'browser',
'module',
'main'
]
}),
nodeResolve(),
commonjs(),
json(),
...plugins

View File

@ -83,7 +83,6 @@ module.exports = function(karma) {
resolve: {
mainFields: [
'dev:module',
'browser',
'module',
'main'
],

View File

@ -2,7 +2,7 @@ import {
assign
} from 'min-dash';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import BpmnElementFactory from 'lib/features/modeling/ElementFactory';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import BaseRenderer from 'diagram-js/lib/draw/BaseRenderer';

View File

@ -1,6 +1,6 @@
import { forEach } from 'min-dash';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import RuleProvider from 'diagram-js/lib/features/rules/RuleProvider';

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
is as isBpmn

View File

@ -6,7 +6,7 @@ import ViewerDefaultExport from '../../';
import Viewer from 'lib/Viewer';
import inherits from 'inherits';
import inherits from 'inherits-browser';
import {
createViewer

View File

@ -4,7 +4,7 @@ import {
getOrientation
} from 'diagram-js/lib/layout/LayoutUtil';
import inherits from 'inherits';
import inherits from 'inherits-browser';
export default function LoggingCroppingConnectionDocking(injector) {

View File

@ -1,4 +1,4 @@
import inherits from 'inherits';
import inherits from 'inherits-browser';
import RuleProvider from 'diagram-js/lib/features/rules/RuleProvider';