GithubHelp home page GithubHelp logo

Comments (5)

laardee avatar laardee commented on August 12, 2024 1

With dependencies block, we could have a similar installation flow as npm or yarn. components add foo would fetch the foo component, or just headers/metadata to validate that the component exists and is compatible with current version of components, from an external registry and add it to dependencies block. Using named versions like in the @jrmacks latter suggestion, could be then implemented with, e.g. -n flag -> components add [email protected] -n oldFoo would add the foo as oldFoo to the dependencies.

from components.

jrmacks avatar jrmacks commented on August 12, 2024

Excellent explanation of the problem and agree with your approach. One scenario to consider is if in one of your components you explicitly want to reference a different version. Perhaps it may be good to keep the current logic in place as an override to the root dependencies block?

Example:

type: my-component

dependencies:
  foo: ^1.0.0 

components:
  foo1:
    type: foo # uses root v1.0.0
  foo2:
    type: [email protected]  # overriding the root dependency version

Or setup the dependencies block to use variables.

Example:

type: my-component

dependencies:
  foo: [email protected]
  oldFoo: [email protected]

components:
  foo1:
    type: foo # uses v1.0.0
  foo2:
    type: oldFoo # v0.9.1

from components.

iDVB avatar iDVB commented on August 12, 2024

Just taking a completely newb look at this...
Is there a reason you'd even want to mention per/component versioning in the yml, and not use existing npm/yarn (package.json)?

Similar to SLS plugins.... there is no mention to the version of the plugins in the yml. (AFAIK)

from components.

brianneisler avatar brianneisler commented on August 12, 2024

@iDVB excellent question. Our actual hope is to prevent exposing node/npm entirely. A lot of the ecosystem includes other languages besides node js. The goal is basically to be able to use serverless without even realizing that it uses node js under the hood. Therefore the only time you would have to interact with node/npm is if you are either...

A) writing a node js serverless app
B) writing a plugin
C) writing a component that requires code

If you are writing a python, go, java, etc serverless app though, you should have no requirement to install or interact with node js. This makes the tooling much more friendly to non-node js developers.

from components.

eahefnawy avatar eahefnawy commented on August 12, 2024

closing this as we've made a complete rewrite of the core and this issue is no longer applicable.

from components.

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.