Skip to content

Creating tag fails during publish #567

Closed

Description

@Niznikr

Affected Packages

cli using latest version 2.16.0

Problem

Similar to #196 my publish goes through but changeset publish fails when trying to create the tag for the release.

🦋  error SyntaxError: Unexpected token a in JSON at position 2
🦋  error     at JSON.parse (<anonymous>)
🦋  error     at jsonParse (/Users/rniznik/Documents/pharos/node_modules/@changesets/cli/dist/cli.cjs.dev.js:584:17)
🦋  error     at internalPublish (/Users/rniznik/Documents/pharos/node_modules/@changesets/cli/dist/cli.cjs.dev.js:738:14)
error Command failed with exit code 1.

The line failing being:

let json = jsonParse(stdout.toString().replace(/[^{]*/, ""));

Not sure what in the stdout of our build script could be resulting in the issue.

Activity

  1. Niznikr commented on Apr 16, 2021

    @Niznikr
    Author

    I found that it is happening as a result of the following warning output in our build command from autoprefixer:

    autoprefixer: /Users/rniznik/Documents/pharos/packages/core/src/components/toast/pharos-toast.css:27:3: IE does not support align-items on grid containers. Try using align-self on child elements instead: .toast > * { align-self: start }
    autoprefixer: /Users/rniznik/Documents/pharos/packages/core/src/components/toast/pharos-toast.css:28:3: IE does not support justify-content on grid containers
    

    Is it because there are curly braces in the output that the tagging part of publish fails?

  2. Andarist commented on Apr 18, 2021

    @Andarist
    Member

    Interesting - so basically any output from publishing scripts can interfere with that 😬

    I believe that we should refactor this to not use the CLI for publishing - but rather pack a package and publish it using the API directly. It ain't overly hard - but will take some time to do and I'm afraid that I don't have time to reimplement this right now. Any help would be much appreciated.

  3. Emptymu commented on Sep 29, 2021

    @Emptymu

    Had the same issue 😢

  4. Andarist commented on Nov 20, 2021

    @Andarist
    Member

    I've created a pull request that attempts to fix the issues mentioned here. I will setup snapshot releases for this PR soon-ish but in the meantime I would love to ask if there are any people willing to test this stuff out in their projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions