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

Add support for multiple schemas, YAML support #51

Merged
merged 5 commits into from
Jul 14, 2023
Merged

Conversation

drwpow
Copy link
Collaborator

@drwpow drwpow commented Jul 14, 2023

Changes

⚠️ Warning: this is more “concatenation,” not true multi-schemas as outlined in design-tokens/community-group#166. So this doesn’t make remote aliasing possible. But it does allow your tokens files to be split up & distributed.

@changeset-bot
Copy link

changeset-bot bot commented Jul 14, 2023

🦋 Changeset detected

Latest commit: 3812019

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@cobalt-ui/cli Minor
@cobalt-ui/core Minor
@cobalt-ui/plugin-css Major
@cobalt-ui/plugin-js Major
@cobalt-ui/plugin-sass Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

// - this is a token with a $value (don’t merge tokens! overwrite!), or
// - this is a primitive value (it’s the user’s responsibility to merge these correctly)
if (!(k in a) || Array.isArray(v) || typeof v !== 'object' || (typeof v === 'object' && '$value' in v)) {
a[k] = v;

Check warning

Code scanning / CodeQL

Prototype-polluting function

Properties are copied from [b](1) to [a](2) without guarding against prototype pollution.
const cmd = '../../../bin/cli.js';

describe('co build', () => {
test('default', async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new build test that gives some assurance this PR didn’t totally break everything

const cwd = new URL('./fixtures/check-default/', import.meta.url);
expect(() => execSync(`${cmd} check`, {cwd})).to.not.throw();
const result = await execa('node', [cmd, 'check'], {cwd});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Upgrade CLI tests to execa for better ease of use

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 14, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3812019
Status: ✅  Deploy successful!
Preview URL: https://8fd9547d.cobalt-ui.pages.dev
Branch Preview URL: https://multi-schemas.cobalt-ui.pages.dev

View logs

@drwpow drwpow force-pushed the multi-schemas branch 5 times, most recently from 466d7eb to 0521821 Compare July 14, 2023 21:18
@drwpow drwpow merged commit e1e18c1 into main Jul 14, 2023
@drwpow drwpow deleted the multi-schemas branch July 14, 2023 21:26
This was referenced Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant