Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
chore(deps): base dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinpinto committed Apr 25, 2021
1 parent fe5beeb commit e7eeb20
Show file tree
Hide file tree
Showing 17 changed files with 423 additions and 356 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'prettier',
'plugin:prettier/recommended',
'plugin:jest/recommended',
'plugin:jest/style',
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@
"release": "lerna version"
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/core": "^7.13.16",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"@types/jest": "^25.2.3",
"@types/jest": "^26.0.22",
"@types/node": "^14.14.35",
"@typescript-eslint/eslint-plugin": "^2.13.0",
"@typescript-eslint/parser": "^2.13.0",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"babel-jest": "^26.6.3",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.8.0",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^24.3.2",
"eslint-plugin-prettier": "^3.1.2",
"jest": "^26.6.3",
Expand Down
10 changes: 5 additions & 5 deletions packages/automatic-releases/__tests__/automaticReleases.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ describe('main handler processing automatic releases', () => {
const createRelease = nock('https://api.github.com')
.matchHeader('authorization', `token ${testGhToken}`)
.post('/repos/marvinpinto/private-actions-tester/releases', {
tag_name: testInputAutomaticReleaseTag, // eslint-disable-line @typescript-eslint/camelcase
tag_name: testInputAutomaticReleaseTag,
name: testInputTitle,
draft: testInputDraft,
prerelease: testInputPrerelease,
body: testInputBody,
})
.reply(200, {
upload_url: releaseUploadUrl, // eslint-disable-line @typescript-eslint/camelcase
upload_url: releaseUploadUrl,
});

await main();
Expand Down Expand Up @@ -156,7 +156,7 @@ describe('main handler processing automatic releases', () => {
const listAssociatedPRs = nock('https://api.github.com')
.matchHeader('authorization', `token ${testGhToken}`)
.get(`/repos/marvinpinto/private-actions-tester/commits/${testGhSHA}/pulls`)
.reply(200, [{number: '22', html_url: 'https://example.com/PR22'}]); // eslint-disable-line @typescript-eslint/camelcase
.reply(200, [{number: '22', html_url: 'https://example.com/PR22'}]);

const createRef = nock('https://api.github.com')
.matchHeader('authorization', `token ${testGhToken}`)
Expand Down Expand Up @@ -189,14 +189,14 @@ describe('main handler processing automatic releases', () => {
const createRelease = nock('https://api.github.com')
.matchHeader('authorization', `token ${testGhToken}`)
.post('/repos/marvinpinto/private-actions-tester/releases', {
tag_name: testInputAutomaticReleaseTag, // eslint-disable-line @typescript-eslint/camelcase
tag_name: testInputAutomaticReleaseTag,
name: testInputTitle,
draft: testInputDraft,
prerelease: testInputPrerelease,
body: testInputBody,
})
.reply(200, {
upload_url: releaseUploadUrl, // eslint-disable-line @typescript-eslint/camelcase
upload_url: releaseUploadUrl,
});

await main();
Expand Down
2 changes: 0 additions & 2 deletions packages/automatic-releases/__tests__/taggedReleases.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/camelcase */

import * as process from 'process';
import * as path from 'path';
import nock from 'nock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ server.delete('/', (req, res) => {
server.post('/repos/marvinpinto/private-actions-tester/releases', (req, res) => {
const releaseUploadUrl = 'https://releaseupload.example.com';
res.json({
upload_url: releaseUploadUrl, // eslint-disable-line @typescript-eslint/camelcase
upload_url: releaseUploadUrl,
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/camelcase */

import express from 'express';
import path from 'path';
import fs from 'fs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/camelcase */

import express from 'express';
import path from 'path';
import fs from 'fs';
Expand Down
2 changes: 1 addition & 1 deletion packages/automatic-releases/__tests__/utils/skipSmoke.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable jest/no-focused-tests,jest/no-export */

const skipSmokeTestsLocally = () => {
const skipSmokeTestsLocally = (): void => {
if (process.env['GITHUB_ACTIONS'] !== 'true') {
test.only('only run on the CI server', () => {
console.warn(
Expand Down
4 changes: 2 additions & 2 deletions packages/automatic-releases/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^2.0.0",
"@octokit/rest": "^16.36.0",
"@actions/github": "2.0.0",
"@octokit/rest": "16.36.0",
"conventional-changelog-angular": "^5.0.12",
"conventional-commits-parser": "^3.2.0",
"globby": "^11.0.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/automatic-releases/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const deletePreviousGitHubRelease = async (client: github.GitHub, releaseInfo: O
await client.repos.deleteRelease({
owner: releaseInfo.owner,
repo: releaseInfo.repo,
release_id: resp.data.id, // eslint-disable-line @typescript-eslint/camelcase
release_id: resp.data.id,
});
} catch (err) {
core.info(`Could not find release associated with tag "${releaseInfo.tag}" (${err.message})`);
Expand Down Expand Up @@ -191,7 +191,7 @@ export const getChangelog = async (
const pulls = await client.repos.listPullRequestsAssociatedWithCommit({
owner: owner,
repo: repo,
commit_sha: commit.sha, // eslint-disable-line @typescript-eslint/camelcase
commit_sha: commit.sha,
});
if (pulls.data.length) {
core.info(`Found ${pulls.data.length} pull request(s) associated with commit ${commit.sha}`);
Expand Down Expand Up @@ -236,7 +236,7 @@ export const getChangelog = async (
return changelog;
};

export const main = async () => {
export const main = async (): Promise<void> => {
try {
const args = getAndValidateArgs();
const context = new Context();
Expand Down Expand Up @@ -305,7 +305,7 @@ export const main = async () => {
const releaseUploadUrl = await generateNewGitHubRelease(client, {
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: releaseTag, // eslint-disable-line @typescript-eslint/camelcase
tag_name: releaseTag,
name: args.automaticReleaseTag && args.releaseTitle ? args.releaseTitle : releaseTag,
draft: args.draftRelease,
prerelease: args.preRelease,
Expand Down
6 changes: 5 additions & 1 deletion packages/automatic-releases/src/uploadReleaseArtifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import {lstatSync, readFileSync} from 'fs';
import path from 'path';
import md5File from 'md5-file';

export const uploadReleaseArtifacts = async (client: github.GitHub, uploadUrl: string, files: string[]) => {
export const uploadReleaseArtifacts = async (
client: github.GitHub,
uploadUrl: string,
files: string[],
): Promise<void> => {
core.startGroup('Uploading release artifacts');
for (const fileGlob of files) {
const paths = await globby(fileGlob);
Expand Down
6 changes: 4 additions & 2 deletions packages/automatic-releases/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ export const generateChangelogFromParsedCommits = (parsedCommits: ParsedCommits[
return changelog.trim();
};

export const isBreakingChange = ({body, footer}): boolean => {
export const isBreakingChange = ({body, footer}: {body: string; footer: string}): boolean => {
const re = /^BREAKING\s+CHANGES?:\s+/;
return re.test(body || '') || re.test(footer || '');
};

export const parseGitTag = (inputRef): string => {
export const parseGitTag = (inputRef: string): string => {
const re = /^(refs\/)?tags\/(.*)$/;
const resMatch = inputRef.match(re);
if (!resMatch || !resMatch[2]) {
Expand All @@ -156,6 +156,7 @@ export const parseGitTag = (inputRef): string => {
return resMatch[2];
};

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const getChangelogOptions = async () => {
const defaultOpts = defaultChangelogOpts;
defaultOpts['mergePattern'] = '^Merge pull request #(.*) from (.*)$';
Expand All @@ -165,6 +166,7 @@ export const getChangelogOptions = async () => {
};

// istanbul ignore next
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const octokitLogger = (...args): string => {
return args
.map((arg) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-ssm-secrets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@actions/core": "^1.2.6",
"aws-sdk": "^2.792.0"
"aws-sdk": "^2.892.0"
},
"main": "dist/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-ssm-secrets/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const getAndValidateArgs = (): ActionParams => {
return param;
};

export const main = async () => {
export const main = async (): Promise<void> => {
const actionParam = getAndValidateArgs();
const ssm = new SSM();
core.startGroup('Injecting secret environment variables');
Expand Down
2 changes: 1 addition & 1 deletion packages/keybase-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^2.0.0",
"@actions/github": "2.0.0",
"axios": "^0.21.0"
},
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/keybase-notifications/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const getAndValidateArgs = (): Args => {
return args;
};

export const main = async () => {
export const main = async (): Promise<void> => {
try {
const defaultUrl = `https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/commit/${github.context.sha}/checks`;
const args = getAndValidateArgs();
Expand Down
Loading

0 comments on commit e7eeb20

Please sign in to comment.