Giter Club home page Giter Club logo

Comments (4)

guigrpa avatar guigrpa commented on May 24, 2024

I don't fully understand what you mean — could you please clarify? oao uses plain old npm publish for each monorepo subpackage.

from oao.

mtiller avatar mtiller commented on May 24, 2024

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.

etienne-dldc avatar etienne-dldc commented on May 24, 2024

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.

etienne-dldc avatar etienne-dldc commented on May 24, 2024

Closing this, see rational above

from oao.

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.