Skip to content

Commit 2b47849

Browse files
authored
Merge pull request #3380 from plotly/dep-up-32
Dependencies upgrade
2 parents 0d4913d + dec82f8 commit 2b47849

File tree

14 files changed

+6008
-8945
lines changed

14 files changed

+6008
-8945
lines changed

.circleci/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,17 @@ jobs:
163163
- run:
164164
name: npm prereqs
165165
command: |
166+
nvm use 18
166167
npm ci
167168
cd dash/dash-renderer && npm i && cd ../../
168169
cd components/dash-html-components && npm i && npm run extract && cd ../../
169170
- run:
170171
name: ️️🏗️ build dash
171172
command: |
173+
nvm use 18
172174
. venv/Scripts/activate
173-
npm run private::build.jupyterlab && npm run private::build.renderer && python dash/development/update_components.py 'dash-html-components'
175+
npm run private::build.jupyterlab && npm run private::build.renderer
176+
cd components/dash-html-components && npm run build
174177
no_output_timeout: 30m
175178

176179
test-312: &test

components/dash-core-components/package-lock.json

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

components/dash-core-components/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@
6363
"uniqid": "^5.4.0"
6464
},
6565
"devDependencies": {
66-
"@babel/cli": "^7.27.2",
67-
"@babel/core": "^7.27.4",
68-
"@babel/eslint-parser": "^7.27.5",
66+
"@babel/cli": "^7.28.0",
67+
"@babel/core": "^7.28.0",
68+
"@babel/eslint-parser": "^7.28.0",
6969
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
70-
"@babel/preset-env": "^7.27.2",
70+
"@babel/preset-env": "^7.28.0",
7171
"@babel/preset-react": "^7.27.1",
7272
"@plotly/dash-component-plugins": "^1.2.3",
7373
"@plotly/webpack-dash-dynamic-import": "^1.3.0",
@@ -85,8 +85,8 @@
8585
"react-jsx-parser": "1.21.0",
8686
"rimraf": "^5.0.5",
8787
"style-loader": "^3.3.3",
88-
"styled-jsx": "^3.4.4",
89-
"webpack": "^5.99.9",
88+
"styled-jsx": "^5.1.7",
89+
"webpack": "^5.101.0",
9090
"webpack-cli": "^5.1.4"
9191
},
9292
"optionalDependencies": {

components/dash-html-components/package-lock.json

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

components/dash-html-components/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
"ramda": "^0.30.1"
3333
},
3434
"devDependencies": {
35-
"@babel/cli": "^7.27.2",
36-
"@babel/core": "^7.27.4",
37-
"@babel/eslint-parser": "^7.27.5",
38-
"@babel/preset-env": "^7.27.2",
35+
"@babel/cli": "^7.28.0",
36+
"@babel/core": "^7.28.0",
37+
"@babel/eslint-parser": "^7.28.0",
38+
"@babel/preset-env": "^7.28.0",
3939
"@babel/preset-react": "^7.27.1",
4040
"babel-loader": "^9.2.1",
4141
"cheerio": "^0.22.0",
@@ -49,10 +49,9 @@
4949
"react": "^16.14.0",
5050
"react-docgen": "^5.4.3",
5151
"react-dom": "^16.14.0",
52-
"request": "^2.88.2",
5352
"rimraf": "^5.0.5",
5453
"string": "^3.3.3",
55-
"webpack": "^5.99.9",
54+
"webpack": "^5.101.0",
5655
"webpack-cli": "^5.1.4"
5756
},
5857
"files": [

components/dash-html-components/scripts/extract-attributes.js

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const fs = require('fs');
44
const cheerio = require('cheerio');
5-
const request = require('request');
65
const str = require('string');
76

87
const htmlURL = 'https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes';
@@ -136,24 +135,31 @@ function extractElements(attributes) {
136135

137136
// A local copy of the MDN attributes web page has been saved for reference:
138137
// fs.readFile('./data/attributes.html', 'utf-8', (error, html) => {
139-
request(htmlURL, (error, response, html) => {
140-
if (error) {
138+
fetch(htmlURL)
139+
.then(response => {
140+
if (!response.ok) {
141+
throw new Error(`HTTP error! status: ${response.status}`);
142+
}
143+
return response.text();
144+
})
145+
.then(html => {
146+
const html2 = html.split(/\n\r|\r\n|\r|\n/).map(l => l.trimRight()).join('\n');
147+
// write back to the saved copy of MDN attributes so we can see the diff
148+
fs.writeFileSync(htmlPath, html2);
149+
150+
const $ = cheerio.load(html);
151+
const attributes = extractAttributes($);
152+
const elements = extractElements(attributes);
153+
const out = {
154+
attributes,
155+
elements
156+
};
157+
158+
// Print out JSON with 4-space indentation formatting.
159+
// http://stackoverflow.com/a/11276104
160+
const tabWidth = 4;
161+
fs.writeFileSync(dataPath, JSON.stringify(out, null, tabWidth));
162+
})
163+
.catch(error => {
141164
throw error;
142-
}
143-
const html2 = html.split(/\n\r|\r\n|\r|\n/).map(l => l.trimRight()).join('\n');
144-
// write back to the saved copy of MDN attributes so we can see the diff
145-
fs.writeFileSync(htmlPath, html2);
146-
147-
const $ = cheerio.load(html);
148-
const attributes = extractAttributes($);
149-
const elements = extractElements(attributes);
150-
const out = {
151-
attributes,
152-
elements
153-
};
154-
155-
// Print out JSON with 4-space indentation formatting.
156-
// http://stackoverflow.com/a/11276104
157-
const tabWidth = 4;
158-
fs.writeFileSync(dataPath, JSON.stringify(out, null, tabWidth));
159-
});
165+
});

components/dash-html-components/scripts/extract-elements.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const fs = require('fs');
44
const cheerio = require('cheerio');
5-
const request = require('request');
65

76
const refUrl = 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element';
87
const dataPath = './data/elements.txt';
@@ -63,14 +62,21 @@ function extractElements($) {
6362
}, []);
6463
}
6564

66-
request(refUrl, (error, response, html) => {
67-
if (error) {
65+
fetch(refUrl)
66+
.then(response => {
67+
if (!response.ok) {
68+
throw new Error(`HTTP error! status: ${response.status}`);
69+
}
70+
return response.text();
71+
})
72+
.then(html => {
73+
const $ = cheerio.load(html);
74+
const elements = extractElements($);
75+
const out = elements.join('\n');
76+
77+
fs.writeFileSync(dataPath, out);
78+
})
79+
.catch(error => {
6880
console.error(error);
6981
process.exit(-1);
70-
}
71-
const $ = cheerio.load(html);
72-
const elements = extractElements($);
73-
const out = elements.join('\n');
74-
75-
fs.writeFileSync(dataPath, out);
76-
});
82+
});

0 commit comments

Comments
 (0)