Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependencies in packages #745

Merged
merged 1 commit into from Jan 17, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jan 17, 2020

Issue #, if available:
Fixes: #739

Description of changes:

Created package versions list by running following command:

./node_modules/.bin/lerna ls --json > ~/Downloads/lerna-ls.json

Temporary JS script to update package versions:

const replaceInFiles = require("replace-in-files");
const { readFileSync } = require("fs");
const { join } = require("path");

const projectRoot = "/Users/trivikr/workspace/aws-sdk-js-v3";

const latestPackageVersions = "/Users/trivikr/Downloads";
const packageVersions = JSON.parse(
  readFileSync(join(latestPackageVersions, "lerna-ls.json"))
).reduce((finalMap, { name, version }) => {
  finalMap[name] = version;
  return finalMap;
}, {});

async function asyncForEach(array, callback) {
  for (let index = 0; index < array.length; index++) {
    await callback(array[index], index, array);
  }
}

const start = async () => {
  await asyncForEach(Object.keys(packageVersions), async packageName => {
    const packageVersion = packageVersions[packageName];
    const regexString = `"${packageName}": "[^"]*"`;
    console.log(`Replacing ${regexString}`);
    const options = {
      files: [
        `${projectRoot}/packages/**/package.json`,
        `${projectRoot}/clients/**/package.json`
      ],
      from: new RegExp(regexString),
      to: `"${packageName}": "^${packageVersion}"`
    };

    await replaceInFiles(options);
  });
  console.log("Done");
};
start();

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@codecov-io
Copy link

Codecov Report

Merging #745 into smithy-codegen will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           smithy-codegen     #745   +/-   ##
===============================================
  Coverage           92.58%   92.58%           
===============================================
  Files                 138      138           
  Lines                2684     2684           
  Branches              463      463           
===============================================
  Hits                 2485     2485           
  Misses                199      199

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43a0baf...29987d6. Read the comment docs.

@trivikr trivikr mentioned this pull request Jan 17, 2020
Copy link
Contributor

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you for fixing this!

@trivikr trivikr merged commit 37f8997 into aws:smithy-codegen Jan 17, 2020
@trivikr trivikr deleted the update-dependencies branch January 17, 2020 00:46
@lock
Copy link

lock bot commented Jan 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants