Skip to content

postcss-tape : convert to workspace package #881

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

Conversation

romainmenke
Copy link
Member

@romainmenke romainmenke commented Feb 27, 2023

This is a refactor we planned to do anyway and a few minor tweaks to make the package suitable for 3rd parties.

It can be released so that others can also make use of it.


apparently the labeler also has a hard limit 😂

Comment on lines 31 to 36
## After node 20 is released do a find/replace to migrate fully to workspaces :

- `import { postcssTape } from '../../packages/postcss-tape/dist/index.mjs';`
- `import { postcssTape } from '@csstools/postcss-tape';`

Then add `@csstools/postcss-tape` the each `package.json` as a dev dependency.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are now using a more recent npm version when testing node 14.
So we can do this migration sooner.

Comment on lines +87 to +93
let packageName = packageInfo.name;
if (packageName.startsWith('@')) {
const parts = packageInfo.name.split('/');
packageName = parts.slice(1).join('/');
}

if (!packageName.startsWith('postcss-') && !isOlderPackageName) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work well for 3rd party scoped packages. @foo/postcss-bar

export type TestCaseOptions = {
// Debug message
/** Debug message */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format of comments is exported and published, the other is not.

@@ -39,7 +39,6 @@
"dist"
],
"peerDependencies": {
"postcss": "^8.4",
Copy link
Member Author

@romainmenke romainmenke Feb 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird bug that I noticed when adding the dev dependency for @csstools/postcss-tape.

This package doesn't use postcss at all.

Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice we got this out too before waiting for Node 20 😂

@romainmenke romainmenke merged commit 0c2ab7e into main Feb 27, 2023
@romainmenke romainmenke deleted the postcss-tape-convert-to-workspace-package--sympathetic-tibetan-mastiff-48be314c20 branch February 27, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common-tools experimental plugin-packs/postcss-preset-env plugins/css-blank-pseudo plugins/css-has-pseudo plugins/css-prefers-color-scheme plugins/media-queries-aspect-ratio-number-values plugins/postcss-media-queries-aspect-ratio-number-values plugins/postcss-attribute-case-insensitive plugins/postcss-cascade-layers plugins/postcss-color-function plugins/postcss-color-functional-notation plugins/postcss-color-hex-alpha plugins/postcss-color-rebeccapurple plugins/postcss-conditional-values plugins/postcss-custom-media plugins/postcss-custom-properties plugins/postcss-custom-selectors plugins/postcss-design-tokens plugins/postcss-dir-pseudo-class plugins/postcss-double-position-gradients plugins/postcss-env-function plugins/postcss-extract plugins/postcss-focus-visible plugins/postcss-focus-within plugins/postcss-font-format-keywords plugins/postcss-gap-properties plugins/postcss-global-data plugins/postcss-gradients-interpolation-method plugins/postcss-hwb-function plugins/postcss-ic-unit plugins/postcss-image-set-function plugins/postcss-is-pseudo-class plugins/postcss-lab-function plugins/postcss-logical plugins/postcss-logical-float-and-clear plugins/postcss-logical-resize plugins/postcss-logical-viewport-units plugins/postcss-nested-calc plugins/postcss-nesting plugins/postcss-normalize-display-values plugins/postcss-oklab-function plugins/postcss-overflow-shorthand plugins/postcss-place plugins/postcss-progressive-custom-properties plugins/postcss-pseudo-class-any-link plugins/postcss-scope-pseudo-class plugins/postcss-selector-not plugins/postcss-stepped-value-functions PostCSS Stepped Value Functions plugins/postcss-text-decoration-shorthand plugins/postcss-trigonometric-functions PostCSS Trigonometric Functions plugins/postcss-unset-value
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants