Skip to content

Conversation

@seek-oss-ci
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

@capsizecss/[email protected]

Major Changes

  • #238 61f51f3 Thanks @delucis! - This package is now ESM-only.

    In most projects you can continue to use the package as before. CommonJS (CJS) projects using Node.js <20, should update to use a dynamic import:

    // For CJS projects before Node 20
    const { fromBuffer } = await import("@capsizecss/unpack");
    
    // For all other projects
    import { fromBuffer } from "@capsizecss/unpack";

Patch Changes

  • #238 61f51f3 Thanks @delucis! - Reduces @capsizecss/unpack install size by using a lighter weight package for extracting font file metrics

@seek-oss-ci seek-oss-ci requested a review from a team as a code owner December 12, 2025 03:10
@delucis
Copy link
Contributor

delucis commented Dec 12, 2025

Looking at the failing site deployment: https://github.com/seek-oss/capsize/actions/runs/20154974428/job/57855389620?pr=249

Seems that the site build is failing to treeshake out the Node.js fs import in the updated unpack package although it did for fontkit before. I guess there are few options of how to solve it potentially? Happy to take a look if you have any preference.

@michaeltaranto
Copy link
Contributor

michaeltaranto commented Dec 15, 2025

Started playing around this morning too. Yeah we got away with polyfilling things which i never liked, so maybe this is a chance to clean up our entries.

Wondering whether we move to a server entry point for node specific APIs:

import { fromFile } from '@capsizecss/unpack/server';

const metrics = await fromFile(filePath);

About to push a PR for this direction. See what you think

See what you think of the PR

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.

4 participants