Skip to content

Bring contentful-migration version for contentful-action in line with contentful-cli #4

@togmund

Description

@togmund

The version of contentful-migration that this action uses is a bit out of date:
https://github.com/contentful-userland/contentful-action/blob/main/package.json#L24

    "contentful-migration": "^0.17.1-beta0",

When we have developers preparing, pulling, and testing migrations using the contentful-cli, they are doing so with a newer version of contentful-migration under the hood:
https://github.com/contentful/contentful-cli/blob/master/package.json#L82

    "contentful-migration": "^4.1.1",

This version difference causes migrations that are prepared with one set of assumptions to be rejected by the action because doesn't recognize the up-to-date DSL. One such example is the method changeFieldControl which is not recognized as a valid property name:

Line 125: "changeFieldControl" is not a valid property name for a content type.
123:     .omitted(false);
124: 
125:   tasks.changeFieldControl("taskTitle", "builtin", "singleLine", {});

We have a fork of the contentful-action with a current version of contentful-migration that we are pointing our migration action at, however when it runs we hit what looks like a peer-dependency/typescript problem:
https://github.com/autotelic/contentful-action/tree/chore/update-contentful-migration

Error: Cannot find any-observable implementation nor global.Observable. You must install polyfill or call require("any-observable/register") with your preferred implementation, e.g. require("any-observable/register")('rxjs') on application load prior to any require("any-observable").

We're thumping against this problem, and if we succeed in building a dist/index.js file that doesn't panic on run then we'll shoot it your way as a PR

If you have thoughts on how to bump this that we're missing we'd love have that parity between these two tools.

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