Comments (4)
I don't fully understand what you mean — could you please clarify? oao uses plain old npm publish
for each monorepo subpackage.
from oao.
Well on issue I have (perhaps I'm missing something) is the during development, dependencies within my monorepo are automatically resolved to whatever is in the current (on disk) version of the package. But I have to declare an explicitly dependency on a specific version in my package.json
. As a result, things get messed up because when I publish, I get the wrong version.
Let me show you an example from your storyboard
repo. You have packages/storyboard
and it contains a package.json
that includes dependencies
. Now you've written in there that your storyboard
package depends on:
"dependencies": {
"storyboard-core": "^3.1.1"
},
But guess what? Your current version of storyboard-core
is at version 3.1.4. All your builds, testing, etc. has been using 3.1.4. How do you know (apart from the hope based on semantic version number) that [email protected]
is sufficient? You are yourself running against [email protected]
. I'm not sure if this is what the OP was concerned with, but it would be nice to somehow indicate that you depend on whatever the current version of that sibling package is instead of hardcoding a number and then when you publish is, have it insert the actual number it was built and tested against. Otherwise you have to run around updating all this information across all packages.
The bottom line is that monorepos are nice because they implicitly give you the latest versions of the other packages in the monorepo. BUT, that is bad because you also need to state an explicitly dependency as well and it doesn't always match the implicit dependency injected by the monorepo structure.
from oao.
Hi, I should start by clarifying that I don't use OAO because Lerna work fine with Yarn now.
My issue was that I was using https://github.com/pikapkg/pack to build my packages and it create en folder pkg
that you deploy to npm.
Let say you have something myrepo/packages/demopkg/package.json
then you build it you would get a folder myrepo/packages/demopkg/pkg
that contain a package.json
and what you want to deploy on npm is the pkg
folder.
Same for linking packages, if you import demo from 'demopkg'
in another package of the monorepo you want that to point to myrepo/packages/demopkg/pkg
and not just myrepo/packages/demopkg
.
I hope I made this a bit more clear. If not I don't think it's worth the hassle and you can close the issue.
from oao.
Closing this, see rational above
from oao.
Related Issues (20)
- Bumping dependencies on publish HOT 25
- Allow --tree in publish command
- Fixing oao publish as a yarn script HOT 2
- [docs] yarn workspaces
- Version packages independently HOT 6
- Recommended workflow HOT 2
- Semantic release HOT 4
- publish cannot be ran again of npm publish fails HOT 5
- status --src argument cannot accept multiple paths HOT 2
- remove package from all submodules HOT 2
- --ignore-src doesn't like similar names HOT 2
- Publish without version bumping HOT 1
- does not work without installing npm HOT 1
- run-script --tree reads from subpackage node_modules folder in monorepo HOT 1
- Remove `@babel/polyfill` HOT 2
- Add OTP support for publish
- Preserve nr of spaces for output package.json's HOT 1
- Yarn workspaces and --src
- Allow main as publish branch name HOT 3
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 oao.