Skip to content

Commit 7e704b1

Browse files
Bootstrap: Bump to 5.3.3 and remove from /packages/devextreme/ (#28367)
1 parent 7c00bce commit 7e704b1

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

packages/devextreme-themebuilder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"pack": "cd dist && pnpm pack"
2222
},
2323
"peerDependencies": {
24-
"bootstrap": "npm:bootstrap@^5.3.0"
24+
"bootstrap": "npm:bootstrap@^5.3.3"
2525
},
2626
"dependencies": {
2727
"autoprefixer": "^10.4.7",

packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default class BootstrapExtractor {
8787
}
8888

8989
const result = `${functions}
90-
${variables.replace('@import "variables-dark";', '')}
90+
${this.getVariables(variables)}
9191
${variablesDark}
9292
${this.input}
9393
${this.getSetterServiceCode('!default')}
@@ -104,6 +104,10 @@ ${this.getCollectorServiceCode()}`;
104104
);
105105
}
106106

107+
getVariables(variables: string): string {
108+
return variables.replace(/^@import "variables-dark";.*$/gm, '');
109+
}
110+
107111
getFilePath(fileName: string): string {
108112
return require.resolve(`bootstrap/scss/${fileName}`);
109113
}

packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('BootstrapExtractor', () => {
5050

5151
expect(await extractor.sassProcessor())
5252
.toBe(`${functions.toString()}
53-
${variables.toString()}
53+
${extractor.getVariables(variables.toString())}
5454
${variablesDark.toString()}
5555
${testSassString}
5656
${setterServiceCode}

packages/devextreme/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"axe-core": "4.10.0",
6666
"babel-plugin-add-module-exports": "1.0.4",
6767
"babel-plugin-inferno": "6.7.1",
68-
"bootstrap": "5.3.2",
6968
"cldr-core": "41.0.0",
7069
"cldr-numbers-full": "41.0.0",
7170
"cldrjs": "0.5.5",

packages/devextreme/testing/tests/Bootstrap Integration/widget_bundled.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ QUnit.testStart(function() {
1717

1818
executeAsyncMock.setup();
1919

20-
const BOOTSTRAP_CSS_URL = window.ROOT_URL + 'packages/devextreme/node_modules/bootstrap/dist/css/bootstrap.css';
20+
const BOOTSTRAP_CSS_URL = window.ROOT_URL + 'packages/devextreme-themebuilder/node_modules/bootstrap/dist/css/bootstrap.css';
2121

2222
const applyBootstrap = (function() {
2323
let styles = null;

pnpm-lock.yaml

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

tools/scripts/build-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ sh.pushd(path.join(ROOT_DIR, 'packages/devextreme/artifacts'));
7272
sh.popd();
7373

7474
// TODO: maybe we should add bootstrap to vendors
75-
const BOOTSTRAP_DIR = path.join(ROOT_DIR, 'packages', 'devextreme', 'node_modules', 'bootstrap', 'dist');
75+
const BOOTSTRAP_DIR = path.join(ROOT_DIR, 'packages', 'devextreme-themebuilder', 'node_modules', 'bootstrap', 'dist');
7676
sh.cp([path.join(BOOTSTRAP_DIR, 'js', 'bootstrap.js'), path.join(BOOTSTRAP_DIR, 'js', 'bootstrap.min.js')], JS_ARTIFACTS);
7777
sh.cp([path.join(BOOTSTRAP_DIR, 'css', 'bootstrap.css'), path.join(BOOTSTRAP_DIR, 'css', 'bootstrap.min.css')], CSS_ARTIFACTS);
7878

0 commit comments

Comments
 (0)