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(clerk-js): Remove UI and tailwind transformer packages #5225

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 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
5 changes: 5 additions & 0 deletions .changeset/witty-apes-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Remove an internally used package called `@clerk/ui` that is no longer being used. You'll see no difference in your current usage of `@clerk/clerk-js`.
7 changes: 0 additions & 7 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,6 @@ export default tseslint.config([
],
},
},
{
name: 'packages/ui',
files: ['packages/ui/src/**/*'],
rules: {
'import/no-unresolved': ['error', { ignore: ['^#', '^~', '@clerk/elements/*'] }],
},
},
{
name: 'packages/upgrade',
files: ['packages/upgrade/src/**/*'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"changeset": "changeset",
"changeset:empty": "pnpm changeset --empty",
"clean": "turbo clean",
"dev": "TURBO_UI=0 FORCE_COLOR=1 turbo dev --filter=@clerk/* --filter=!@clerk/clerk-expo --filter=!@clerk/tanstack-start --filter=!@clerk/elements --filter=!@clerk/tailwindcss-transformer --filter=!@clerk/remix --filter=!@clerk/ui --filter=!@clerk/chrome-extension",
"dev": "TURBO_UI=0 FORCE_COLOR=1 turbo dev --filter=@clerk/* --filter=!@clerk/clerk-expo --filter=!@clerk/tanstack-start --filter=!@clerk/elements --filter=!@clerk/remix --filter=!@clerk/chrome-extension",
"dev:js": "TURBO_UI=0 FORCE_COLOR=1 turbo dev:current --filter=@clerk/clerk-js",
"format": "prettier --write .",
"format:check": "prettier --cache --check .",
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/bundlewatch.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"files": [
{ "path": "./dist/clerk.js", "maxSize": "560kB" },
{ "path": "./dist/clerk.browser.js", "maxSize": "75kB" },
{ "path": "./dist/clerk.headless.js", "maxSize": "48kB" },
{ "path": "./dist/clerk.headless.js", "maxSize": "48.1kB" },
{ "path": "./dist/ui-common*.js", "maxSize": "89KB" },
{ "path": "./dist/vendors*.js", "maxSize": "25KB" },
{ "path": "./dist/coinbase*.js", "maxSize": "35.5KB" },
Expand Down
44 changes: 4 additions & 40 deletions packages/clerk-js/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,14 @@ const common = ({ mode, disableRHC = false }) => {
minChunks: 1,
name: 'ui-common',
priority: -20,
test: module =>
module.resource &&
!module.resource.includes('/ui/components') &&
!module.resource.includes('packages/elements') &&
!module.resource.includes('packages/ui'),
test: module => module.resource && !module.resource.includes('/ui/components'),
},
defaultVendors: {
minChunks: 1,
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
priority: -10,
},
commonNew: {
minChunks: 2,
name: 'common-new',
chunks(chunk) {
return !!chunk.name?.startsWith('rebuild--');
},
priority: 0,
},
react: {
chunks: 'all',
test: /[\\/]node_modules[\\/](react-dom|scheduler)[\\/]/,
Expand Down Expand Up @@ -216,38 +204,14 @@ const typescriptLoaderDev = () => {
];
};

/**
* Used in outputs that utilize chunking, and returns a URL to the stylesheet.
* @type { () => (import('@rspack/core').RuleSetRule) }
*/
const clerkUICSSLoader = () => {
// This emits a module exporting a URL to the styles.css file.
return {
test: /packages\/ui\/dist\/styles\.css/,
type: 'asset/resource',
};
};

/**
* Used in outputs that _do not_ utilize chunking, and returns the contents of the stylesheet.
* @type { () => (import('@rspack/core').RuleSetRule) }
*/
const clerkUICSSSourceLoader = () => {
// This emits a module exporting the contents of the styles.css file.
return {
test: /packages\/ui\/dist\/styles\.css/,
type: 'asset/source',
};
};

/**
* Used for production builds that have dynamicly loaded chunks.
* @type { () => (import('@rspack/core').Configuration) }
* */
const commonForProdChunked = () => {
return {
module: {
rules: [svgLoader(), ...typescriptLoaderProd(), clerkUICSSLoader()],
rules: [svgLoader(), ...typescriptLoaderProd()],
},
};
};
Expand All @@ -259,7 +223,7 @@ const commonForProdChunked = () => {
const commonForProdBundled = () => {
return {
module: {
rules: [svgLoader(), ...typescriptLoaderProd(), clerkUICSSSourceLoader()],
rules: [svgLoader(), ...typescriptLoaderProd()],
},
};
};
Expand Down Expand Up @@ -495,7 +459,7 @@ const devConfig = ({ mode, env }) => {
const commonForDev = () => {
return {
module: {
rules: [svgLoader(), ...typescriptLoaderDev(), clerkUICSSLoader()],
rules: [svgLoader(), ...typescriptLoaderDev()],
},
plugins: [
new ReactRefreshPlugin(/** @type {any} **/ ({ overlay: { sockHost: devUrl.host } })),
Expand Down
5 changes: 0 additions & 5 deletions packages/clerk-js/src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
declare module '@clerk/ui/styles.css' {
const content: string;
export default content;
}

declare module '*.svg' {
const value: React.FC<React.SVGAttributes<SVGElement>>;
export default value;
Expand Down
1 change: 0 additions & 1 deletion packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"build:declarations": "tsc --env.NODE_ENV production -p tsconfig.json",
"dev": "tsup --env.NODE_ENV development --watch",
"dev:example": "concurrently \"pnpm dev\" \"pnpm app:dev\"",
"dev:theme-builder": "TURBO_UI=0 concurrently --prefix-colors auto --names \"elements,ui,theme-builder\" \"turbo dev --filter=@clerk/elements\" \"pnpm dev -w @clerk/ui\" \"cd ../ui/theme-builder && pnpm dev\"",
"lint": "eslint src/",
"lint:attw": "attw --pack . --profile node16",
"lint:publint": "publint",
Expand Down
7 changes: 0 additions & 7 deletions packages/tailwindcss-transformer/CHANGELOG.md

This file was deleted.

21 changes: 0 additions & 21 deletions packages/tailwindcss-transformer/LICENSE

This file was deleted.

69 changes: 0 additions & 69 deletions packages/tailwindcss-transformer/README.md

This file was deleted.

20 changes: 0 additions & 20 deletions packages/tailwindcss-transformer/jest.config.js

This file was deleted.

40 changes: 0 additions & 40 deletions packages/tailwindcss-transformer/package.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading