How to use the @instructure/pkg-utils.getChangedPackages function in @instructure/pkg-utils

To help you get started, we’ve selected a few @instructure/pkg-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instructure / instructure-ui / packages / cz-lerna-changelog / lib / index.js View on Github external
return function (cz, commit) {
    const scope = '@instructure'
    const allPackages = getPackages()
    const changedPackages = getChangedPackages('--cached', allPackages).map(pkg => pkg.name.replace(`${scope}/`, ''))
    const packageNames = allPackages.map(pkg => pkg.name.replace(`${scope}/`, ''))
    const questions = makeDefaultQuestions(packageNames, changedPackages)

    // eslint-disable-next-line no-console
    console.info('\n\nLine 1 will be cropped at 100 characters. All other lines will be wrapped after 100 characters.\n')

    cz.registerPrompt('autocomplete', autocomplete)

    cz.prompt(autocompleteQuestions(questions))
      .then((answers) => {
        const {
          body,
          footer,
          ...rest
        } = answers
github instructure / instructure-ui / packages / ui-scripts / lib / utils / npm.js View on Github external
async function syncRootPackageVersion (useProjectVersion) {
  const project = new Project(process.cwd())
  const rootPkg = getPackage()

  let projectVersion

  if (project.isIndependent() || useProjectVersion) {
    projectVersion = project.version
  } else {
    // unfortunately lerna doesn't update lerna.json for canary releases,
    // so we have to do this:
    const pkgs = getChangedPackages()
    projectVersion = pkgs[0].get('version')
  }

  if (projectVersion !== rootPkg.get('version')) {
    rootPkg.set('version', projectVersion)
    await rootPkg.serialize()
  }

  return projectVersion
}
github instructure / instructure-ui / packages / ui-scripts / lib / utils / npm.js View on Github external
async function updateCrossPackageDependencies (packageName, releaseVersion, dependencyVersion) {
  const changedPackages = getChangedPackages()
  const changedPackageNames = changedPackages.map(pkg => pkg.name)

  info(`📦  Updating cross-package dependencies for ${packageName} to ${dependencyVersion}...`)
  await Promise.all(
    changedPackages.map(changedPackage => {
      const pkg = changedPackage.toJSON()
      let packageChanged = false

      const depCollections = [
        'dependencies',
        'devDependencies',
        'optionalDependencies',
        'peerDependencies'
      ]

      depCollections.forEach(depCollection => {

@instructure/pkg-utils

Utilities for managing node packages in a monorepo.

MIT
Latest version published 1 day ago

Package Health Score

84 / 100
Full package analysis

Similar packages