Skip to content

Commit

Permalink
chore(project): update change-case to 4.1.1 (#5090)
Browse files Browse the repository at this point in the history
* chore(project): update change-case to 4.1.1

* fix(upgrade): update change-case usage

Co-authored-by: emyarod <emyarod@users.noreply.github.com>
  • Loading branch information
joshblack and emyarod committed Jan 23, 2020
1 parent 0097e96 commit fe0ef35
Show file tree
Hide file tree
Showing 41 changed files with 155 additions and 170 deletions.
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
10 changes: 5 additions & 5 deletions packages/colors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"clean": "rimraf css es lib umd scss"
},
"devDependencies": {
"@carbon/bundler": "^10.5.1",
"@carbon/cli-reporter": "^10.3.0",
"@carbon/scss-generator": "^10.5.1",
"@carbon/test-utils": "^10.6.1",
"change-case": "^3.0.2",
"@carbon/bundler": "^10.5.0",
"@carbon/cli-reporter": "10.3.0",
"@carbon/scss-generator": "^10.5.0",
"@carbon/test-utils": "^10.6.0",
"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
6 changes: 3 additions & 3 deletions packages/icons-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"@angular/compiler": "6.1.10",
"@angular/compiler-cli": "6.1.10",
"@angular/core": "6.1.10",
"@carbon/cli-reporter": "^10.3.0",
"@carbon/icons": "^10.8.1",
"change-case": "3.0.2",
"@carbon/cli-reporter": "10.3.0",
"@carbon/icons": "^10.8.0",
"change-case": "4.1.1",
"fs-extra": "7.0.1",
"rollup": "^0.66.6",
"typescript": "2.9.2"
Expand Down
8 changes: 4 additions & 4 deletions packages/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"@carbon/type": "^10.8.2"
},
"devDependencies": {
"@carbon/cli-reporter": "^10.3.0",
"@carbon/scss-generator": "^10.5.1",
"@carbon/test-utils": "^10.6.1",
"change-case": "^3.1.0",
"@carbon/cli-reporter": "10.3.0",
"@carbon/scss-generator": "^10.5.0",
"@carbon/test-utils": "^10.6.0",
"change-case": "^4.1.1",
"core-js": "^3.0.1",
"fs-extra": "^7.0.1",
"js-yaml": "^3.13.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"@carbon/layout": "^10.7.2"
},
"devDependencies": {
"@carbon/bundler": "^10.5.1",
"@carbon/test-utils": "^10.6.1",
"change-case": "^3.1.0",
"@carbon/bundler": "^10.5.0",
"@carbon/test-utils": "^10.6.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

0 comments on commit fe0ef35

Please sign in to comment.