Skip to content

Commit 9487ece

Browse files
authored
Update dependencies for dash 3 (#1075)
* Pin prerelease * Update dependencies * Vendor is-absolute-url * Fix build
1 parent 402ee40 commit 9487ece

File tree

8 files changed

+5397
-8268
lines changed

8 files changed

+5397
-8268
lines changed

.babelrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"presets": ["@babel/preset-env", "@babel/preset-react"],
3-
"plugins": [
4-
"@babel/plugin-transform-object-rest-spread",
5-
"@babel/plugin-transform-runtime"
6-
],
3+
"plugins": ["@babel/plugin-transform-runtime"],
74
"env": {
85
"test": {
96
"plugins": ["@babel/plugin-transform-class-properties"]

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ deploy-docs: _copy-examples
7777
git branch -D just-push-docs docs-deploy
7878

7979
_build-py: && _move-generated-files _build-package
80-
uv run dash-generate-components ./src/components dash_bootstrap_components
80+
uv run dash-generate-components ./src/components dash_bootstrap_components -i "^_|__tests__"
8181
cp dash_bootstrap_components/_components/dash_bootstrap_components.min.js dist
8282

8383
_build-package:

package-lock.json

Lines changed: 5333 additions & 8179 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,44 +28,41 @@
2828
},
2929
"homepage": "https://dash-bootstrap-components.opensource.faculty.ai",
3030
"license": "Apache-2.0",
31-
"devDependencies": {
32-
"@babel/core": "^7.15.0",
33-
"@babel/plugin-transform-class-properties": "^7.24.1",
34-
"@babel/plugin-transform-object-rest-spread": "^7.24.1",
35-
"@babel/plugin-transform-runtime": "^7.15.0",
36-
"@babel/preset-env": "^7.15.0",
37-
"@babel/preset-react": "^7.14.5",
38-
"@testing-library/jest-dom": "^5.14.1",
39-
"@testing-library/react": "^12.1.1",
40-
"@testing-library/user-event": "^13.2.1",
41-
"babel-jest": "^27.2.4",
42-
"babel-loader": "^8.1.0",
43-
"css-loader": "^6.6.0",
44-
"jest": "^27.2.4",
45-
"jsdom": "^17.0.0",
46-
"npm-run-all": "^4.1.5",
47-
"prettier": "^3.4.2",
48-
"react-docgen": "^4.1.1",
49-
"style-loader": "^0.23.1",
50-
"webpack": "^5.68.0",
51-
"webpack-cli": "^4.9.2",
52-
"webpack-dev-server": "^4.7.4"
53-
},
5431
"dependencies": {
55-
"@plotly/dash-component-plugins": "^1.2.0",
56-
"classnames": "^2.2.6",
57-
"fast-isnumeric": "^1.1.3",
58-
"is-absolute-url": "^2.1.0",
59-
"prop-types": "^15.7.2",
60-
"ramda": "^0.27.1",
61-
"react": "^16.14.0",
62-
"react-bootstrap": "^2.2.2",
63-
"react-dom": "^16.14.0"
32+
"@plotly/dash-component-plugins": "^1.2.3",
33+
"classnames": "^2.5.1",
34+
"fast-isnumeric": "^1.1.4",
35+
"prop-types": "^15.8.1",
36+
"ramda": "^0.30.1",
37+
"react": "^18.3.1",
38+
"react-bootstrap": "^2.10.9",
39+
"react-dom": "^18.3.1"
6440
},
6541
"jest": {
6642
"testEnvironment": "jsdom",
6743
"setupFilesAfterEnv": [
6844
"<rootDir>/src/setupTests.js"
6945
]
46+
},
47+
"devDependencies": {
48+
"@babel/core": "^7.26.7",
49+
"@babel/plugin-transform-runtime": "^7.25.9",
50+
"@babel/preset-env": "^7.26.7",
51+
"@babel/preset-react": "^7.26.3",
52+
"@testing-library/dom": "^10.4.0",
53+
"@testing-library/jest-dom": "^6.6.3",
54+
"@testing-library/react": "^16.2.0",
55+
"@testing-library/user-event": "^14.6.1",
56+
"babel-jest": "^29.7.0",
57+
"babel-loader": "^9.2.1",
58+
"css-loader": "^7.1.2",
59+
"jest": "^29.7.0",
60+
"jest-environment-jsdom": "^29.7.0",
61+
"prettier": "^3.4.2",
62+
"react-docgen": "^5.4.3",
63+
"style-loader": "^4.0.0",
64+
"webpack": "^5.97.1",
65+
"webpack-cli": "^6.0.1",
66+
"webpack-dev-server": "^5.2.0"
7067
}
7168
}

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ authors = [
1414
]
1515
maintainers = [{ name = "Tom Begley", email = "[email protected]" }]
1616
requires-python = ">=3.9, <4"
17-
dependencies = ["dash>=2.0.0"]
17+
dependencies = [
18+
"dash==3.0.0rc1",
19+
]
1820
classifiers = [
1921
"Framework :: Dash",
2022
"License :: OSI Approved :: Apache Software License",

src/private/Link.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
/* global window:true */
2-
3-
import isAbsoluteUrl from 'is-absolute-url';
4-
52
import PropTypes from 'prop-types';
63
import React, {Component} from 'react';
74

8-
/* event polyfill for IE https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent */
9-
function CustomEvent(event, params) {
10-
// eslint-disable-next-line no-param-reassign
11-
params = params || {
12-
bubbles: false,
13-
cancelable: false,
14-
// eslint-disable-next-line no-undefined
15-
detail: undefined
16-
};
17-
const evt = document.createEvent('CustomEvent');
18-
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
19-
return evt;
5+
// absolute URL check vendored from is-absolute-url
6+
// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
7+
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
8+
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
9+
10+
// Windows paths like `c:\`
11+
const WINDOWS_PATH_REGEX = /^[a-zA-Z]:\\/;
12+
13+
function isAbsoluteUrl(url) {
14+
if (typeof url !== 'string') {
15+
throw new TypeError(`Expected a \`string\`, got \`${typeof url}\``);
16+
}
17+
18+
if (WINDOWS_PATH_REGEX.test(url)) {
19+
return false;
20+
}
21+
22+
return ABSOLUTE_URL_REGEX.test(url);
2023
}
21-
CustomEvent.prototype = window.Event.prototype;
2224

2325
function isExternalLink(external_link, href) {
2426
if (typeof external_link === 'undefined' || external_link === null) {

src/setupTests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import '@testing-library/jest-dom/extend-expect';
1+
import '@testing-library/jest-dom';

uv.lock

Lines changed: 11 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)