Skip to content

Commit 8eba845

Browse files
authored
Merge branch 'master' into manual-ranking
2 parents c866cda + ccbb66e commit 8eba845

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+13498
-21677
lines changed

.eslintrc.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
{
2+
"extends": "eslint:recommended",
23
"env": {
34
"browser": true,
4-
"node": true,
5-
"mocha": true
5+
"es6": true,
6+
"mocha": true,
7+
"node": true
8+
},
9+
"parserOptions": {
10+
"ecmaVersion": "latest",
11+
"sourceType": "module",
12+
"allowImportExportEverywhere": true
613
},
7-
"extends": "eslint:recommended",
814
"rules": {
915
"indent": [ "error", 2 ],
1016
"linebreak-style": [ "error", "unix" ],
17+
"no-prototype-builtins": 0,
1118
"semi": [ "error", "always" ]
1219
}
1320
}

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Status
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
node-version: [18.x]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: browser-actions/setup-chrome@latest
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
cache-dependency-path: package-lock.json
26+
27+
- name: Install dependencies
28+
run: |
29+
npm install
30+
sudo apt-get install graphviz xvfb
31+
32+
- name: Lint
33+
run: |
34+
make lint
35+
36+
- name: Test
37+
run: |
38+
KARMA_OPTS="--browsers Chrome" xvfb-run --auto-servernum make -e test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/
22
node_modules/
33
tmp/
4+
/.nyc_output

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

Makefile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
MOD = dagre
22

33
NPM = npm
4+
NYC = nyc
45
BROWSERIFY = ./node_modules/browserify/bin/cmd.js
5-
ISTANBUL = ./node_modules/istanbul/lib/cli.js
66
JSHINT = ./node_modules/jshint/bin/jshint
77
ESLINT = ./node_modules/eslint/bin/eslint.js
88
KARMA = ./node_modules/karma/bin/karma
99
MOCHA = ./node_modules/mocha/bin/_mocha
1010
UGLIFY = ./node_modules/uglify-js/bin/uglifyjs
1111

12-
ISTANBUL_OPTS = --dir $(COVERAGE_DIR) --report html
1312
JSHINT_OPTS = --reporter node_modules/jshint-stylish/index.js
1413
MOCHA_OPTS = -R dot
1514

1615
BUILD_DIR = build
17-
COVERAGE_DIR = $(BUILD_DIR)/cov
16+
COVERAGE_DIR = ./.nyc_output
1817
DIST_DIR = dist
1918

2019
SRC_FILES = index.js lib/version.js $(shell find lib -type f -name '*.js')
2120
TEST_FILES = $(shell find test -type f -name '*.js' | grep -v 'bundle-test.js')
22-
BUILD_FILES = $(addprefix $(BUILD_DIR)/, \
23-
$(MOD).js $(MOD).min.js \
24-
$(MOD).core.js $(MOD).core.min.js)
21+
BUILD_FILES = $(addprefix $(BUILD_DIR)/, $(MOD).js $(MOD).min.js)
2522

2623
DIRS = $(BUILD_DIR)
2724

@@ -41,11 +38,10 @@ $(DIRS):
4138
test: unit-test browser-test
4239

4340
unit-test: $(SRC_FILES) $(TEST_FILES) node_modules | $(BUILD_DIR)
44-
@$(ISTANBUL) cover $(ISTANBUL_OPTS) $(MOCHA) --dir $(COVERAGE_DIR) -- $(MOCHA_OPTS) $(TEST_FILES) || $(MOCHA) $(MOCHA_OPTS) $(TEST_FILES)
41+
@$(NYC) $(MOCHA) --dir $(COVERAGE_DIR) -- $(MOCHA_OPTS) $(TEST_FILES) || $(MOCHA) $(MOCHA_OPTS) $(TEST_FILES)
4542

46-
browser-test: $(BUILD_DIR)/$(MOD).js $(BUILD_DIR)/$(MOD).core.js
43+
browser-test: $(BUILD_DIR)/$(MOD).js
4744
$(KARMA) start --single-run $(KARMA_OPTS)
48-
$(KARMA) start karma.core.conf.js --single-run $(KARMA_OPTS)
4945

5046
bower.json: package.json src/release/make-bower.json.js
5147
@src/release/make-bower.json.js > $@
@@ -60,12 +56,6 @@ $(BUILD_DIR)/$(MOD).js: index.js $(SRC_FILES) | unit-test
6056
$(BUILD_DIR)/$(MOD).min.js: $(BUILD_DIR)/$(MOD).js
6157
@$(UGLIFY) $< --comments '@license' > $@
6258

63-
$(BUILD_DIR)/$(MOD).core.js: index.js $(SRC_FILES) | unit-test
64-
@$(BROWSERIFY) $< > $@ --no-bundle-external -s dagre
65-
66-
$(BUILD_DIR)/$(MOD).core.min.js: $(BUILD_DIR)/$(MOD).core.js
67-
@$(UGLIFY) $< --comments '@license' > $@
68-
6959
dist: $(BUILD_FILES) | bower.json test
7060
@rm -rf $@
7161
@mkdir -p $@

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# dagre - Graph layout for JavaScript
22

3-
[![Build Status](https://secure.travis-ci.org/dagrejs/dagre.svg?branch=master)](http://travis-ci.org/dagrejs/dagre)
3+
[![Build Status](https://github.com/dagrejs/dagre/workflows/Build%20Status/badge.svg?branch=master)](https://github.com/dagrejs/dagre/actions?query=workflow%3A%22Build+Status%22)
4+
[![npm](https://img.shields.io/npm/v/@dagrejs/dagre.svg)](https://www.npmjs.com/package/@dagrejs/dagre)
45

5-
Dagre is a JavaScript library that makes it easy to lay out directed graphs on
6-
the client-side.
76

8-
For more details, including examples and configuration options, please see our
9-
[wiki](https://github.com/dagrejs/dagre/wiki).
7+
Dagre is a JavaScript library that makes it easy to lay out directed graphs on the client-side.
8+
9+
For more details, including examples and configuration options, please see our [wiki](https://github.com/dagrejs/dagre/wiki).
10+
11+
There are 2 versions on NPM, but only [the one in the DagreJs org](https://www.npmjs.com/package/@dagrejs/dagre) is receiving updates right now.
1012

1113
## License
1214

13-
dagre is licensed under the terms of the MIT License. See the LICENSE file
14-
for details.
15+
dagre is licensed under the terms of the MIT License. See the LICENSE file for details.

bower.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dagre",
3-
"version": "0.8.4",
3+
"version": "1.1.4",
44
"main": [
55
"dist/dagre.core.js"
66
],
@@ -20,7 +20,6 @@
2020
"test/**"
2121
],
2222
"dependencies": {
23-
"graphlib": "^2.1.7",
24-
"lodash": "^4.17.4"
23+
"@dagrejs/graphlib": "2.2.4"
2524
}
2625
}

0 commit comments

Comments
 (0)