From 3ec2c898d073202e577a6e642103b0f71f4bccaf Mon Sep 17 00:00:00 2001 From: efokschaner Date: Sun, 11 Jul 2021 19:14:13 -0700 Subject: [PATCH] Specify required version of tslib ^2.0.0 The version + features of typescript used to compile this lib means that tslib needs to be at version 2.0.0 minimum. Because `antvis/algorithm` doesn't specify an explicit version, it is not guaranteed that developers receive the necessary version. This causes the following error at import time: ``` ./node_modules/@antv/algorithm/es/gaddi.js Attempted import error: '__spreadArray' is not exported from 'tslib'. ``` You can see here all the other projects updating their tslib dependencies similarly in the references to this PR: https://github.com/microsoft/tslib/pull/133 This relates to https://github.com/antvis/G6/issues/2702 and https://github.com/antvis/G6/issues/2713 it is likely necessary, but may not be sufficient, to fix those reported issues. There could be other `antvis` packages with the same issue. --- packages/graph/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/graph/package.json b/packages/graph/package.json index 8783dab..dd63d61 100644 --- a/packages/graph/package.json +++ b/packages/graph/package.json @@ -67,6 +67,7 @@ "worker-loader": "^3.0.7" }, "dependencies": { - "@antv/util": "^2.0.13" + "@antv/util": "^2.0.13", + "tslib": "^2.0.0" } }