ngx-vis 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md ADDED
@@ -0,0 +1,170 @@
1
+ # ngx-vis — Claude Code Context
2
+
3
+ ## Project overview
4
+
5
+ Angular library (Angular 21) wrapping [vis.js](https://visjs.org/) network and timeline components. Published via **ng-packagr**. Contains a standalone demo app in `demo/`.
6
+
7
+ - **Library source**: `components/` + entry point `ngx-vis.ts`
8
+ - **Demo app**: `demo/` (standalone Angular app, separate `package.json`)
9
+ - **Built output**: `dist/` (ng-packagr), `docs/` (GitHub Pages build)
10
+ - **Tests**: Jasmine unit tests in `components/**/*.spec.ts`, run via Angular CLI karma builder
11
+
12
+ ---
13
+
14
+ ## Key versions
15
+
16
+ | Package | Version |
17
+ | --- | --- |
18
+ | Angular | ^21.2.0 |
19
+ | TypeScript | ~5.9.0 (ng-packagr 21 requires >=5.9) |
20
+ | zone.js | ~0.16.0 |
21
+ | rxjs | ~7.8.0 |
22
+ | ng-packagr | ^21.2.0 |
23
+ | Node.js | >=20.11 |
24
+
25
+ ---
26
+
27
+ ## Repository structure
28
+
29
+ ```text
30
+ ngx-vis/
31
+ ├── components/
32
+ │ ├── network/
33
+ │ │ ├── vis-network.directive.ts
34
+ │ │ ├── vis-network.directive.spec.ts
35
+ │ │ ├── vis-network.service.ts
36
+ │ │ └── vis-network.service.spec.ts
37
+ │ └── timeline/
38
+ │ ├── vis-timeline.directive.ts
39
+ │ ├── vis-timeline.service.ts
40
+ │ └── vis-timeline.service.spec.ts
41
+ ├── demo/ # standalone Angular app (own package.json)
42
+ │ ├── angular.json
43
+ │ ├── package.json
44
+ │ ├── tsconfig.json # moduleResolution: bundler
45
+ │ └── src/
46
+ │ ├── main.ts # bootstrapApplication (standalone, no AppModule)
47
+ │ └── app/
48
+ │ ├── app.component.ts # imports: [RouterOutlet, RouterLink]
49
+ │ ├── app.routes.ts # route definitions
50
+ │ ├── network/network-example.component.ts # imports: [NgIf, VisModule]
51
+ │ └── timeline/timeline-example.component.ts # imports: [VisModule]
52
+ ├── .config/ # legacy webpack configs (not used for main builds)
53
+ ├── angular.json # root-level: library test target only
54
+ ├── karma.conf.js # sets CHROME_BIN via puppeteer, coverage reporter
55
+ ├── ng-package.json
56
+ ├── ngx-vis.ts # library entry: exports + VisModule NgModule
57
+ ├── tsconfig.json # root: target ES2022, module commonjs (for webpack compat)
58
+ ├── tsconfig.publish.json # ng-packagr compile: module ES2022, target ES2022
59
+ ├── tsconfig.spec.json # test compile: extends root, adds importHelpers, bundler resolution
60
+ └── package.json
61
+ ```
62
+
63
+ ---
64
+
65
+ ## NPM scripts
66
+
67
+ | Script | What it does |
68
+ | --- | --- |
69
+ | `npm run build` | Build library via ng-packagr → `dist/` |
70
+ | `npm test` | Run unit tests (ChromeHeadless via puppeteer) with coverage |
71
+ | `npm run test:watch` | Same but keeps watching |
72
+ | `npm run flow.build:demo` | Pack library, install in demo, `ng build` demo |
73
+ | `npm run build:docs` | Clean `docs/`, build GitHub Pages output |
74
+ | `npm run flow.build:github-pages` | Pack library → install in demo → `ng build --base-href=/ngx-vis/ --output-path=../docs` |
75
+ | `npm run clean` | Remove build artefacts |
76
+ | `npm run flow.lint` | ESLint only (tslint removed) |
77
+
78
+ ---
79
+
80
+ ## Architecture decisions
81
+
82
+ ### Library: standalone directives + VisModule
83
+
84
+ Angular 19+ makes directives **standalone by default**. `VisNetworkDirective` and `VisTimelineDirective` are standalone. `VisModule` is kept as a backward-compatible convenience NgModule that **imports** (not declares) them:
85
+
86
+ ```typescript
87
+ @NgModule({
88
+ imports: [CommonModule, VisNetworkDirective, VisTimelineDirective],
89
+ exports: [VisNetworkDirective, VisTimelineDirective],
90
+ providers: [VisNetworkService, VisTimelineService],
91
+ })
92
+ export class VisModule {}
93
+ ```
94
+
95
+ Consumer components can either `import: [VisModule]` (NgModule style) or import the directives directly.
96
+
97
+ ### Demo: fully standalone (no AppModule)
98
+
99
+ `demo/src/main.ts` uses `bootstrapApplication`. There is no `AppModule` or `AppRoutingModule`. Routes live in `demo/src/app/app.routes.ts`. Each component has its own `imports` array.
100
+
101
+ ### Demo builder: `application` (esbuild)
102
+
103
+ `demo/angular.json` uses `@angular-devkit/build-angular:application` (required from Angular 20+; the old `browser` builder was removed). Key rename: `main` → `browser` in options. Dev server uses `buildTarget` instead of `browserTarget`.
104
+
105
+ ### Build budgets (demo)
106
+
107
+ Raised to `1.5mb` warning / `3mb` error because vis.js ships only CJS modules and cannot be tree-shaken, resulting in a larger-than-default initial bundle.
108
+
109
+ ---
110
+
111
+ ## Testing
112
+
113
+ **Always write unit tests** when implementing new features or fixing bugs. Every change to a service or directive must be accompanied by a corresponding spec file update or addition.
114
+
115
+ Tests are in `components/**/*.spec.ts`. They are **pure unit tests** — no `TestBed`, services and directives are instantiated directly. `VisTimelineService` receives an NgZone mock. Directives are tested by instantiating them with a mock `ElementRef` and a `jasmine.createSpyObj` for the service dependency.
116
+
117
+ ### Patterns
118
+
119
+ - **Services**: instantiate directly, call methods, assert return values or thrown errors.
120
+ - **Directives**: instantiate directly with `new ElementRef(document.createElement('div'))` and a spy service; call lifecycle hooks (`ngOnInit`, `ngOnChanges`, `ngOnDestroy`) manually and assert spy calls.
121
+ - Use `jasmine.createSpyObj` for dependency mocks — never use real network/DOM instances in unit tests.
122
+ - Every public method that guards on network existence must have a corresponding `toThrowError()` assertion in the "throws error when network does not exist" spec.
123
+
124
+ The root `angular.json` defines a test target for the `ngx-vis` library project:
125
+
126
+ ```json
127
+ {
128
+ "builder": "@angular-devkit/build-angular:karma",
129
+ "options": {
130
+ "tsConfig": "tsconfig.spec.json",
131
+ "polyfills": ["zone.js", "zone.js/testing"],
132
+ "include": ["components/**/*.spec.ts"],
133
+ "codeCoverage": true
134
+ }
135
+ }
136
+ ```
137
+
138
+ `karma.conf.js` sets `CHROME_BIN` to puppeteer's bundled Chrome and configures the coverage reporter. The `test` npm script sets `CHROME_BIN` inline too (belt-and-suspenders for CI environments).
139
+
140
+ **CI vs local browser**: The `test` script selects `ChromeHeadlessNoSandbox` when `CI=true` (set automatically by GitHub Actions), otherwise `ChromeHeadless`. `ChromeHeadlessNoSandbox` is a built-in launcher provided by the Angular CLI karma builder (adds `--no-sandbox --disable-dev-shm-usage`), required on Linux runners which have no kernel sandbox. Do not specify `karmaConfig` in `angular.json` — when `karmaConfig` is set, Angular CLI uses an empty base config and the built-in launcher is not registered.
141
+
142
+ **Critical**: `tsconfig.spec.json` must have `"importHelpers": true`. The root tsconfig has `"noEmitHelpers": true`, which suppresses inline TypeScript helpers (e.g. `__decorate`). Without `importHelpers`, those helpers are neither inlined nor imported from `tslib`, causing a runtime `ReferenceError` in the browser.
143
+
144
+ ---
145
+
146
+ ## Known warnings (expected, not actionable)
147
+
148
+ - **`vis-data`, `vis-network`, `vis-timeline` are not ESM** — these upstream vis.js packages ship only CommonJS. Angular's esbuild builder warns about this but still bundles them correctly.
149
+ - **husky `install` deprecation** — fixed; `prepare` script now runs `husky` (not `husky install`).
150
+
151
+ ---
152
+
153
+ ## Things that were removed during the Angular 16→21 upgrade
154
+
155
+ | Removed | Reason |
156
+ | --- | --- |
157
+ | `tslint`, `tslint-loader`, `codelyzer` | Abandoned; replaced by ESLint |
158
+ | `rollup` (direct dep) | ng-packagr 21 uses `@rollup/wasm-node` internally |
159
+ | `@angular-devkit/build-webpack` | Required webpack-dev-server v5; incompatible with rest of toolchain |
160
+ | `ajv` (direct dep) | Was causing peer-dep conflicts; Angular tooling brings its own |
161
+ | `AppModule`, `AppRoutingModule` | Replaced by standalone bootstrapping in the demo |
162
+ | `spec-bundle.js` (as entry point) | Replaced by Angular CLI karma builder |
163
+ | `.config/webpack.test.js` (as entry) | Replaced by Angular CLI karma builder |
164
+ | `webpack.prod.js` | Never existed; `webpack.github.js` replaced by `ng build` script |
165
+
166
+ ---
167
+
168
+ ## ESLint / gitignore
169
+
170
+ ESLint runs with `--ignore-path .gitignore`. The compiled `docs/` output must be in `.gitignore` (not just `.eslintignore`) to be excluded, since the `flow.eslint` script uses `.gitignore` as the ignore source.
@@ -0,0 +1,30 @@
1
+ > ℹ Please fill out this template when filing an issue.
2
+ > All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.
3
+ >
4
+ > Per our [*CONTRIBUTING guidelines](https://github.com/hypery2k/ngx-vis/master/CONTRIBUTING.md), we use GitHub for
5
+ > bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag `angular`.
6
+ >
7
+ > Please remove this line and everything above it before submitting.
8
+
9
+ * [ ] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/hypery2k/ngx-vis/master/CONTRIBUTING.md).
10
+
11
+ ## What did you do?
12
+
13
+ ℹ Please replace this with what you did.
14
+
15
+ ## What did you expect to happen?
16
+
17
+ ℹ Please replace this with what you expected to happen.
18
+
19
+ ## What happened instead?
20
+
21
+ ℹ Please replace this with of what happened instead.
22
+
23
+ ## Your Environment
24
+
25
+ **Angular version:**
26
+ **NodeJS and NPM version:**
27
+
28
+ ## Demo Project
29
+
30
+ ℹ Please link to or upload a project we can download that reproduces the issue.
package/angular.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+ "version": 1,
4
+ "projects": {
5
+ "ngx-vis": {
6
+ "projectType": "library",
7
+ "root": "",
8
+ "sourceRoot": "",
9
+ "architect": {
10
+ "test": {
11
+ "builder": "@angular-devkit/build-angular:karma",
12
+ "options": {
13
+ "tsConfig": "tsconfig.spec.json",
14
+ "polyfills": [
15
+ "zone.js",
16
+ "zone.js/testing"
17
+ ],
18
+ "include": [
19
+ "components/**/*.spec.ts"
20
+ ],
21
+ "codeCoverage": true
22
+ }
23
+ }
24
+ }
25
+ }
26
+ },
27
+ "cli": {
28
+ "analytics": false
29
+ }
30
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "786|karma>expand-braces>braces": {
3
+ "ignore": 1
4
+ }
5
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "decisions": {
3
+ "786|karma>expand-braces>braces": {
4
+ "madeAt": 0,
5
+ "decision": "ignore"
6
+ },
7
+ "1179|@angular/compiler-cli>chokidar>fsevents>node-pre-gyp>mkdirp>minimist": {
8
+ "decision": "ignore",
9
+ "madeAt": 1587434551288
10
+ },
11
+ "1179|@angular/compiler-cli>chokidar>fsevents>node-pre-gyp>tar>mkdirp>minimist": {
12
+ "decision": "ignore",
13
+ "madeAt": 1587434551288
14
+ },
15
+ "1179|@angular/compiler-cli>chokidar>fsevents>node-pre-gyp>rc>minimist": {
16
+ "decision": "ignore",
17
+ "madeAt": 1587434551288
18
+ },
19
+ "1179|karma>optimist>minimist": {
20
+ "decision": "ignore",
21
+ "madeAt": 1587434556722
22
+ },
23
+ "1179|karma-mocha>minimist": {
24
+ "decision": "ignore",
25
+ "madeAt": 1587434560322
26
+ },
27
+ "1179|conventional-changelog-cli>conventional-changelog>conventional-changelog-core>conventional-changelog-writer>handlebars>optimist>minimist": {
28
+ "decision": "ignore",
29
+ "madeAt": 1587434567365
30
+ },
31
+ "1179|webpack>watchpack>chokidar>fsevents>node-pre-gyp>mkdirp>minimist": {
32
+ "decision": "ignore",
33
+ "madeAt": 1587434571301
34
+ },
35
+ "1179|webpack-dev-server>chokidar>fsevents>node-pre-gyp>mkdirp>minimist": {
36
+ "decision": "ignore",
37
+ "madeAt": 1587434571301
38
+ },
39
+ "1179|webpack>watchpack>chokidar>fsevents>node-pre-gyp>tar>mkdirp>minimist": {
40
+ "decision": "ignore",
41
+ "madeAt": 1587434571301
42
+ },
43
+ "1179|webpack-dev-server>chokidar>fsevents>node-pre-gyp>tar>mkdirp>minimist": {
44
+ "decision": "ignore",
45
+ "madeAt": 1587434571301
46
+ },
47
+ "1179|webpack>watchpack>chokidar>fsevents>node-pre-gyp>rc>minimist": {
48
+ "decision": "ignore",
49
+ "madeAt": 1587434571301
50
+ },
51
+ "1179|webpack-dev-server>chokidar>fsevents>node-pre-gyp>rc>minimist": {
52
+ "decision": "ignore",
53
+ "madeAt": 1587434571301
54
+ }
55
+ },
56
+ "rules": {},
57
+ "version": 1
58
+ }
package/cliff.toml ADDED
@@ -0,0 +1,48 @@
1
+ [changelog]
2
+ header = ""
3
+ body = """
4
+ {% if version %}\
5
+ ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/visjs/ngx-vis/compare/{{ previous.version }}...{{ version }}) ({{ timestamp | date(format="%Y-%m-%d") }})
6
+ {% else %}\
7
+ ## [Unreleased]
8
+ {% endif %}\
9
+
10
+ {% for group, commits in commits | group_by(attribute="group") %}
11
+ ### {{ group }}
12
+
13
+ {% for commit in commits %}\
14
+ * {% if commit.scope %}**{{ commit.scope }}:** {% endif %}{{ commit.message | upper_first }} \
15
+ ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/visjs/ngx-vis/commit/{{ commit.id }}))\
16
+ {% if commit.breaking %} **BREAKING CHANGE**{% endif %}
17
+
18
+ {% endfor %}
19
+ {% endfor %}\n
20
+ """
21
+ trim = true
22
+ footer = ""
23
+
24
+ [git]
25
+ conventional_commits = true
26
+ filter_unconventional = true
27
+ split_commits = false
28
+ tag_pattern = "v[0-9].*"
29
+ skip_tags = ""
30
+ ignore_tags = ""
31
+ sort_commits = "oldest"
32
+
33
+ commit_parsers = [
34
+ { message = "^feat", group = "Features" },
35
+ { message = "^fix", group = "Bug Fixes" },
36
+ { message = "^perf", group = "Performance" },
37
+ { message = "^refactor", group = "Refactoring" },
38
+ { message = "^doc|^docs", group = "Documentation" },
39
+ { message = "^test", group = "Testing" },
40
+ { message = "^chore\\(deps\\)", group = "Dependency Updates" },
41
+ { message = "^chore", skip = true },
42
+ { message = "^ci", skip = true },
43
+ { message = "^style", skip = true },
44
+ { body = ".*security", group = "Security" },
45
+ ]
46
+
47
+ protect_breaking_commits = false
48
+ filter_commits = true
@@ -0,0 +1,7 @@
1
+ {
2
+ "lib": {
3
+ "entryFile": "ngx-vis.ts",
4
+ "flatModuleFile": "ngxvis"
5
+ },
6
+ "allowedNonPeerDependencies": ["vis-data", "vis-network", "vis-timeline", "vis-util"]
7
+ }
package/package.json CHANGED
@@ -1,21 +1,99 @@
1
1
  {
2
2
  "name": "ngx-vis",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "main": "ngx-vis",
5
5
  "types": "ngx-vis.d.ts",
6
6
  "description": "Angular x components for using vis.js",
7
+ "scripts": {
8
+ "flow.compile": "npm run flow.compile:common && npm run flow.extract-metadata",
9
+ "flow.compile:tsc": "tsc -p tsconfig.publish.json",
10
+ "flow.compile:common": "npm run flow.compile:tsc",
11
+ "flow.clean": "rimraf bundles coverage dist demo-build \"components/**/*.+(metadata.json|js|d.ts|js.map)\" dist \"ngx-vis.+(js|d.ts|js.map)\"",
12
+ "flow.eslint": "eslint --ignore-path .gitignore --ext js --fix . .config",
13
+ "flow.extract-metadata": "ng-packagr -p ng-package.json -c tsconfig.publish.json",
14
+ "flow.lint": "npm run flow.eslint",
15
+ "flow.build:demo": "(cd dist && npm pack) && (cd demo && npm i ../dist/ngx-vis-*.tgz && npm run build)",
16
+ "flow.build:github-pages": "(cd dist && npm pack) && (cd demo && npm i ../dist/ngx-vis-*.tgz && ng build --base-href=/ngx-vis/ --output-path=../docs)",
17
+ "clean": "npm run flow.clean",
18
+ "build": "npm run build:lib",
19
+ "build:all": "npm run build:lib && npm run build:demo && npm run build:docs",
20
+ "build:lib": "npm run flow.compile",
21
+ "build:demo": "rm -rf docs/* && npm run flow.build:demo",
22
+ "build:docs": "rm -rf docs/* && npm run flow.build:github-pages",
23
+ "pretest": "npm run flow.lint",
24
+ "test": "CHROME_BIN=$(node -e \"process.stdout.write(require('puppeteer').executablePath())\") ng test --browsers=$(node -e \"process.stdout.write(process.env.CI==='true'?'ChromeHeadlessNoSandbox':'ChromeHeadless')\") --no-watch",
25
+ "test:watch": "CHROME_BIN=$(node -e \"process.stdout.write(require('puppeteer').executablePath())\") ng test --browsers=ChromeHeadless",
26
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
27
+ "changelog:add": "git add CHANGELOG.md && git commit --no-verify -m 'chore(changelog): Updated CHANGELOG.md'",
28
+ "release:pre": "npm run clean && npm run build && npm run test",
29
+ "release:post": "npm run changelog && npm run changelog:add",
30
+ "release:major": "npm run release:pre && npm version major && npm run release:post && git push origin && git push origin --tags && npm run version-and-push",
31
+ "release:minor": "npm run release:pre && npm version minor && npm run release:post && git push origin && git push origin --tags && npm run version-and-push",
32
+ "release:patch": "npm run release:pre && npm version patch && npm run release:post && git push origin && git push origin --tags && npm run version-and-push",
33
+ "version-and-push": "git push origin && git push origin --tags && npm run publish-and-merge",
34
+ "publish-and-merge": "git checkout main && git merge develop && git push && git checkout develop",
35
+ "prepare": "husky && npm run build"
36
+ },
37
+ "husky": {
38
+ "hooks": {
39
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
40
+ "pre-push": "npm test"
41
+ }
42
+ },
7
43
  "dependencies": {
8
- "vis-network": "~9.1.7",
9
- "vis-timeline": "~7.7.0",
10
- "tslib": "^2.3.0"
44
+ "vis-network": "~10.1.0",
45
+ "vis-timeline": "~8.5.0"
11
46
  },
12
47
  "peerDependencies": {
13
48
  "@egjs/hammerjs": "^2.0.0",
14
49
  "keycharm": "^0.3.0 || ^0.4.0",
15
50
  "moment": "^2.24.0",
16
- "propagating-hammerjs": "^1.4.0",
51
+ "propagating-hammerjs": "^1.4.0 || ^3.0.0",
17
52
  "timsort": "^0.3.0",
18
- "uuid": "^7.0.0 || ^9.0.0"
53
+ "uuid": "^7.0.0 || ^9.0.0 || ^11.0.0 || ^13.0.0 || ^14.0.0"
54
+ },
55
+ "devDependencies": {
56
+ "@angular-devkit/build-angular": "^22.1.0",
57
+ "@angular-devkit/schematics": "^22.1.0",
58
+ "@angular/animations": "^22.1.0",
59
+ "@angular/cli": "^22.1.0",
60
+ "@angular/common": "^22.1.0",
61
+ "@angular/compiler": "^22.1.0",
62
+ "@angular/compiler-cli": "^22.1.0",
63
+ "@angular/core": "^22.1.0",
64
+ "@angular/forms": "^22.1.0",
65
+ "@angular/platform-browser": "^22.1.0",
66
+ "@angular/platform-browser-dynamic": "^22.1.0",
67
+ "@angular/platform-server": "^22.1.0",
68
+ "@angular/router": "^22.1.0",
69
+ "@commitlint/cli": "^21.0.0",
70
+ "@commitlint/config-conventional": "^21.0.0",
71
+ "@egjs/hammerjs": "^2.0.17",
72
+ "@types/hammerjs": "^2.0.0",
73
+ "@types/jasmine": "^5.0.0",
74
+ "@types/node": "^24.0.0",
75
+ "conventional-changelog-cli": "^5.0.0",
76
+ "cpy-cli": "^7.0.0",
77
+ "eslint": "^8.40.0",
78
+ "husky": "^9.0.0",
79
+ "jasmine-core": "^6.0.0",
80
+ "karma": "^6.4.2",
81
+ "karma-chrome-launcher": "^3.2.0",
82
+ "karma-coverage": "^2.2.0",
83
+ "karma-jasmine": "^5.1.0",
84
+ "karma-jasmine-html-reporter": "^2.2.0",
85
+ "keycharm": "^0.4.0",
86
+ "moment": "^2.30.1",
87
+ "ng-packagr": "^22.1.0",
88
+ "puppeteer": "^25.0.0",
89
+ "rimraf": "^6.1.3",
90
+ "rxjs": "~7.8.0",
91
+ "timsort": "^0.3.0",
92
+ "tslib": "^2.8.0",
93
+ "typescript": "~6.0.0",
94
+ "vis-data": "^8.0.0",
95
+ "vis-util": "~6.0.0",
96
+ "zone.js": "~0.16.0"
19
97
  },
20
98
  "repository": {
21
99
  "type": "git",
@@ -44,16 +122,12 @@
44
122
  "url": "https://github.com/visjs/ngx-vis/issues"
45
123
  },
46
124
  "homepage": "https://github.com/visjs/ngx-vis#readme",
47
- "module": "fesm2022/ngxvis.mjs",
48
- "typings": "types/ngxvis.d.ts",
49
- "exports": {
50
- "./package.json": {
51
- "default": "./package.json"
52
- },
53
- ".": {
54
- "types": "./types/ngxvis.d.ts",
55
- "default": "./fesm2022/ngxvis.mjs"
56
- }
57
- },
58
- "sideEffects": false
59
- }
125
+ "allowScripts": {
126
+ "@parcel/watcher@2.6.0": true,
127
+ "esbuild@0.28.2": true,
128
+ "fsevents@2.3.3": true,
129
+ "msgpackr-extract@3.0.4": true,
130
+ "puppeteer@24.43.1": true,
131
+ "lmdb@3.5.6": true
132
+ }
133
+ }
package/renovate.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": ["config:recommended"],
4
+ "packageRules": [
5
+ {
6
+ "matchDatasources": ["npm"],
7
+ "matchUpdateTypes": ["patch"],
8
+ "automerge": true
9
+ },
10
+ {
11
+ "groupName": "Angular",
12
+ "matchManagers": ["npm"],
13
+ "matchPackagePatterns": [
14
+ "^@angular/",
15
+ "^zone\\.js",
16
+ "^@ngrx/",
17
+ "^@ngtools/",
18
+ "^@ng-easy/",
19
+ "^@angular-devkit/",
20
+ "^ng-packagr",
21
+ "^tslib",
22
+ "^@angular-eslint/",
23
+ "^typescript$"
24
+ ],
25
+ "matchUpdateTypes": ["major", "minor", "patch", "pin"]
26
+ },
27
+ {
28
+ "groupName": "TypeScript",
29
+ "matchManagers": ["npm"],
30
+ "matchPackagePatterns": [
31
+ "^@types/"
32
+ ],
33
+ "matchUpdateTypes": ["major", "minor", "patch", "pin"]
34
+ },
35
+ {
36
+ "groupName": "Vis",
37
+ "matchManagers": ["npm"],
38
+ "matchPackagePatterns": [
39
+ "vis-data",
40
+ "vis-network",
41
+ "vis-timeline",
42
+ "vis-util",
43
+ "^uuid$",
44
+ "^propagating-hammerjs$"
45
+ ],
46
+ "matchUpdateTypes": ["major", "minor", "patch", "pin"]
47
+ },
48
+ {
49
+ "groupName": "ESLint",
50
+ "matchManagers": ["npm"],
51
+ "matchPackagePatterns": [
52
+ "^eslint",
53
+ "^@eslint/",
54
+ "^eslint-config-",
55
+ "^eslint-plugin-"
56
+ ],
57
+ "matchUpdateTypes": ["major", "minor", "patch", "pin"]
58
+ },
59
+ {
60
+ "groupName": "Karma + Jasmine",
61
+ "matchManagers": ["npm"],
62
+ "matchPackagePatterns": [
63
+ "^jasmine",
64
+ "^@types/jasmine",
65
+ "^karma",
66
+ "^karma-"
67
+ ],
68
+ "matchUpdateTypes": ["major", "minor", "patch", "pin"]
69
+ },
70
+ {
71
+ "groupName": "Commitlint",
72
+ "matchManagers": ["npm"],
73
+ "matchPackagePatterns": [
74
+ "^@commitlint/"
75
+ ],
76
+ "matchUpdateTypes": ["major", "minor", "patch", "pin"]
77
+ }
78
+ ],
79
+ "prHourlyLimit": 10
80
+ }
package/spec-bundle.js ADDED
@@ -0,0 +1,65 @@
1
+ /* eslint no-var: 0, vars-on-top: 0 */
2
+ /**
3
+ * @author: @AngularClass
4
+ */
5
+
6
+ /*
7
+ * When testing with webpack and ES6, we have to do some extra
8
+ * things to get testing to work right. Because we are gonna write tests
9
+ * in ES6 too, we have to compile those as well. That's handled in
10
+ * karma.conf.js with the karma-webpack plugin. This is the entry
11
+ * file for webpack test. Just like webpack will create a bundle.js
12
+ * file for our client, when we run test, it will compile and bundle them
13
+ * all here! Crazy huh. So we need to do some setup
14
+ */
15
+ 'use strict';
16
+ Error.stackTraceLimit = Infinity;
17
+
18
+ require('core-js');
19
+
20
+ // Typescript emit helpers polyfill
21
+ require('ts-helpers');
22
+
23
+ require('zone.js/dist/zone');
24
+ require('zone.js/dist/long-stack-trace-zone');
25
+ require('zone.js/dist/async-test');
26
+ require('zone.js/dist/fake-async-test');
27
+ require('zone.js/dist/sync-test');
28
+ require('zone.js/dist/proxy');
29
+ require('zone.js/dist/jasmine-patch');
30
+
31
+ // RxJS
32
+ require('rxjs');
33
+
34
+ var testing = require('@angular/core/testing');
35
+ var browser = require('@angular/platform-browser-dynamic/testing');
36
+
37
+ testing.TestBed.initTestEnvironment(
38
+ browser.BrowserDynamicTestingModule,
39
+ browser.platformBrowserDynamicTesting()
40
+ );
41
+
42
+ Object.assign(global, testing);
43
+
44
+ /*
45
+ * Ok, this is kinda crazy. We can use the the context method on
46
+ * require that webpack created in order to tell webpack
47
+ * what files we actually want to require or import.
48
+ * Below, context will be an function/object with file names as keys.
49
+ * using that regex we are saying look in ./src/app and ./test then find
50
+ * any file that ends with spec.js and get its path. By passing in true
51
+ * we say do this recursively
52
+ */
53
+ var testContext = require.context('./components', true, /\.spec\.ts/);
54
+
55
+ /*
56
+ * get all the files, for each file, call the context function
57
+ * that will require the file and load it up here. Context will
58
+ * loop and require those spec files here
59
+ */
60
+ function requireAll(requireContext) {
61
+ return requireContext.keys().map(requireContext);
62
+ }
63
+
64
+ // requires and returns all modules that match
65
+ requireAll(testContext);
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": false,
4
+ "declaration": true,
5
+ "stripInternal": true,
6
+ "emitDecoratorMetadata": true,
7
+ "experimentalDecorators": true,
8
+ "module": "ES2022",
9
+ "moduleResolution": "bundler",
10
+ "noEmitOnError": false,
11
+ "outDir": "./dist",
12
+ "rootDir": ".",
13
+ "sourceMap": true,
14
+ "inlineSources": true,
15
+ "lib": [
16
+ "ES2022",
17
+ "dom"
18
+ ],
19
+ "target": "ES2022",
20
+ "skipLibCheck": true
21
+ },
22
+ "files": [
23
+ "./ngx-vis.ts"
24
+ ],
25
+ "angularCompilerOptions": {}
26
+ }