Skip to content

Commit e920442

Browse files
Prefix internal modules with internal-* (#14074)
Last week we discussed bringing in some consistency for our non-public npm packages in the repo. We discussed using custom namespaces (e.g. `@tailwindcss-internal`) vs. simple prefixes but it does not matter too much if we are both consistent with our pattern and it's easy for us to see whether a plugin is public or not. Since we have a mixture of public namespaced (`@tailwindcss/*`) and non-namespaced (`tailwindcss`) packages, I think it would be best if we use a prefix to signal internal dependencies. This PR proposes we use `internal-*` as the prefix and renames `test-utils` to `internal-example-plugin` (since, really, this package is just an example for the Tailwind plugin system).
1 parent a2159e8 commit e920442

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

packages/@tailwindcss-postcss/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
"@types/node": "^20.12.12",
4040
"@types/postcss-import": "^14.0.3",
4141
"postcss": "8.4.24",
42-
"tailwindcss-test-utils": "workspace:*"
42+
"internal-example-plugin": "workspace:*"
4343
}
4444
}

packages/@tailwindcss-postcss/src/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('plugins', () => {
144144
let result = await processor.process(
145145
css`
146146
@import 'tailwindcss/utilities';
147-
@plugin 'tailwindcss-test-utils';
147+
@plugin 'internal-example-plugin';
148148
`,
149149
{ from: INPUT_CSS_PATH },
150150
)
@@ -174,7 +174,7 @@ describe('plugins', () => {
174174
let result = await processor.process(
175175
css`
176176
@import 'tailwindcss/utilities';
177-
@plugin 'tailwindcss-test-utils';
177+
@plugin 'internal-example-plugin';
178178
`,
179179
{ from: INPUT_CSS_PATH },
180180
)

packages/test-utils/package.json renamed to packages/internal-example-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "tailwindcss-test-utils",
2+
"name": "internal-example-plugin",
33
"version": "0.0.0",
44
"private": true,
55
"main": "index.js"

pnpm-lock.yaml

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)