diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bd708d36ed08..89d8d81a9ca0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,8 +44,6 @@ jobs: with: pnpm: true use-version-file: true - # We only want to install required production packages - install-flags: --prod - name: Use GNU tar instead BSD tar # This ensures that we use GNU `tar` which is more efficient for extracting caches's diff --git a/apps/site/.stylelintrc.mjs b/apps/site/.stylelintrc.mjs index c618c7b3dca9e..cbb76b9e67ca4 100644 --- a/apps/site/.stylelintrc.mjs +++ b/apps/site/.stylelintrc.mjs @@ -26,7 +26,7 @@ export default { plugins: [ 'stylelint-order', 'stylelint-selector-bem-pattern', - '@node-core/ui-components/stylelint/one-utility-class-per-line.mjs', + '@node-core/ui-components/src/stylelint/one-utility-class-per-line.mjs', ], rules: { // Enforces Element Class Names to be camelCase diff --git a/apps/site/styles/index.css b/apps/site/styles/index.css index 3152e8f4b9fb6..35adb9095d290 100644 --- a/apps/site/styles/index.css +++ b/apps/site/styles/index.css @@ -6,6 +6,17 @@ * @see https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint */ -@import '@node-core/ui-components/styles/index.css'; +@import 'tailwindcss'; +@import '@node-core/ui-components/src/styles/index.css'; @import '@node-core/rehype-shiki/index.css'; -@import './locales.css'; + +/** + * To enhance readability for Korean users, line spacing is increased, + * line breaks in the middle of words are prevented, and long words are + * managed to avoid disrupting the layout. + */ +html[lang='ko'] { + @apply leading-7 + break-words + break-keep; +} diff --git a/apps/site/styles/locales.css b/apps/site/styles/locales.css deleted file mode 100644 index a78674db1d9b8..0000000000000 --- a/apps/site/styles/locales.css +++ /dev/null @@ -1,10 +0,0 @@ -/** - * To enhance readability for Korean users, line spacing is increased, - * line breaks in the middle of words are prevented, and long words are - * managed to avoid disrupting the layout. - */ -html[lang='ko'] { - @apply leading-7 - break-words - break-keep; -} diff --git a/apps/site/turbo.json b/apps/site/turbo.json index 3bbae309e2e92..a4977e9cb8273 100644 --- a/apps/site/turbo.json +++ b/apps/site/turbo.json @@ -3,7 +3,7 @@ "extends": ["//"], "tasks": { "dev": { - "dependsOn": ["build:blog-data"], + "dependsOn": ["build:blog-data", "build:twoslash-fsmap", "^build"], "cache": false, "persistent": true, "env": [ @@ -115,7 +115,7 @@ "cache": false }, "test:unit": { - "dependsOn": ["build:blog-data"], + "dependsOn": ["build:blog-data", "build:twoslash-fsmap", "^build"], "inputs": [ "{app,components,hooks,i18n,layouts,middlewares,pages,providers,types,util}/**/*.{ts,tsx,mjs}", "{app,components,layouts,pages,styles}/**/*.css", @@ -142,7 +142,7 @@ "outputs": ["generated/twoslash-fsmap.json"] }, "cloudflare:build:worker": { - "dependsOn": ["build:blog-data", "build:twoslash-fsmap"], + "dependsOn": ["build:blog-data", "build:twoslash-fsmap", "^build"], "inputs": [ "{app,components,hooks,i18n,layouts,middlewares,pages,providers,types,util}/**/*.{ts,tsx}", "{app,components,layouts,pages,styles}/**/*.css", diff --git a/apps/site/vercel.json b/apps/site/vercel.json index 9923ea6cf94e6..b767ff0b425cd 100644 --- a/apps/site/vercel.json +++ b/apps/site/vercel.json @@ -1,5 +1,5 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "installCommand": "pnpm install --prod --frozen-lockfile", + "installCommand": "pnpm install --frozen-lockfile", "ignoreCommand": "[[ \"$VERCEL_GIT_COMMIT_REF\" =~ \"^dependabot/.*\" || \"$VERCEL_GIT_COMMIT_REF\" =~ \"^gh-readonly-queue/.*\" ]]" } diff --git a/package.json b/package.json index 225f534557e08..7a9ff66a073e1 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "name": "Node.js Website Team and Contributors" }, "scripts": { - "compile": "turbo compile", "build": "turbo build", "cloudflare:deploy": "turbo cloudflare:deploy", "cloudflare:preview": "turbo cloudflare:preview", diff --git a/packages/rehype-shiki/package.json b/packages/rehype-shiki/package.json index ac73d3030e02e..b680420ed55ad 100644 --- a/packages/rehype-shiki/package.json +++ b/packages/rehype-shiki/package.json @@ -20,9 +20,9 @@ "directory": "packages/rehype-shiki" }, "scripts": { - "compile:ts": "tsc", - "compile": "node --run compile:ts", - "release": "node --run compile", + "build:ts": "tsc", + "build": "node --run build:ts", + "release": "node --run build", "lint": "node --run lint:js", "lint:fix": "node --run lint:js:fix", "lint:js": "eslint \"**/*.mjs\"", diff --git a/packages/ui-components/README.md b/packages/ui-components/README.md index b1f590f2dc541..061652eea6240 100644 --- a/packages/ui-components/README.md +++ b/packages/ui-components/README.md @@ -17,7 +17,7 @@ compiled outputs and keep them updated while you work. ```bash # From nodejs.org/packages/ui-components pnpm install -node --run compile:watch +node --run build:watch # In another terminal, still in nodejs.org/packages/ui-components npm link @@ -26,5 +26,5 @@ npm link npm link @node-core/ui-components ``` -The `compile:watch` script keeps `dist/` up to date so consumers resolve compiled +The `build:watch` script keeps `dist/` up to date so consumers resolve compiled CSS and JavaScript instead of the raw Tailwind source. diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index 360be6fe4d6ba..b05e7e5119a64 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -1,22 +1,29 @@ { "name": "@node-core/ui-components", - "version": "1.7.0", + "version": "1.7.1", "type": "module", "exports": { "./*": { - "rolldown": [ - "./dist/*", - "./dist/*.js", - "./dist/*/index.js" - ], - "default": [ + "types": [ "./src/*", "./src/*.tsx", "./src/*/index.tsx", "./src/*.ts", "./src/*/index.ts" + ], + "default": [ + "./dist/*", + "./dist/*.js", + "./dist/*/index.js" ] - } + }, + "./src/*": [ + "./src/*", + "./src/*.tsx", + "./src/*/index.tsx", + "./src/*.ts", + "./src/*/index.ts" + ] }, "repository": { "type": "git", @@ -24,11 +31,10 @@ "directory": "packages/ui-components" }, "scripts": { - "compile:ts": "tsc", - "compile:css": "postcss --dir dist --base src \"src/**/*.module.css\" src/styles/index.css", - "compile": "node --run compile:ts && node --run compile:css", - "compile:watch": "concurrently -k \"node --run compile:ts -- --watch\" \"node --run compile:css -- --watch\"", - "release": "node --run compile", + "build": "node --run build:ts && node --run build:css", + "build:css": "postcss --dir dist --base src \"src/**/*.module.css\" src/styles/index.css", + "build:ts": "tsc", + "build:watch": "concurrently -k \"node --run build:ts -- --watch\" \"node --run build:css -- --watch\"", "lint": "node --run lint:js && node --run lint:css", "lint:css": "stylelint \"**/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache", "lint:css:fix": "node --run lint:css -- --fix", @@ -36,6 +42,7 @@ "lint:js": "eslint \"**/*.{js,mjs,ts,tsx}\"", "lint:js:fix": "node --run lint:js -- --fix", "lint:types": "tsc --noEmit", + "release": "node --run build", "storybook": "cross-env NODE_NO_WARNINGS=1 storybook dev -p 6006 --quiet", "storybook:build": "cross-env NODE_NO_WARNINGS=1 storybook build --quiet --webpack-stats-json", "test": "node --run test:unit", @@ -54,15 +61,9 @@ "@radix-ui/react-separator": "^1.1.8", "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-tooltip": "^1.2.8", - "@tailwindcss/postcss": "~4.3.0", - "@types/react": "catalog:", "@vcarl/remark-headings": "~0.1.0", "classnames": "catalog:", - "postcss-calc": "10.1.1", - "postcss-cli": "11.0.1", - "react": "catalog:", - "tailwindcss": "catalog:", - "typescript": "catalog:" + "react": "catalog:" }, "devDependencies": { "@eslint-react/eslint-plugin": "~5.8.6", @@ -71,8 +72,10 @@ "@storybook/addon-themes": "~10.4.1", "@storybook/addon-webpack5-compiler-swc": "~4.0.3", "@storybook/react-webpack5": "~10.4.1", + "@tailwindcss/postcss": "~4.3.0", "@testing-library/user-event": "~14.6.1", "@types/node": "catalog:", + "@types/react": "catalog:", "concurrently": "9.2.1", "cross-env": "catalog:", "css-loader": "7.1.4", @@ -80,6 +83,8 @@ "eslint-plugin-react-hooks": "7.1.1", "eslint-plugin-storybook": "10.3.3", "global-jsdom": "29.0.0", + "postcss-calc": "~10.1.1", + "postcss-cli": "^11.0.1", "postcss-loader": "8.2.1", "storybook": "~10.4.1", "style-loader": "4.0.0", @@ -87,7 +92,9 @@ "stylelint-config-standard": "40.0.0", "stylelint-order": "8.1.1", "stylelint-selector-bem-pattern": "4.0.1", - "tsx": "4.22.3" + "tailwindcss": "catalog:", + "tsx": "4.22.3", + "typescript": "catalog:" }, "imports": { "#ui/*": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e700e1a4496a..a9151c0969e26 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -703,33 +703,15 @@ importers: '@radix-ui/react-tooltip': specifier: ^1.2.8 version: 1.2.8(@types/react@19.2.16)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) - '@tailwindcss/postcss': - specifier: ~4.3.0 - version: 4.3.0 - '@types/react': - specifier: 'catalog:' - version: 19.2.16 '@vcarl/remark-headings': specifier: ~0.1.0 version: 0.1.0 classnames: specifier: 'catalog:' version: 2.5.1 - postcss-calc: - specifier: 10.1.1 - version: 10.1.1(postcss@8.5.15) - postcss-cli: - specifier: 11.0.1 - version: 11.0.1(jiti@2.7.0)(postcss@8.5.15)(tsx@4.22.3) react: specifier: 'catalog:' version: 19.2.6 - tailwindcss: - specifier: 'catalog:' - version: 4.1.18 - typescript: - specifier: 'catalog:' - version: 5.9.3 devDependencies: '@eslint-react/eslint-plugin': specifier: ~5.8.6 @@ -749,12 +731,18 @@ importers: '@storybook/react-webpack5': specifier: ~10.4.1 version: 10.4.1(@swc/core@1.15.40)(@types/react@19.2.16)(postcss@8.5.15)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(storybook@10.4.1(@testing-library/dom@10.4.0)(@types/react@19.2.16)(prettier@3.8.3)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(typescript@5.9.3) + '@tailwindcss/postcss': + specifier: ~4.3.0 + version: 4.3.0 '@testing-library/user-event': specifier: ~14.6.1 version: 14.6.1(@testing-library/dom@10.4.0) '@types/node': specifier: 'catalog:' version: 24.10.1 + '@types/react': + specifier: 'catalog:' + version: 19.2.16 concurrently: specifier: 9.2.1 version: 9.2.1 @@ -776,6 +764,12 @@ importers: global-jsdom: specifier: 29.0.0 version: 29.0.0(jsdom@29.1.1(@noble/hashes@1.8.0)) + postcss-calc: + specifier: ~10.1.1 + version: 10.1.1(postcss@8.5.15) + postcss-cli: + specifier: ^11.0.1 + version: 11.0.1(jiti@2.7.0)(postcss@8.5.15)(tsx@4.22.3) postcss-loader: specifier: 8.2.1 version: 8.2.1(postcss@8.5.15)(typescript@5.9.3)(webpack@5.107.2(@swc/core@1.15.40)(postcss@8.5.15)) @@ -797,9 +791,15 @@ importers: stylelint-selector-bem-pattern: specifier: 4.0.1 version: 4.0.1(stylelint@17.9.1(typescript@5.9.3)) + tailwindcss: + specifier: 'catalog:' + version: 4.1.18 tsx: specifier: 4.22.3 version: 4.22.3 + typescript: + specifier: 'catalog:' + version: 5.9.3 packages: diff --git a/turbo.json b/turbo.json index e4f62db3943b8..05d180f75104f 100644 --- a/turbo.json +++ b/turbo.json @@ -8,9 +8,6 @@ "//#prettier:fix": { "outputs": [".prettiercache"] }, - "compile": { - "dependsOn": ["^topo"] - }, "build": { "dependsOn": ["^topo"] },