Skip to content

Commit

Permalink
Prefix internal modules with internal-* (#14074)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
philipp-spiess authored Jul 29, 2024
1 parent a2159e8 commit e920442
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/@tailwindcss-postcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"@types/node": "^20.12.12",
"@types/postcss-import": "^14.0.3",
"postcss": "8.4.24",
"tailwindcss-test-utils": "workspace:*"
"internal-example-plugin": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions packages/@tailwindcss-postcss/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('plugins', () => {
let result = await processor.process(
css`
@import 'tailwindcss/utilities';
@plugin 'tailwindcss-test-utils';
@plugin 'internal-example-plugin';
`,
{ from: INPUT_CSS_PATH },
)
Expand Down Expand Up @@ -174,7 +174,7 @@ describe('plugins', () => {
let result = await processor.process(
css`
@import 'tailwindcss/utilities';
@plugin 'tailwindcss-test-utils';
@plugin 'internal-example-plugin';
`,
{ from: INPUT_CSS_PATH },
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "tailwindcss-test-utils",
"name": "internal-example-plugin",
"version": "0.0.0",
"private": true,
"main": "index.js"
Expand Down
17 changes: 8 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e920442

Please sign in to comment.