Giter Site home page Giter Site logo

Monorepo support about app HOT 5 OPEN

tunnckoCore avatar tunnckoCore commented on June 16, 2024
Monorepo support

from app.

Comments (5)

tunnckoCore avatar tunnckoCore commented on June 16, 2024

Hm, actually we dont use it in the app. So we should make git-commits-since and/or git-semver-tags work without git, but with git log like string or array of commit message strings.

from app.

tunnckoCore avatar tunnckoCore commented on June 16, 2024

Use .listTags instead of getLatestRelease if pkg.workspaces and/or lerna.json is detected.

app/src/index.js

Lines 66 to 73 in 1a0f638

const pkg = await getPkg(context, robot);
if (!pkg) return null;
const result = await context.github.repos.getLatestRelease(context.repo());
const { data: commits } = await context.github.repos.getCommits(
context.repo({ since: result.data.created_at }),
);

ref: https://octokit.github.io/rest.js/#api-Repos-listTags

Use listTags, then .reduce over them to .getTag, so finally we'll have an array of tag objects which we should sort by tagger.date to be able to get the latest tag (no matter for which package it is), the important thing is that date, because than we'll pass it to .getCommits as { since: thatDate } option. After all that, we'll have all needed commits, and actually to the same thing which you'll do on the @tunnckocore/release-cli. Loop over all the commits, and for each of the packages inside each commit, call detectNextVersion. The final result, will be an array of Result objects which includes { increment, lastVersion, nextVersion, pkg, ... }

So for each item in that array, we'll call .createTag.

from app.

tunnckoCore avatar tunnckoCore commented on June 16, 2024

Needed changes in:

from app.

tunnckoCore avatar tunnckoCore commented on June 16, 2024

ref: Closing, based on conventional-commits/conventionalcommits.org#118 (comment)

Might not be needed. But out of curiosity, you can try to implement it as mentioned there - detect chore: release commits messages (or whatever regex is given on the config option) and get all the commits between those commits, which will then be passed to detect-next-version.

But in anyway, I don't think all this worth it and the time.

from app.

tunnckoCore avatar tunnckoCore commented on June 16, 2024

Also, latest comments on standard-release/cli#3

from app.

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.