Skip to content

Commit

Permalink
chore(joint-core): replace rollup buble with rollup babel (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorgewilliams authored Aug 26, 2024
1 parent a69da24 commit ae95768
Show file tree
Hide file tree
Showing 5 changed files with 1,450 additions and 1,109 deletions.
2 changes: 1 addition & 1 deletion packages/joint-core/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
'CDATASection': true
},
'parserOptions': {
'ecmaVersion': 6,
'ecmaVersion': 2022,
'sourceType': 'module'
}
};
14 changes: 8 additions & 6 deletions packages/joint-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@
"./README.md"
],
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.2",
"@microsoft/api-extractor": "7.33.7",
"@rollup/plugin-babel": "^6.0.4",
"@typescript-eslint/eslint-plugin": "5.48.1",
"@typescript-eslint/parser": "5.48.1",
"async": "2.6.1",
Expand All @@ -82,11 +85,11 @@
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-qunit": "3.1.0",
"grunt-contrib-uglify": "4.0.0",
"grunt-contrib-uglify": "4.0.1",
"grunt-contrib-watch": "1.1.0",
"grunt-env": "0.4.4",
"grunt-eslint": "21.0.0",
"grunt-karma": "3.0.1",
"grunt-karma": "4.0.2",
"grunt-mocha-test": "0.13.3",
"grunt-newer": "1.3.0",
"grunt-shell": "3.0.1",
Expand All @@ -95,9 +98,9 @@
"handlebars": "4.7.7",
"jit-grunt": "0.10.0",
"jquery": "~3.7.1",
"karma": "3.1.4",
"karma-chrome-launcher": "2.2.0",
"karma-coverage": "1.1.2",
"karma": "6.4.4",
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.1",
"karma-qunit": "2.1.0",
"karma-sinon": "1.0.5",
"load-grunt-config": "0.19.2",
Expand All @@ -110,7 +113,6 @@
"qunit": "2.8.0",
"requirejs": "2.3.6",
"rollup": "1.20.3",
"rollup-plugin-buble": "0.19.6",
"rollup-plugin-commonjs": "9.2.0",
"rollup-plugin-json": "4.0.0",
"rollup-plugin-node-resolve": "4.0.0",
Expand Down
18 changes: 16 additions & 2 deletions packages/joint-core/rollup.resources.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
import commonjs from 'rollup-plugin-commonjs';
import buble from 'rollup-plugin-buble';
import path from 'path';
import json from 'rollup-plugin-json';
import fs from 'fs';
import resolve from 'rollup-plugin-node-resolve';
import babel from '@rollup/plugin-babel';
const modules = require('./grunt/resources/esm');

let plugins = [
resolve(),
commonjs(),
buble()
babel({
babelHelpers: 'bundled',
exclude: 'node_modules/**',
presets: [
['@babel/preset-env', {
targets: '> 0.5%, last 2 versions, Firefox ESR, not dead',
modules: false,
useBuiltIns: 'usage',
corejs: {
version: 3,
proposals: false
}
}]
],
})
];

let JOINT_FOOTER = 'if (typeof joint !== \'undefined\') { var g = joint.g, V = joint.V, Vectorizer = joint.V; }';
Expand Down
3 changes: 2 additions & 1 deletion packages/joint-core/src/util/utilHelpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@ const equalByTag = (object, other, tag, equalFunc, stack) => {
case stringTag:
return object == `${other}`;
case mapTag:
let convert = mapToArray;
// This use of 'var' is intentional. Don't remove if replacing all instances.
var convert = mapToArray;
// Intentional fallthrough
// eslint-disable-next-line no-fallthrough
case setTag:
Expand Down
Loading

0 comments on commit ae95768

Please sign in to comment.