Skip to content

Commit f53de9b

Browse files
authored
build: Release (#3329)
2 parents 12a1db0 + bf08dc1 commit f53de9b

File tree

5 files changed

+85
-3
lines changed

5 files changed

+85
-3
lines changed

changelogs/CHANGELOG_alpha.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [9.1.1-alpha.1](https://github.com/parse-community/parse-dashboard/compare/9.1.0...9.1.1-alpha.1) (2026-04-07)
2+
3+
4+
### Bug Fixes
5+
6+
* Broken CSS styling for components with underscore class names ([#3328](https://github.com/parse-community/parse-dashboard/issues/3328)) ([2048abe](https://github.com/parse-community/parse-dashboard/commit/2048abe1322f27f08497d62f141c2540cf7a4eb6))
7+
18
# [9.1.0-alpha.12](https://github.com/parse-community/parse-dashboard/compare/9.1.0-alpha.11...9.1.0-alpha.12) (2026-04-07)
29

310

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-dashboard",
3-
"version": "9.1.0",
3+
"version": "9.1.1-alpha.1",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/parse-community/parse-dashboard"

src/lib/tests/CssModules.test.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (c) 2016-present, Parse, LLC
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the LICENSE file in
6+
* the root directory of this source tree.
7+
*/
8+
9+
const webpack = require('webpack');
10+
const path = require('path');
11+
const fs = require('fs');
12+
const os = require('os');
13+
14+
function runWebpack(config) {
15+
return new Promise((resolve, reject) => {
16+
webpack(config, (err, stats) => {
17+
if (err) {
18+
return reject(err);
19+
}
20+
if (stats.hasErrors()) {
21+
return reject(new Error(stats.toJson().errors.map(e => e.message).join('\n')));
22+
}
23+
resolve(stats);
24+
});
25+
});
26+
}
27+
28+
describe('CSS modules', () => {
29+
let tmpDir;
30+
31+
beforeAll(() => {
32+
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'css-modules-test-'));
33+
34+
fs.writeFileSync(
35+
path.join(tmpDir, 'test.scss'),
36+
'.test_underscore_class { color: red; }\n.testCamelCase { color: blue; }\n'
37+
);
38+
39+
fs.writeFileSync(
40+
path.join(tmpDir, 'entry.js'),
41+
'const styles = require("./test.scss");\n'
42+
);
43+
});
44+
45+
afterAll(() => {
46+
fs.rmSync(tmpDir, { recursive: true, force: true });
47+
});
48+
49+
it('preserves underscore class names in exports', async () => {
50+
const baseConfig = require('../../../webpack/base.config.js');
51+
const scssRule = baseConfig.module.rules.find(r => r.test.toString().includes('scss'));
52+
53+
await runWebpack({
54+
mode: 'production',
55+
entry: path.join(tmpDir, 'entry.js'),
56+
output: {
57+
path: tmpDir,
58+
filename: 'bundle.js',
59+
},
60+
module: {
61+
rules: [{ test: /\.scss$/, use: scssRule.use }],
62+
},
63+
});
64+
65+
const bundle = fs.readFileSync(path.join(tmpDir, 'bundle.js'), 'utf8');
66+
67+
// Class names with underscores must be preserved as-is in the JS exports,
68+
// not converted to camelCase (e.g. testUnderscoreClass).
69+
// This broke when css-loader was bumped from v6 to v7, which changed the
70+
// default exportLocalsConvention from 'asIs' to 'camelCaseOnly'.
71+
expect(bundle).toContain('test_underscore_class');
72+
expect(bundle).toContain('testCamelCase');
73+
}, 30000);
74+
});

webpack/base.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module.exports = {
5050
options: {
5151
modules: {
5252
namedExport: false,
53+
exportLocalsConvention: 'as-is',
5354
},
5455
importLoaders: 2,
5556
},

0 commit comments

Comments
 (0)