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: not actively maintained notice #102

Merged
merged 1 commit into from Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions .circleci/config.yml
@@ -1,6 +1,5 @@
version: 2.1
orbs:
snyk: snyk/snyk@1.1.2
puppeteer: threetreeslight/puppeteer@0.1.2
slack: circleci/slack@3.4.2
commands:
Expand Down Expand Up @@ -43,10 +42,6 @@ jobs:
- install_deps
- build_ts
- run: npm test
- snyk/scan:
fail-on-issues: true
monitor-on-build: true
token-variable: SNYK_TOKEN_PROD
- run: npx semantic-release
- slack/status:
fail_only: true
Expand All @@ -63,10 +58,6 @@ jobs:
- install_deps
- build_ts
- run: npm test
- snyk/scan:
fail-on-issues: true
monitor-on-build: false
token-variable: SNYK_TOKEN_PROD
- slack/status:
fail_only: true
only_for_branches: master
Expand Down
4 changes: 1 addition & 3 deletions .eslintrc.json
Expand Up @@ -11,9 +11,7 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": [
Expand Down
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -3,6 +3,9 @@
***

[![Known Vulnerabilities](https://snyk.io/test/github/snyk-tech-services/snyk-licenses-texts/badge.svg)](https://snyk.io/test/github/snyk-tech-services/snyk-licenses-texts)
[![Not Maintained](https://img.shields.io/badge/Maintenance%20Level-Not%20Maintained-yellow.svg)](https://gist.github.com/cheerfulstoic/d107229326a01ff0f333a1d3476e068d)

**This repository is not in active development and critical bug fixes only will be considered.**

Snyk helps you find, fix and monitor for known vulnerabilities in your dependencies, both on an ad hoc basis and as part of your CI (Build) system.

Expand Down
11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -56,17 +56,16 @@
"@types/jest": "26.0.13",
"@types/lodash": "4.14.161",
"@types/node": "14.6.3",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"@typescript-eslint/eslint-plugin": "5.29.0",
"@typescript-eslint/parser": "5.29.0",
"cpx": "1.5.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint": "8.18.0",
"jest": "26.4.2",
"prettier": "^1.19.1",
"prettier": "2.7.1",
"ts-jest": "25.5.1",
"ts-node": "8.6.2",
"tsc-watch": "^4.1.0",
"typescript": "^3.7.5"
"typescript": "4.7.4"
},
"pkg": {
"scripts": [
Expand Down
4 changes: 1 addition & 3 deletions test/lib/fixtures/example-license-data.json
Expand Up @@ -31,9 +31,7 @@
"latestVersionPublishedDate": "2020-02-13T17:43:52.531Z",
"firstPublishedDate": "2012-11-13T15:43:50.942Z",
"isDeprecated": false,
"copyright": [
"Copyright (c) Google"
]
"copyright": ["Copyright (c) Google"]
}
],
"projects": [
Expand Down
27 changes: 17 additions & 10 deletions test/lib/generate-html-report.test.ts
Expand Up @@ -17,9 +17,9 @@ describe('Generate HTML report', () => {
expect(process.env.ORG_ID).not.toBeNull();
});
test('License HTML Report is generated as expected', async () => {
const licenseRes = (loadJson(
const licenseRes = loadJson(
__dirname + '/fixtures/example-license-data.json',
) as unknown) as LicenseReportData;
) as unknown as LicenseReportData;
const orgData = {
name: 'org',
id: 'avd-scv',
Expand All @@ -31,14 +31,21 @@ describe('Generate HTML report', () => {
},
};
const date = new Date('2022-02-22').toLocaleDateString();
const htmlData = await generateHtmlReport(ORG_ID, licenseRes, orgData, undefined, undefined, date);
const htmlData = await generateHtmlReport(
ORG_ID,
licenseRes,
orgData,
undefined,
undefined,
date,
);
expect(htmlData).toMatchSnapshot();
}, 150000);

test('License HTML Report is generated as expected with project based view', async () => {
const licenseRes = (loadJson(
const licenseRes = loadJson(
__dirname + '/fixtures/example-license-data.json',
) as unknown) as LicenseReportData;
) as unknown as LicenseReportData;
const orgData = {
name: 'org',
id: 'avd-scv',
Expand All @@ -62,9 +69,9 @@ describe('Generate HTML report', () => {
}, 150000);

test('License HTML Report is generated as expected with a custom hbs template', async () => {
const licenseRes = (loadJson(
const licenseRes = loadJson(
__dirname + '/fixtures/example-license-data.json',
) as unknown) as LicenseReportData;
) as unknown as LicenseReportData;
const orgData = {
name: 'org',
id: 'avd-scv',
Expand All @@ -87,9 +94,9 @@ describe('Generate HTML report', () => {
expect(htmlData).toMatchSnapshot();
}, 150000);
test('License HTML Report is generated as expected with excludeSnykFields enabled', async () => {
const licenseRes = (loadJson(
const licenseRes = loadJson(
__dirname + '/fixtures/example-license-data.json',
) as unknown) as LicenseReportData;
) as unknown as LicenseReportData;
const orgData = {
name: 'org',
id: 'avd-scv',
Expand All @@ -110,7 +117,7 @@ describe('Generate HTML report', () => {
date,
{
excludeSnykFields: true,
}
},
);
expect(htmlData).toMatchSnapshot();
}, 150000);
Expand Down
8 changes: 4 additions & 4 deletions test/lib/unit.test.ts
Expand Up @@ -94,7 +94,7 @@ describe('enrichDependencies', () => {

describe('mergeLicenceAndDepData', () => {
test('mergeLicenceAndDepData returns the same number of licenses & deps as provided', async () => {
const licenseData = ({
const licenseData = {
results: [
{
id: 'ISC',
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('mergeLicenceAndDepData', () => {
],
},
],
} as unknown) as snykApiSdk.OrgTypes.LicensesPostResponseType;
} as unknown as snykApiSdk.OrgTypes.LicensesPostResponseType;

const depApiData = {
'abbrev@1.0.9': [
Expand Down Expand Up @@ -180,7 +180,7 @@ describe('mergeLicenceAndDepData', () => {
).toEqual(depApiData['abbrev@1.0.9'][0].copyright);
});
test('mergeLicenceAndDepData for a multi license returns extra licenses after separating multi licenses', async () => {
const licenseData = ({
const licenseData = {
results: [
{
id: 'ISC OR MIT',
Expand Down Expand Up @@ -220,7 +220,7 @@ describe('mergeLicenceAndDepData', () => {
],
},
],
} as unknown) as snykApiSdk.OrgTypes.LicensesPostResponseType;
} as unknown as snykApiSdk.OrgTypes.LicensesPostResponseType;

const depApiData = {
'abbrev@1.0.9': [
Expand Down
5 changes: 3 additions & 2 deletions test/system/generate.test.ts
Expand Up @@ -110,8 +110,9 @@ describe('`snyk-licenses-report generate <...>`', () => {
}, 150000);
it('generated the report successfully with custom template', (done) => {
exec(
`node ${main} generate --orgPublicId=${ORG_ID} --template=${__dirname +
'/fixtures/custom-view.hbs'}`,
`node ${main} generate --orgPublicId=${ORG_ID} --template=${
__dirname + '/fixtures/custom-view.hbs'
}`,
{
env: {
PATH: process.env.PATH,
Expand Down