Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tbo47/dagre-es
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.0.5
Choose a base ref
...
head repository: tbo47/dagre-es
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7.0.6
Choose a head ref
  • 7 commits
  • 60 files changed
  • 3 contributors

Commits on Dec 13, 2022

  1. bump version

    tbo committed Dec 13, 2022
    Copy the full SHA
    b2d3d96 View commit details
  2. bump version

    tbo committed Dec 13, 2022
    Copy the full SHA
    62844ae View commit details

Commits on Dec 14, 2022

  1. style: add a basic eslint linting action

    This eslint configuration was created with `npm init @eslint/config`.
    
    I've set it up to only use ES6 compatible JavaScript, we can increase
    this later if you want to support new JavaScript features.
    aloisklink committed Dec 14, 2022
    Copy the full SHA
    7d3a2fa View commit details
  2. fix: fix bug in setCreateEdgeLabels

    This function was actually overwriting itself, not createEdgeLabels.
    This was caught by eslint!
    
    Fixes: 60d4b25
    aloisklink committed Dec 14, 2022
    Copy the full SHA
    cbccb4f View commit details
  3. style: lint with eslint-plugin-import

    The [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)
    checks for basic ESM import issues.
    aloisklink committed Dec 14, 2022
    Copy the full SHA
    9ea4eae View commit details
  4. fix: add .js or index.js to ESM imports

    In ESM, file extensions are mandatory.
    
    Some bundlers/typescript allow not having file extensions, but
    Node.JS requires them (and `index.js`) for files
    see https://nodejs.org/api/esm.html#mandatory-file-extensions
    
    I've also fixed a bug in `src/dagre/debug.js`, which was importing
    a library that didn't exist (wrong folder).
    aloisklink committed Dec 14, 2022
    Copy the full SHA
    d1475ad View commit details
  5. Merge pull request #12 from aloisklink/fix-esm-imports

    Add a basic `eslint` linter config, and fixes some bugs that it caught
    tbo47 authored Dec 14, 2022
    Copy the full SHA
    46313db View commit details
Showing with 2,038 additions and 712 deletions.
  1. +24 −0 .eslintrc.cjs
  2. +2 −0 .github/workflows/test.yml
  3. +1,857 −561 package-lock.json
  4. +9 −5 package.json
  5. +1 −1 src/dagre-js/arrows.js
  6. +2 −2 src/dagre-js/create-clusters.js
  7. +4 −4 src/dagre-js/create-edge-labels.js
  8. +2 −2 src/dagre-js/create-edge-paths.js
  9. +2 −2 src/dagre-js/create-nodes.js
  10. +5 −5 src/dagre-js/intersect/index.d.ts
  11. +5 −5 src/dagre-js/intersect/index.js
  12. +1 −1 src/dagre-js/intersect/intersect-circle.js
  13. +1 −1 src/dagre-js/intersect/intersect-polygon.js
  14. +1 −1 src/dagre-js/label/add-html-label.js
  15. +3 −3 src/dagre-js/label/add-label.js
  16. +1 −1 src/dagre-js/label/add-svg-label.js
  17. +1 −1 src/dagre-js/label/add-text-label.js
  18. +1 −1 src/dagre-js/position-clusters.js
  19. +1 −1 src/dagre-js/position-edge-labels.js
  20. +1 −1 src/dagre-js/position-nodes.js
  21. +6 −6 src/dagre-js/render.d.ts
  22. +10 −10 src/dagre-js/render.js
  23. +4 −4 src/dagre-js/shapes.js
  24. +1 −1 src/dagre/acyclic.js
  25. +1 −1 src/dagre/add-border-segments.js
  26. +2 −2 src/dagre/debug.js
  27. +2 −2 src/dagre/greedy-fas.js
  28. +4 −4 src/dagre/index.d.ts
  29. +4 −4 src/dagre/index.js
  30. +9 −9 src/dagre/layout.js
  31. +1 −1 src/dagre/nesting-graph.js
  32. +1 −1 src/dagre/normalize.js
  33. +1 −1 src/dagre/order/build-layer-graph.d.ts
  34. +1 −1 src/dagre/order/build-layer-graph.js
  35. +7 −7 src/dagre/order/index.js
  36. +3 −3 src/dagre/order/sort-subgraph.js
  37. +1 −1 src/dagre/order/sort.js
  38. +2 −2 src/dagre/position/bk.js
  39. +2 −2 src/dagre/position/index.js
  40. +1 −1 src/dagre/rank/feasible-tree.d.ts
  41. +2 −2 src/dagre/rank/feasible-tree.js
  42. +3 −3 src/dagre/rank/index.js
  43. +4 −4 src/dagre/rank/network-simplex.js
  44. +1 −1 src/dagre/util.d.ts
  45. +1 −1 src/dagre/util.js
  46. +1 −1 src/graphlib/alg/dijkstra-all.js
  47. +1 −1 src/graphlib/alg/dijkstra.js
  48. +1 −1 src/graphlib/alg/find-cycles.js
  49. +11 −11 src/graphlib/alg/index.d.ts
  50. +11 −11 src/graphlib/alg/index.js
  51. +1 −1 src/graphlib/alg/is-acyclic.js
  52. +1 −1 src/graphlib/alg/postorder.js
  53. +1 −1 src/graphlib/alg/preorder.js
  54. +1 −1 src/graphlib/alg/prim.d.ts
  55. +2 −2 src/graphlib/alg/prim.js
  56. +1 −1 src/graphlib/index.d.ts
  57. +1 −1 src/graphlib/index.js
  58. +1 −1 src/graphlib/json.js
  59. +3 −3 src/index.d.ts
  60. +3 −3 src/index.js
24 changes: 24 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
env: {
browser: true,
es6: true, // todo, increase this es2016 or later to use new Javascript features
node: true,
},
extends: ['eslint:recommended', 'plugin:import/recommended'],
overrides: [],
parserOptions: {
sourceType: 'module',
},
rules: {
// make sure that all files have an extension (required by ESM)
'import/extensions': [
'error',
'always',
{
js: 'always',
jsx: 'never',
mjs: 'always',
},
],
},
};
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -19,5 +19,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci # throws an error if the package-lock.json file is out of sync
- name: Check for linting errors (run `npm run lint:fix` to fix)
run: npm run lint
- name: Check for prettier errors (run `npm run format` to fix)
run: npx prettier --check .
Loading