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

Bundle .d.ts files when building project #854

Merged
merged 13 commits into from
Oct 18, 2022
Merged

Bundle .d.ts files when building project #854

merged 13 commits into from
Oct 18, 2022

Conversation

mrm007
Copy link
Contributor

@mrm007 mrm007 commented Sep 29, 2022

This PR bundles .d.ts files generated by Preconstruct to avoid errors in downstream dependencies.

e.g. When compiling Braid with the current version of vanilla-extract:

import * as _vanilla_extract_sprinkles_dist_declarations_src_createSprinkles from "@vanilla-extract/sprinkles/dist/declarations/src/createSprinkles";
import { StyleRule } from "@vanilla-extract/css";
// ...

declare const vars: {
  grid: any;
  space: any;
  touchableSize: any;
  contentWidth: any;
  backgroundColor: any;
  foregroundColor: any;
  textWeight: any;
  borderColor: any;
  borderRadius: any;
  borderWidth: any;
  shadow: any;
};

After the change:

import * as _vanilla_extract_sprinkles from "@vanilla-extract/sprinkles";
import { StyleRule } from "@vanilla-extract/css";
// ...

declare const vars: {
  grid: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
  space: {
    gutter: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
    xxsmall: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
    xsmall: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
    small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
    medium: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
    large: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
    xlarge: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
    xxlarge: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
  };
  // ...
};

.changeset/silent-files-know.md Outdated Show resolved Hide resolved
.vscode/settings.json Show resolved Hide resolved
packages/sprinkles/src/index.ts Show resolved Hide resolved
@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2022

🦋 Changeset detected

Latest commit: 5a13938

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

This PR includes changesets to release 11 packages
Name Type
@vanilla-extract/sprinkles Patch
@vanilla-extract/css Patch
@vanilla-extract/css-utils Patch
@vanilla-extract/dynamic Patch
@fixtures/sprinkles Patch
@fixtures/features Patch
@fixtures/low-level Patch
@fixtures/recipes Patch
@fixtures/themed Patch
@fixtures/unused-modules Patch
vanilla-extract-example-webpack-react Patch

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

Copy link
Contributor

@mattcompiles mattcompiles left a comment

Choose a reason for hiding this comment

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

Looks good. Will need to revisit this in a few months.

@mattcompiles mattcompiles merged commit 98f8b03 into master Oct 18, 2022
@mattcompiles mattcompiles deleted the dts-bundle branch October 18, 2022 04:52
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.

2 participants