Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

refactor: bump change-case (#2428)

Bogdan Chadkinf08fe859bb5e
diff --git a/apps/builder/app/shared/string-utils.ts b/apps/builder/app/shared/string-utils.ts
index c70351d0b7..8d5375f4ed 100644
--- a/apps/builder/app/shared/string-utils.ts
+++ b/apps/builder/app/shared/string-utils.ts
@@ -1,4 +1,4 @@
-import { noCase } from "no-case";
+import { noCase } from "change-case";
import { titleCase } from "title-case";
// Initialize the cache with abbreviations that don't follow the title case rules.
diff --git a/apps/builder/package.json b/apps/builder/package.json
index 4e2ceb35b9..837bad4698 100644
--- a/apps/builder/package.json
+++ b/apps/builder/package.json
@@ -70,6 +70,7 @@
"@webstudio-is/sdk-components-react-radix": "workspace:*",
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"@webstudio-is/trpc-interface": "workspace:*",
+ "change-case": "^5.0.2",
"colord": "^2.9.3",
"date-fns": "^2.30.0",
"debug": "^4.3.4",
@@ -89,7 +90,6 @@
"nanoevents": "^8.0.0",
"nanoid": "^4.0.2",
"nanostores": "^0.9.3",
- "no-case": "^3.0.4",
"node-fetch": "^3.3.1",
"pretty-bytes": "^6.1.1",
"prismjs": "^1.29.0",
@@ -107,7 +107,7 @@
"shallow-equal": "^3.1.0",
"slugify": "^1.6.6",
"strip-indent": "^4.0.0",
- "title-case": "^3.0.3",
+ "title-case": "^4.1.0",
"untruncate-json": "^0.0.1",
"use-debounce": "^9.0.4",
"uuid": "^9.0.0",
diff --git a/apps/builder/remix.config.js b/apps/builder/remix.config.js
index 7067e42298..ae380fcac1 100644
--- a/apps/builder/remix.config.js
+++ b/apps/builder/remix.config.js
@@ -36,7 +36,8 @@ module.exports = {
"node-fetch",
"immerhin",
"strip-indent",
- "camelcase",
+ "change-case",
+ "title-case",
],
// appDirectory: "app",
// assetsBuildDirectory: "public/build",
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 7600e33863..eb92efdf0a 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -38,7 +38,7 @@
"picocolors": "^1.0.0",
"prompts": "^2.4.2",
"strip-indent": "^4.0.0",
- "title-case": "^3.0.3",
+ "title-case": "^4.1.0",
"yargs": "^17.7.2",
"zod": "^3.21.4"
},
diff --git a/packages/css-data/bin/mdn-data.ts b/packages/css-data/bin/mdn-data.ts
index 8bac9826ff..107f5d4439 100755
--- a/packages/css-data/bin/mdn-data.ts
+++ b/packages/css-data/bin/mdn-data.ts
@@ -7,7 +7,7 @@ import { parse, definitionSyntax, type DSNode, type CssNode } from "css-tree";
import properties from "mdn-data/css/properties.json";
import syntaxes from "mdn-data/css/syntaxes.json";
import data from "css-tree/dist/data";
-import camelCase from "camelcase";
+import { camelCase } from "change-case";
import type {
KeywordValue,
StyleValue,
diff --git a/packages/css-data/package.json b/packages/css-data/package.json
index 472c25dd25..891cde428b 100644
--- a/packages/css-data/package.json
+++ b/packages/css-data/package.json
@@ -20,7 +20,6 @@
"@webstudio-is/jest-config": "workspace:*",
"@webstudio-is/react-sdk": "workspace:*",
"@webstudio-is/tsconfig": "workspace:*",
- "camelcase": "^7.0.1",
"html-tags": "^3.3.1",
"mdn-data": "2.0.32",
"tsx": "^3.12.8",
@@ -47,6 +46,7 @@
"@unocss/core": "^0.56.4",
"@unocss/preset-uno": "^0.56.4",
"@webstudio-is/css-engine": "workspace:*",
+ "change-case": "^5.0.2",
"colord": "^2.9.3",
"css-tree": "^2.3.1",
"hyphenate-style-name": "^1.0.4",
diff --git a/packages/css-data/src/tailwind-parser/parse.ts b/packages/css-data/src/tailwind-parser/parse.ts
index aad0d39005..9aa59a68b8 100644
--- a/packages/css-data/src/tailwind-parser/parse.ts
+++ b/packages/css-data/src/tailwind-parser/parse.ts
@@ -1,5 +1,5 @@
import * as csstree from "css-tree";
-import camelCase from "camelcase";
+import { camelCase } from "change-case";
import { UnoGenerator, createGenerator } from "@unocss/core";
import { type Theme, presetUno } from "@unocss/preset-uno";
import type { EmbedTemplateStyleDecl } from "@webstudio-is/react-sdk";
diff --git a/packages/design-system/bin/transform-figma-tokens.ts b/packages/design-system/bin/transform-figma-tokens.ts
index 38e18d904a..4512eb4bce 100644
--- a/packages/design-system/bin/transform-figma-tokens.ts
+++ b/packages/design-system/bin/transform-figma-tokens.ts
@@ -2,7 +2,7 @@
import { readFileSync, writeFileSync, existsSync, rmSync } from "node:fs";
import { execSync } from "node:child_process";
-import camelCase from "camelcase";
+import { camelCase } from "change-case";
import { z, type ZodType, type ZodTypeDef } from "zod";
const SOURCE_FILE = "./src/__generated__/figma-design-tokens.json";
diff --git a/packages/design-system/package.json b/packages/design-system/package.json
index cf39b14d53..14cea8c58e 100644
--- a/packages/design-system/package.json
+++ b/packages/design-system/package.json
@@ -66,7 +66,7 @@
"@stitches/react": "1.3.1-1",
"@webstudio-is/css-vars": "workspace:*",
"@webstudio-is/icons": "workspace:*",
- "camelcase": "^7.0.1",
+ "change-case": "^5.0.2",
"downshift": "^6.1.7",
"immer": "^10.0.3",
"match-sorter": "^6.3.1",
diff --git a/packages/react-sdk/package.json b/packages/react-sdk/package.json
index 06c45c1bee..c1df6a2209 100644
--- a/packages/react-sdk/package.json
+++ b/packages/react-sdk/package.json
@@ -39,11 +39,11 @@
"@webstudio-is/fonts": "workspace:*",
"@webstudio-is/image": "workspace:*",
"@webstudio-is/sdk": "workspace:*",
+ "change-case": "^5.0.2",
"html-tags": "^3.3.1",
"jsep": "^1.3.8",
"nanoid": "^4.0.2",
- "no-case": "^3.0.4",
- "title-case": "^3.0.3"
+ "title-case": "^4.1.0"
},
"exports": {
".": {
diff --git a/packages/react-sdk/src/embed-template.ts b/packages/react-sdk/src/embed-template.ts
index 409a81109b..f3985c59a8 100644
--- a/packages/react-sdk/src/embed-template.ts
+++ b/packages/react-sdk/src/embed-template.ts
@@ -1,7 +1,7 @@
import { z } from "zod";
import { nanoid } from "nanoid";
import { titleCase } from "title-case";
-import { noCase } from "no-case";
+import { noCase } from "change-case";
import type {
Instance,
Prop,
diff --git a/packages/sdk-cli/package.json b/packages/sdk-cli/package.json
index de63ba2206..f57e995810 100644
--- a/packages/sdk-cli/package.json
+++ b/packages/sdk-cli/package.json
@@ -21,7 +21,7 @@
"@webstudio-is/react-sdk": "workspace:^",
"@webstudio-is/sdk": "workspace:^",
"@webstudio-is/sdk-components-react": "workspace:^",
- "param-case": "^3.0.4"
+ "change-case": "^5.0.2"
},
"devDependencies": {
"@types/node": "^18.17.1",
diff --git a/packages/sdk-cli/src/generate-stories.ts b/packages/sdk-cli/src/generate-stories.ts
index e6fa2bf28d..f406ad5842 100644
--- a/packages/sdk-cli/src/generate-stories.ts
+++ b/packages/sdk-cli/src/generate-stories.ts
@@ -1,6 +1,6 @@
import { dirname, join } from "node:path";
import { mkdir, writeFile } from "node:fs/promises";
-import { paramCase } from "param-case";
+import { kebabCase } from "change-case";
import {
type Instances,
type Instance,
@@ -192,7 +192,7 @@ export const generateStories = async () => {
);
content += getStoriesExports(name, css);
await writeFile(
- join(storiesDir, paramCase(name) + ".stories.tsx"),
+ join(storiesDir, kebabCase(name) + ".stories.tsx"),
content
);
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7432804e04..ea9c10d834 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -211,6 +211,9 @@ importers:
'@webstudio-is/trpc-interface':
specifier: workspace:*
version: link:../../packages/trpc-interface
+ change-case:
+ specifier: ^5.0.2
+ version: 5.0.2
colord:
specifier: ^2.9.3
version: 2.9.3
@@ -268,9 +271,6 @@ importers:
nanostores:
specifier: ^0.9.3
version: 0.9.3
- no-case:
- specifier: ^3.0.4
- version: 3.0.4
node-fetch:
specifier: ^3.3.1
version: 3.3.1
@@ -323,8 +323,8 @@ importers:
specifier: ^4.0.0
version: 4.0.0
title-case:
- specifier: ^3.0.3
- version: 3.0.3
+ specifier: ^4.1.0
+ version: 4.1.0
untruncate-json:
specifier: ^0.0.1
version: 0.0.1
@@ -844,8 +844,8 @@ importers:
specifier: ^4.0.0
version: 4.0.0
title-case:
- specifier: ^3.0.3
- version: 3.0.3
+ specifier: ^4.1.0
+ version: 4.1.0
yargs:
specifier: ^17.7.2
version: 17.7.2
@@ -883,6 +883,9 @@ importers:
'@webstudio-is/css-engine':
specifier: workspace:*
version: link:../css-engine
+ change-case:
+ specifier: ^5.0.2
+ version: 5.0.2
colord:
specifier: ^2.9.3
version: 2.9.3
@@ -911,9 +914,6 @@ importers:
'@webstudio-is/tsconfig':
specifier: workspace:*
version: link:../tsconfig
- camelcase:
- specifier: ^7.0.1
- version: 7.0.1
html-tags:
specifier: ^3.3.1
version: 3.3.1
@@ -1099,9 +1099,9 @@ importers:
'@webstudio-is/icons':
specifier: workspace:*
version: link:../icons
- camelcase:
- specifier: ^7.0.1
- version: 7.0.1
+ change-case:
+ specifier: ^5.0.2
+ version: 5.0.2
downshift:
specifier: ^6.1.7
version: 6.1.7([email protected])
@@ -1575,6 +1575,9 @@ importers:
'@webstudio-is/sdk':
specifier: workspace:*
version: link:../sdk
+ change-case:
+ specifier: ^5.0.2
+ version: 5.0.2
html-tags:
specifier: ^3.3.1
version: 3.3.1
@@ -1584,12 +1587,9 @@ importers:
nanoid:
specifier: ^4.0.2
version: 4.0.2
- no-case:
- specifier: ^3.0.4
- version: 3.0.4
title-case:
- specifier: ^3.0.3
- version: 3.0.3
+ specifier: ^4.1.0
+ version: 4.1.0
devDependencies:
'@jest/globals':
specifier: ^29.7.0
@@ -1683,9 +1683,9 @@ importers:
'@webstudio-is/sdk-components-react':
specifier: workspace:^
version: link:../sdk-components-react
- param-case:
- specifier: ^3.0.4
- version: 3.0.4
+ change-case:
+ specifier: ^5.0.2
+ version: 5.0.2
devDependencies:
'@types/node':
specifier: ^18.17.1
@@ -9279,10 +9279,6 @@ packages:
engines: {node: '>=10'}
dev: true
- resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==}
- engines: {node: '>=14.16'}
-
resolution: {integrity: sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==}
@@ -9310,6 +9306,10 @@ packages:
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
dev: false
+ resolution: {integrity: sha512-tH6YZXViaeC2/Mnt8m4gSmbZfNorC2rhwCX2bXw8SYZWr8ljCPB7iA+1TLG9t7yroWBFauc63LlOZ1gucMVCWw==}
+ dev: false
+
resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==}
engines: {node: '>=10'}
@@ -10015,13 +10015,6 @@ packages:
domhandler: 5.0.3
dev: true
- resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==}
- dependencies:
- no-case: 3.0.4
- tslib: 2.6.0
- dev: false
-
resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==}
engines: {node: '>=12'}
@@ -12865,12 +12858,6 @@ packages:
dependencies:
js-tokens: 4.0.0
- resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==}
- dependencies:
- tslib: 2.6.0
- dev: false
-
resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==}
engines: {node: '>=8'}
@@ -14093,13 +14080,6 @@ packages:
engines: {node: '>= 0.4.0'}
dev: true
- resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==}
- dependencies:
- lower-case: 2.0.2
- tslib: 2.6.0
- dev: false
-
resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==}
requiresBuild: true
@@ -14493,13 +14473,6 @@ packages:
resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==}
- resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==}
- dependencies:
- dot-case: 3.0.4
- tslib: 2.6.0
- dev: false
-
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
@@ -16517,10 +16490,8 @@ packages:
resolution: {integrity: sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==}
dev: false
- resolution: {integrity: sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==}
- dependencies:
- tslib: 2.6.0
+ resolution: {integrity: sha512-X6j4JkYviJJ7jPVuBkd1geC35pq+3J5z3q1N5z57FIhBooKQqrO4B7C6dy3RzSJIKYB6Ze0/G3KcWtinzO7MGg==}
dev: false