Skip to content

Conversation

@lukebrdn
Copy link
Contributor

Resolves #21

Copy link
Contributor

@adcreare adcreare left a comment

Choose a reason for hiding this comment

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

Looks good - few minor things

name: Package Denier
description: Check for banned packages
runs:
using: node16
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably best this uses node18 - actually that probably goes for all the actions as they are all using 16 at the moment.

return key.slice(key.lastIndexOf(prefix) + prefix.length);
}

function compareSemverVersions(version1: string, version2: string): number {
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to use the npm semver package here? https://github.com/npm/node-semver - as its made by the NPM people its probably going to get updates for any additional operators they add? It includes a comparison operator

/*
This is the list of packages that are not allowed to be imported.
*/
const rules: Rule[] = [['@aws-sdk/client-*', '>', '3.1.0']];
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be 3.193.0 I believe thats the last version we've had live without issues inside aws-nock.
Also should add:

  • got > 11.8.5
  • get-port > 5.1.1
  • antlr4 > 4.9.3
  • @aws-sdk/credential-provider-ini > 3.193.0
  • @aws-sdk/credential-provider-node > 3.193.0
  • @aws-sdk/smithy-client > 3.193.0
  • @aws-sdk/types > 3.193.0

@lukebrdn lukebrdn changed the title added package denier action added Check Imports action Dec 2, 2022
@lukebrdn lukebrdn requested a review from adcreare December 2, 2022 17:13
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

Coverage after merging add-package-denier-action into main will be

59.47%▾ -1.17%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/check-imports
   index.ts0%0%0%0%10–11, 13, 15–17, 17–19, 21–22, 22–23, 3, 34, 36, 38, 4, 43, 45, 6–7, 9
   package-lock-file-util.ts100%100%100%100%
   packages-not-allowed.ts100%100%100%100%
src/coverage-reporter
   cli.ts0%0%0%0%10, 12–13, 16, 18–19, 21–22, 25, 25–26, 29, 38, 42, 44, 46, 8–9
   comment.ts0%0%0%0%10, 12, 14–16, 16–17, 17, 23, 23, 29–30, 30–31, 34–37, 37, 37–38, 38, 38, 38, 38, 40–41, 41–42, 42, 48, 48, 8
   delete-old-comments.ts0%0%0%0%13, 20–23, 25, 34–36, 36–37, 41, 43, 43, 43, 43, 43, 49, 54–57, 59, 67, 8
   get-changes.ts0%0%0%0%12, 17, 17, 17, 17–18, 21, 29, 29–30, 37, 37, 37–38, 38, 38–39, 8
   html.ts100%100%100%100%
   index.ts0%0%0%0%100–101, 11–12, 14–17, 19, 21, 24–26, 26, 26–27, 27, 27–31, 33–34, 34, 36–37, 40, 40, 40–41, 41, 41, 41, 43, 46, 52, 52, 52–57, 57–60, 63–64, 66, 66–67, 70–72, 74, 74–75, 78, 78, 78–79, 8, 86, 86–87, 9, 98
   lcov.ts83.12%73.68%75%87.04%117, 119–120, 120, 120, 120–122, 124, 126, 134, 83
   tabulate.ts100%100%100%100%
   util.ts100%100%100%100%
src/nocks
   github.test.ts100%100%100%100%
src/publish-beta
   compile.ts0%100%0%0%10–13, 3–5, 7, 9
   files.ts90.91%85.71%100%90.91%28–30
   github.ts86.36%73.68%100%90.91%26, 32, 34–36, 38, 53–55
   index.ts0%100%0%0%10–11, 13–15, 17–21, 24, 26, 28, 3, 33, 35, 4–5, 7–9
   package.ts92.50%66.67%100%93.94%22–23, 41
   publish.ts72.22%100%50%75%23–26

Copy link
Contributor

@adcreare adcreare left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@carlansley carlansley left a comment

Choose a reason for hiding this comment

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

lgtm

@carlansley carlansley merged commit 64f4b7a into main Dec 19, 2022
@carlansley carlansley deleted the add-package-denier-action branch December 19, 2022 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create action that will error if package in deny list is found in the repo's package-lock.json

4 participants