Skip to content

Commit fe0ef35

Browse files
joshblackemyarod
andcommitted
chore(project): update change-case to 4.1.1 (#5090)
* chore(project): update change-case to 4.1.1 * fix(upgrade): update change-case usage Co-authored-by: emyarod <emyarod@users.noreply.github.com>
1 parent 0097e96 commit fe0ef35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+155
-170
lines changed
3.95 KB
Binary file not shown.
3.69 KB
Binary file not shown.
-4.09 KB
Binary file not shown.
-4.09 KB
Binary file not shown.
3.18 KB
Binary file not shown.
-1.41 KB
Binary file not shown.
3.64 KB
Binary file not shown.
-1.92 KB
Binary file not shown.
3.53 KB
Binary file not shown.
-1.97 KB
Binary file not shown.
3.51 KB
Binary file not shown.
-1.79 KB
Binary file not shown.
-1.83 KB
Binary file not shown.
4.29 KB
Binary file not shown.
-1.94 KB
Binary file not shown.
5.58 KB
Binary file not shown.
3.5 KB
Binary file not shown.
-2.06 KB
Binary file not shown.
4.08 KB
Binary file not shown.
-1.92 KB
Binary file not shown.
3.49 KB
Binary file not shown.
-2.11 KB
Binary file not shown.
3.79 KB
Binary file not shown.
-1.38 KB
Binary file not shown.
3.5 KB
Binary file not shown.
-2.18 KB
Binary file not shown.
-1.95 KB
Binary file not shown.
4.23 KB
Binary file not shown.
-1.93 KB
Binary file not shown.
3.17 KB
Binary file not shown.

packages/bundler/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"autoprefixer": "^9.4.3",
2929
"babel-plugin-macros": "^2.4.2",
3030
"chalk": "^2.4.1",
31-
"change-case": "^3.0.2",
31+
"change-case": "^4.1.1",
3232
"cli-table": "^0.3.1",
3333
"commander": "^2.19.0",
3434
"cssnano": "^4.1.7",

packages/colors/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
"clean": "rimraf css es lib umd scss"
3232
},
3333
"devDependencies": {
34-
"@carbon/bundler": "^10.5.1",
35-
"@carbon/cli-reporter": "^10.3.0",
36-
"@carbon/scss-generator": "^10.5.1",
37-
"@carbon/test-utils": "^10.6.1",
38-
"change-case": "^3.0.2",
34+
"@carbon/bundler": "^10.5.0",
35+
"@carbon/cli-reporter": "10.3.0",
36+
"@carbon/scss-generator": "^10.5.0",
37+
"@carbon/test-utils": "^10.6.0",
38+
"change-case": "^4.1.1",
3939
"core-js": "^3.0.1",
4040
"fs-extra": "^7.0.0",
4141
"node-sass": "^4.11.0",

packages/icon-build-helpers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@carbon/cli-reporter": "10.3.0",
2424
"@carbon/icon-helpers": "^10.5.0",
2525
"browserslist-config-carbon": "10.4.0",
26-
"change-case": "^3.0.2",
26+
"change-case": "^4.1.1",
2727
"core-js": "^3.1.3",
2828
"fs-extra": "^7.0.0",
2929
"joi": "^14.3.1",

packages/icon-build-helpers/src/builders/react/builder.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
'use strict';
99

10-
const { camel } = require('change-case');
10+
const { camelCase } = require('change-case');
1111
const { reporter } = require('@carbon/cli-reporter');
1212
const fs = require('fs-extra');
1313
const path = require('path');
@@ -269,7 +269,7 @@ function shouldTransformAttribute(attribute) {
269269
function formatAttributes(attrs) {
270270
return Object.keys(attrs).reduce((acc, key, index) => {
271271
const attribute = shouldTransformAttribute(key)
272-
? `${camel(key)}="${attrs[key]}"`
272+
? `${camelCase(key)}="${attrs[key]}"`
273273
: `${key}="${attrs[key]}"`;
274274

275275
if (index === 0) {

packages/icon-build-helpers/src/builders/vanilla/builder.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
'use strict';
99

1010
const { reporter } = require('@carbon/cli-reporter');
11-
const { pascal } = require('change-case');
11+
const { pascalCase } = require('change-case');
1212
const fs = require('fs-extra');
1313
const path = require('path');
1414
const prettier = require('prettier');
@@ -211,7 +211,7 @@ function getModuleName(name, size, prefixParts, descriptor) {
211211
const height = parseInt(descriptor.attrs.height, 10);
212212
let prefix = prefixParts
213213
.filter(size => isNaN(size))
214-
.map(pascal)
214+
.map(pascalCase)
215215
.join('');
216216
const isGlyph = width < 16 || height < 16;
217217

@@ -221,25 +221,25 @@ function getModuleName(name, size, prefixParts, descriptor) {
221221
}
222222
if (!size) {
223223
if (isGlyph) {
224-
return prefix + pascal(name) + 'Glyph';
224+
return prefix + pascalCase(name) + 'Glyph';
225225
}
226-
return prefix + pascal(name);
226+
return prefix + pascalCase(name);
227227
}
228-
return prefix + pascal(name) + size;
228+
return prefix + pascalCase(name) + size;
229229
}
230230

231231
if (!size) {
232232
if (isGlyph) {
233-
return pascal(name) + 'Glyph';
233+
return pascalCase(name) + 'Glyph';
234234
}
235-
return pascal(name);
235+
return pascalCase(name);
236236
}
237237

238238
if (isNaN(name[0])) {
239-
return pascal(name) + size;
239+
return pascalCase(name) + size;
240240
}
241241

242-
return '_' + pascal(name) + size;
242+
return '_' + pascalCase(name) + size;
243243
}
244244

245245
function createIconSource(file, descriptor) {

packages/icons-angular/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
"@angular/compiler": "6.1.10",
3939
"@angular/compiler-cli": "6.1.10",
4040
"@angular/core": "6.1.10",
41-
"@carbon/cli-reporter": "^10.3.0",
42-
"@carbon/icons": "^10.8.1",
43-
"change-case": "3.0.2",
41+
"@carbon/cli-reporter": "10.3.0",
42+
"@carbon/icons": "^10.8.0",
43+
"change-case": "4.1.1",
4444
"fs-extra": "7.0.1",
4545
"rollup": "^0.66.6",
4646
"typescript": "2.9.2"

packages/themes/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"@carbon/type": "^10.8.2"
3030
},
3131
"devDependencies": {
32-
"@carbon/cli-reporter": "^10.3.0",
33-
"@carbon/scss-generator": "^10.5.1",
34-
"@carbon/test-utils": "^10.6.1",
35-
"change-case": "^3.1.0",
32+
"@carbon/cli-reporter": "10.3.0",
33+
"@carbon/scss-generator": "^10.5.0",
34+
"@carbon/test-utils": "^10.6.0",
35+
"change-case": "^4.1.1",
3636
"core-js": "^3.0.1",
3737
"fs-extra": "^7.0.1",
3838
"js-yaml": "^3.13.0",

packages/type/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
"@carbon/layout": "^10.7.2"
3737
},
3838
"devDependencies": {
39-
"@carbon/bundler": "^10.5.1",
40-
"@carbon/test-utils": "^10.6.1",
41-
"change-case": "^3.1.0",
39+
"@carbon/bundler": "^10.5.0",
40+
"@carbon/test-utils": "^10.6.0",
41+
"change-case": "^4.1.1",
4242
"rimraf": "^3.0.0"
4343
},
4444
"eyeglass": {

packages/upgrade/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"dependencies": {
2929
"chalk": "^2.4.2",
30-
"change-case": "^3.1.0",
30+
"change-case": "^4.1.1",
3131
"cross-spawn": "^6.0.5",
3232
"fast-glob": "^2.2.6",
3333
"fs-extra": "^7.0.1",

packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
'use strict';
99

10-
const { pascal } = require('change-case');
10+
const { pascalCase } = require('change-case');
1111

1212
/**
1313
* This transform upgrades the import path that teams may be using for icons
@@ -164,23 +164,23 @@ module.exports = (file, api) => {
164164
function getModuleName(name, size, prefixParts) {
165165
const prefix = prefixParts
166166
.filter(size => isNaN(size))
167-
.map(pascal)
167+
.map(pascalCase)
168168
.join('');
169169

170170
if (prefix !== '') {
171171
if (!size) {
172-
return prefix + pascal(name) + 'Glyph';
172+
return prefix + pascalCase(name) + 'Glyph';
173173
}
174-
return prefix + pascal(name) + size;
174+
return prefix + pascalCase(name) + size;
175175
}
176176

177177
if (!size) {
178-
return pascal(name) + 'Glyph';
178+
return pascalCase(name) + 'Glyph';
179179
}
180180

181181
if (isNaN(name[0])) {
182-
return pascal(name) + size;
182+
return pascalCase(name) + size;
183183
}
184184

185-
return '_' + pascal(name) + size;
185+
return '_' + pascalCase(name) + size;
186186
}

0 commit comments

Comments
 (0)