-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(build)!: use common build process #144
Conversation
6980a9c
to
f5bcf52
Compare
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@Thomaash Are you going to submit PRs for the rest of the libraries to work again with this update? |
I don't have much time at the moment and won't have the next week either so if you could help that would be great. When I submitted the Vis Data PR I had a working copy locally. In theory it should be enough to just rebase it on top of master (or merge) and it should work. I'll push it to GitHub so that if you find the time you can work on it. |
I try to add what you did to all the |
The purpose of the /esnext is to reuse polyfills from the main project. That is to use the polyfills from for example Vis Timeline also in Vis Data and Vis Util. Otherwise the same polyfills would be included multiple times leading to bundle bloat. The tests have to use Babel to polyfill it on the go. There is a register exported by Vis Dev Utils for it ( |
I managed to get an extension on my article's deadline and since I no longer have to rush it in just a few days I dedicated this evening to get this thing working. It wasn't as simple as rebasing after all. |
* feat(build): use common build process visjs/vis-util#144 * test(cypress): update for the new .d.ts structure
* feat(build): use common build process #144 * test(cypress): update for the new .d.ts structure
* feat(build): use common build process #144 * test(cypress): update for the new .d.ts structure
* Implemented option `activatable` for Timeline and Graph2d * Implemented `activatable` support for Network * Renamed option `activatable` to `clickToUse` * Renamed "Link" to "Edge" in manipulation menu * removed mousetrap, added keycharm * Fixed #448: added some styles to prevent conflicts with bootstrap css styles * Fixed clickToUse * Moved validator and ConfigurationSystem to ./lib/shared, and continue with options on error * fixed bounding box bug, added function filter to configuration system * Implemented configurator for Graph2d. Fixed Configurator displaying nothing when `filter: true`. * more examples, more tweaks, small expansion of the validator to check locally for matches. * fixed numerous clustering bugs, added more examples, numerous other bug fixes * fixed alot of bugs, expanded configurator, added more examples, updated docs, updated update interval * fixed little bug in configurator * fixed #892, added case for any format * added stochastic option check to the testing. Fixed few bugs * Fixed #893, #911: the `clickToUse` option of Network, Graph2d, and Network was blocking click events in the web page. * Fixed #897: Timeline option `{snap: null}` did give a validation error * Removed left over console.log statement * proper fix for validator locales * Fixed #964: `Timeline`, `Graph2d`, and `Network` not working on IE9 * - Added getOptionsFromConfigurator method. * added configChange event * added popup to configurator to explain the behaviour * - Improved the positioning and CSS of the configurator and the color picker. * appended history, fixed getPositions, moved color backer back to container from document root * fixes positioning of colorpicker BUT ALSO HAS A BUG not sure but for some reason, once the colorpicker is open, the buttons won't work correctly and the huecircle jumps back. * - Fixed upscaling when the window size increases. - Accepted pull request #1544, thanks @felixhayashi! - Fixed documented bug in #1544. * added clearfix + updated example See almende/vis#1568 (comment) * - Added options to customize the hierarchical layout without the use of physics. added example. Improved handling of options for hierarchical view. * [Timeline] Added HTML tool-tip support (#2498) * Added HTML tooltip support for Timeline * Fixed tooltip position on Firefox * Added Timeline tooltip example * Updated tooltip location to be next to the mouse * Added HTML element to example * Fixed tool-tip surviving after item deleted (#2545) * Added followMouse & overflowMethod to tooltip options (#2544) - Also updated docs and examples for this - Fixed the positioning of the tooltip if groups was enabled - Removed missing parameters from Popup docstring * replacing all ES6 imports with CJS require calls (#3063) * replacing all ES6 imports with CJS require calls resolves #2934 used the following regex to apply the changes in lib: s/import\s+(\w+)\s+from\s+(.*);\s*$/var $1 = require($2).default;/ s/import\s+(\w+)\s+from\s+(.*)\s*$/var $1 = require($2).default;/ * cleaning up inconsistencies * Refactoring and unit testing of Validator module (#3106) * Added unit test for Validator, minimum viable version. * Added test-console to package list * Completed minimum viable unit test for Validator * Added Validator unit test for explicit 'undefined' * lint shared (#3309) * lint shared * Re-introduce semi-colons to () => {} variables in ColorPicker * Removes redundant .eslintrc from graph3d, lints the rest of the code … (#3363) * Removes redundant .eslintrc from graph3d, lints the rest of the code base, and enables valid-jsdoc lint rule * Corrects lint violations * Adds missing @extends/@constructor to jsdoc (#3372) * Adds missing @extends for constructors * Adds names to constructors * Enables "ClassDeclaration" for require-jsdoc lint rule, and adds all missing class-level jsdoc (#3373) * Enable jsdoc-require MethodDefinition (#3382) * Enables require MethodDefinition for require-jsdoc lint rule and corrects 66% of missing Method Definitions * Adds jsdoc for all remaining methods and corrects @class/@constructor documentation * Define values more accurately * Correct bugs that prevent jsdoc generation * Fixed #3395: allow for multiline titles (#3396) (#3395) * Addresses code review comments from PR 3382 (#3398) * Corrects usage of @static jsdoc annotation * Correct unresolvable types * Correct types in jsdoc and remove extraneous @Class & @constructor jsdoc * Remove incorrect @static jsdoc * Adds missing jsdoc for param copyFromGlobals * correct jsdoc in util * Corrects casing on jsdocs * Swaps @inheritdoc to @ignore for constructors where constructor args are documented in the class * Instantiates Errors with `new` * Addresses improperly defined @callback tags. * Split callbacks out to separate jsdoc * Moves constructor jsdocs back to constructor and drop @ignore. * Adjust for-in loops so they can deal with added properties in Array and Object prototypes (#3471) * Added unit test for Array.prototype mangling - first passing version * Enhanced unit test for prototype stressing to catch more illegal for-in loops * Fixed all for-in linting violations * Adding unit tests for lib/shared (#3600) * Adds code coverage report the output of `npm test` and adds detailed html code coverage report using the command `npm run-script test-cov` * Switch over to using functions in lib/ rather than dist/, so that code coverage stats are complete. * Import vis at the top level to keep ItemSet passing * Remove requirement for dist/vis in TimelineItemSet * Adds tests for Popup * Tests and sinon dependency introduced * Code changes to modules to tighten up code * Corrects broken tests and adds more tests to ColorPicker * Adds additional tests to DataSet * Adds tests for uuid * Removes unused functions from util * Adds tests for utils: recursiveDomDelete, isDate, convert and isType * removes redundant code * Adds additional util tests * Address spacing, and unnecessary tests * Correct test description * Adds isDate tests * Adds sanity check assertions to popup destroy tests * use rollup instead of gulp/webpack (#1) * chore: remove no longer needed bower.json * chore: do not use gulp for linting * chore: use individual js files for examples * chore: change from require to import * chore: use vis.min.js for basic examples for testing * feat: use rollup to generate individual libs * chore: remove gulp and its dependencies * chore: add vscode mocha debug config * fix: fix tests * chore: move utils to vis-util repository * add and improve test coverage (#8) * Update vis-data and commit package-lock * Prepare the package for TypeScript * Update dependencies * Fix coverage reports * Fix Mocha never finishing * New package lock (who knows why) * Regenerate package lock If anybody has any advice about merging package locks I'm all ears. * Add coverage to root index.html * Set up ESLint with Prettier for TS files Prettier is not used for JavaScript files at the moment. * Add tsconfig * Install missing deps * Fix ESLint config * Add NodesHandler test Brings the coverage from red/yellow to yellow/green numbers. * chore(build): use Rollup to bundle CSS (#69) * chore(build): bundle CSS using Rollup * chore(package): remove no longer needed deps * chore(dist): update * fix(click-to-use): fix errors and styling (#132) Closes #121. * feat(build): add standalone and peer builds (#85) * feat(build): add standalone and peer builds * chore(dist): update * style: reformat new files * fix(build): update to core-js 3 Also ditches rollup-plugin-babel-minify in favor of directly configuring babel plugin as the former doesn't work with core-js 3. * fix(build): make it actually work without errors * chore(dist): update * chore(package): fix clean script It missed all the new vis-network.* files. Now it deletes them. * fix(build): use folder structure instead of big mess * chore(types): remove useless d.ts file I have no idea why I put it there, it's not imported from anywhere. * fix(build): fix image copying and watch * chore(examples): use standalone build * chore(examples): add standalone/peer build examples * fix(build): get rid of default import from util Every UMD package overwrites the default and breaks everything. This will work as long as no two packages use the same name for one of their exports (seems to be the case right now). * fix(build): don't reexport data and util from peer DataSet, utils etc. can't be reexported because that would cause stack overflow in UMD builds. They all export vis namespace therefore reexporting leads to loading vis to load vis to load vis… * chore(dist): update * fix(build): update d.ts files for recent changes * chore(examples): fix script and style paths * style: reformat * chore(examples): add code examples to basic usage * chore(examples): add new builds examples to the index * chore(examples): add legacy build example * chore(examples): fix URL errors * docs: update how to * docs: fix typo * fix(build): don't capitalize nonconstructor objects * docs: update Gephi and DOT exports * chore(dist): update * chore(build): transpile dependencies This ensures that all dependencies match our browser list. * chore(dist): update * chore(build): don't ignore declarations * chore(dist): update * chore(build): use concat instead of flatMap This greatly increases compatibility as Array.prototype.flatMap is quite new and only recently supported by Node. * chore(build): add styles to files * chore(scripts): clean all generated files * feat(physics): add wind (#334) “Wind”: a physics force that pushes all node in a given direction. * feat(build): use common build process (#526) * feat(build): use common build process #144 * test(cypress): update for the new .d.ts structure * perf: use more named imports and rewrite some CJS to ESM (#818) * perf: use only named imports (mainly) from Vis Util This slims down the standalone build by about 165 kB (due to an error in importing, we had two copies of Vis Util so only about 60 kB is thanks to named exports). * perf: rewrite some more code to ESM + named imports * style: lint JS (#885) * style: reconfigure linting * style: fix linting errors * style: prefer const over let and let over var * style: eslint --fix * style: fix linting errors Co-authored-by: Vis Bot <[email protected]> * style: prohibit trailing spaces (#901) * style: prohibit traling spaces Trailing spaces are invisible to some and annoying to others. Also some editors remove them by default which leads to weird unrelated changes in PRs and then misleading git blame or annoying exchanges with contributors about restoring the spaces. Reformating also changes what git blame reports but with commits like “style: eslint --fix” it's immediately obvious what happened. * style: eslint --fix Co-authored-by: Vis Bot <[email protected]> * style: lint lib (#1059) * style: include lib in linting * style: reformat * style: manual tweaks Co-authored-by: Vis Bot <[email protected]> * fix: purge instanceof Array from the codebase (#1131) Array.isArray works with arrays that came from other contexts like web workers, instanceof Array wouldn't consider such array to be an array even though it is perfectly valid array. * refactor(activator): various changes (#1254) Remove the dependency on Keycharm: All it really did was translate `"esc"` to `event.keyCode === 27` (which is deprecated by the way). We can just use `"key" in event ? event.key === "Escape" : event.keyCode === 27` instead of Keycharm and not relly solely on depracated APIs. Remove the use of `addClassName` and `removeClassName`: These basically polyfill IE9 and it's contemporaries (this is Windows Vista, iOS 4.3 and Android Gingerbread era) which we don't otherwise polyfill so they don't work one way or another. Various other minor refactoring such as prefixing private properties with underscore. * fix(xss): don't use innerHTML to set text (#1242) We had a lot of instances of innerHTML that were simply setting text, in quite a few cases parsing it as HTML was even counter productive as it could theoreticly result in syntax errors and corrupted output (e.g. the output of JSON.stringify definitely shouldn't be parsed as HTML). There is only one occurence of innerHTML left and that is for the node/edge title as the docs clearly state that any string passed will be parsed as HTML. * refactor(shared): prepare shared folder and hammer module for extraction (#1255) * refactor: rework all imports and exports to ESM * refactor(color-picker): inline onTouch from hammerUtil Similarly as with the Activator, it was used only for one very simple thing so there isn't really a need to drag this over to Vis Util. * refactor(hammer): move it into shared Everything from shared will be moved to Vis Util so that it can be shared among all of the projects. The code in shared already depends on Hammer heavily so it needs to be there. Vis Util can export this together with the other shared stuff. * refactor(shared): turn into an encapsulated module This way it will be quite easy to import from Vis Util later on. * refactor(configurator): final refactoring before extraction (#1262) * refactor(configurator): final refactoring before extraction - Exctract hardcoded physics solver and wind code from the configurator into reusable hideOptions function passed in the constructor. - Add TS types explicitly declaring the structure of the input (in other words: formally declare the API of the configurator). * chore: update copyright * refactor(shared): move into src * refactor(shared): integrate into the codebase * fix(shared)!: don't interpret popup as HTML by default BREAKING CHANGE: This fixes potential XSS issues that recless people may unintentionally introduce. Those who sanitize the HTML or have other strategy (e.g. hardcoded HTML) to prevent XSS (or don't care) can pass an element. Co-authored-by: jos <[email protected]> Co-authored-by: Alex de Mulder <[email protected]> Co-authored-by: Alex de Mulder <[email protected]> Co-authored-by: Felix Hayashi <[email protected]> Co-authored-by: Lewis B <[email protected]> Co-authored-by: Pat Sissons <[email protected]> Co-authored-by: wimrijnders <[email protected]> Co-authored-by: macleodbroad-wf <[email protected]> Co-authored-by: michel404 <[email protected]> Co-authored-by: Alexander Wunschik <[email protected]> Co-authored-by: Alexander Wunschik <[email protected]> Co-authored-by: ylarom <[email protected]> Co-authored-by: Vis Bot <[email protected]>
BREAKING CHANGE: The old bundles are no longer present in the package. It has to be replaced by
import * as util from 'vis-util/esnext';
. I'll do that in all of our projects so don't bother updating to this, it most likely won't work anyway.The build process from visjs/vis-dev-utils#10 is finally being deployed 🎉.
I also increased the timeout of some tests because they kept failing solely due to not having enough of time to finish.