Comments (5)
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.
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.
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.
@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.
closing this as we've made a complete rewrite of the core and this issue is no longer applicable.
from components.
Related Issues (20)
- Question: Is there a way to exclude @serverless/platform-client-china package? HOT 3
- Getting strange error: 28s › Serverless › There's a problem with your files and they could not be loaded by this Component. Original error: Response code 403 (Forbidden) HOT 1
- alternative cloudfront domains wiped on each deploy HOT 2
- README "Components List" doesn't link to a list of serverless-components
- How to run a different hook command for each stage?
- serverless remove doesn't work HOT 1
- commercial promotion and China user indentify code snippet HOT 3
- Dependency analysing doesn't support square brackets in output reference expression
- CLI was failing silently when there is configuration issues
- Is it possible to "serverless dev" but not auto deploy?
- Is this deprecated? HOT 15
- Error when deploy on Bitbucket
- change node version HOT 2
- Migrate from `traverse` to `neotraverse`
- Setting custom parameters for a component in serverless.yml HOT 1
- Move @serverless/platform-client-china to peerDependency HOT 2
- [feat] devOps friendly output format (JSON, YAML) HOT 6
- TLS connection error in proxy mode network
- Request timed out after 60 seconds HOT 1
- Can't install serverless-components
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from components.