Giter VIP home page Giter VIP logo

Comments (4)

JakeChampion avatar JakeChampion commented on September 22, 2024

To avoid this situation for v3 we should consider throwing an error when components are requested
at the latest version, or requested without a version range specified.

v3 already does this, it returns an error if no semver range/version is specified

throw new UserError(
`The bundle request contains ${module} with no version range, a version range is required.\nPlease refer to TODO (build service documentation) for what is a valid version.`
);

Note I don't think this should affect demo endpoints as demos are self contained — it would be reasonable
to embed a component demo for the latest version, the demo wouldn't break given a major release

The pull-request for v3 demos currently also returns an error if no semver range/version is specified. -- https://github.com/Financial-Times/origami-build-service/pull/460/files#diff-8c1eb431d6f3aeb9fdd100579f1a61e65164acf12417a903bb4a54b420541f56R52-R54

from origami-build-service.

notlee avatar notlee commented on September 22, 2024

v3 already does this

oh, nice!

The pull-request for v3 demos currently also returns an error

Cool, I think that's fine. I was thinking before that showing the latest demo could be useful for pages like the branding documentation, but using a specific version will always be safer (a future demo isn't guaranteed to show the same thing, in the same way). So let's leave it as is and close this issue until we have a more compelling reason to allow requests for the latest version of demos.

Turns out v2 errors when requesting the latest version of a demo since we restricted to valid semver ranges. It's broken the branding documentation 🙈 I'll open a Build Service v2 PR to allow latest requests again,
since we don't know what other pages may be affected.
Screenshot 2021-03-01 at 11 15 51

from origami-build-service.

JakeChampion avatar JakeChampion commented on September 22, 2024

Turns out v2 errors when requesting the latest version of a demo since we restricted to valid semver ranges. It's broken the branding documentation 🙈 I'll open a Build Service v2 PR to allow latest requests again,

That should work with the semver range * rather than the latest keyword, have you tried that?

from origami-build-service.

JakeChampion avatar JakeChampion commented on September 22, 2024

So let's leave it as is and close this issue until we have a more compelling reason to allow requests for the latest version of demos.

Closing this issue 👍

from origami-build-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.