Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(project): update change-case to 4.1.1 #5090

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .yarn/offline-mirror/camel-case-4.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/capital-case-1.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/change-case-3.0.2.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/change-case-3.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/change-case-4.1.1.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/constant-case-2.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/constant-case-3.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/dot-case-2.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/dot-case-3.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/header-case-1.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/header-case-2.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/is-lower-case-1.1.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/is-upper-case-1.1.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/lower-case-2.0.1.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/lower-case-first-1.0.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/no-case-3.0.3.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/param-case-3.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/pascal-case-2.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/pascal-case-3.1.1.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/path-case-2.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/path-case-3.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/sentence-case-2.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/sentence-case-3.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/snake-case-2.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/snake-case-3.0.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/swap-case-1.1.2.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/title-case-2.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/upper-case-2.0.1.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/upper-case-first-1.1.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/upper-case-first-2.0.1.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"autoprefixer": "^9.4.3",
"babel-plugin-macros": "^2.4.2",
"chalk": "^2.4.1",
"change-case": "^3.0.2",
"change-case": "^4.1.1",
"cli-table": "^0.3.1",
"commander": "^2.19.0",
"cssnano": "^4.1.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/colors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@carbon/cli-reporter": "10.3.0",
"@carbon/scss-generator": "^10.5.0",
"@carbon/test-utils": "^10.6.0",
"change-case": "^3.0.2",
"change-case": "^4.1.1",
"core-js": "^3.0.1",
"fs-extra": "^7.0.0",
"node-sass": "^4.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/icon-build-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@carbon/cli-reporter": "10.3.0",
"@carbon/icon-helpers": "^10.5.0",
"browserslist-config-carbon": "10.4.0",
"change-case": "^3.0.2",
"change-case": "^4.1.1",
"core-js": "^3.1.3",
"fs-extra": "^7.0.0",
"joi": "^14.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/icon-build-helpers/src/builders/react/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

const { camel } = require('change-case');
const { camelCase } = require('change-case');
const { reporter } = require('@carbon/cli-reporter');
const fs = require('fs-extra');
const path = require('path');
Expand Down Expand Up @@ -269,7 +269,7 @@ function shouldTransformAttribute(attribute) {
function formatAttributes(attrs) {
return Object.keys(attrs).reduce((acc, key, index) => {
const attribute = shouldTransformAttribute(key)
? `${camel(key)}="${attrs[key]}"`
? `${camelCase(key)}="${attrs[key]}"`
: `${key}="${attrs[key]}"`;

if (index === 0) {
Expand Down
18 changes: 9 additions & 9 deletions packages/icon-build-helpers/src/builders/vanilla/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'use strict';

const { reporter } = require('@carbon/cli-reporter');
const { pascal } = require('change-case');
const { pascalCase } = require('change-case');
const fs = require('fs-extra');
const path = require('path');
const prettier = require('prettier');
Expand Down Expand Up @@ -211,7 +211,7 @@ function getModuleName(name, size, prefixParts, descriptor) {
const height = parseInt(descriptor.attrs.height, 10);
let prefix = prefixParts
.filter(size => isNaN(size))
.map(pascal)
.map(pascalCase)
.join('');
const isGlyph = width < 16 || height < 16;

Expand All @@ -221,25 +221,25 @@ function getModuleName(name, size, prefixParts, descriptor) {
}
if (!size) {
if (isGlyph) {
return prefix + pascal(name) + 'Glyph';
return prefix + pascalCase(name) + 'Glyph';
}
return prefix + pascal(name);
return prefix + pascalCase(name);
}
return prefix + pascal(name) + size;
return prefix + pascalCase(name) + size;
}

if (!size) {
if (isGlyph) {
return pascal(name) + 'Glyph';
return pascalCase(name) + 'Glyph';
}
return pascal(name);
return pascalCase(name);
}

if (isNaN(name[0])) {
return pascal(name) + size;
return pascalCase(name) + size;
}

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

function createIconSource(file, descriptor) {
Expand Down
2 changes: 1 addition & 1 deletion packages/icons-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@angular/core": "6.1.10",
"@carbon/cli-reporter": "10.3.0",
"@carbon/icons": "^10.8.0",
"change-case": "3.0.2",
"change-case": "4.1.1",
"fs-extra": "7.0.1",
"rollup": "^0.66.6",
"typescript": "2.9.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@carbon/cli-reporter": "10.3.0",
"@carbon/scss-generator": "^10.5.0",
"@carbon/test-utils": "^10.6.0",
"change-case": "^3.1.0",
"change-case": "^4.1.1",
"core-js": "^3.0.1",
"fs-extra": "^7.0.1",
"js-yaml": "^3.13.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"@carbon/bundler": "^10.5.0",
"@carbon/test-utils": "^10.6.0",
"change-case": "^3.1.0",
"change-case": "^4.1.1",
"rimraf": "^3.0.0"
},
"eyeglass": {
Expand Down
2 changes: 1 addition & 1 deletion packages/upgrade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"chalk": "^2.4.2",
"change-case": "^3.1.0",
"change-case": "^4.1.1",
"cross-spawn": "^6.0.5",
"fast-glob": "^2.2.6",
"fs-extra": "^7.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

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

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

if (prefix !== '') {
if (!size) {
return prefix + pascal(name) + 'Glyph';
return prefix + pascalCase(name) + 'Glyph';
}
return prefix + pascal(name) + size;
return prefix + pascalCase(name) + size;
}

if (!size) {
return pascal(name) + 'Glyph';
return pascalCase(name) + 'Glyph';
}

if (isNaN(name[0])) {
return pascal(name) + size;
return pascalCase(name) + size;
}

return '_' + pascal(name) + size;
return '_' + pascalCase(name) + size;
}
Loading