gitlab-releaser
Advanced tools
Comparing version 0.5.0 to 1.0.0
{ | ||
"name": "v0.5.0 (2020-11-10)", | ||
"description": "Initial release", | ||
"name": "$$CHANGELOG", | ||
"description": "$$CHANGELOG", | ||
"tag_name": "0.5.0", | ||
@@ -5,0 +5,0 @@ "assets": { |
# Changelog | ||
## v1.0.0 (2020-11-21) | ||
### Added | ||
- Added support for `gitlab-releaser.json` file format, which allows declaration of default values applicable to all releases and overrides for each specific release. (#4) | ||
### Changed | ||
- Added option for pulling release `name` and `description` from the CHANGELOG (#2) | ||
- Updated argument formatting in shell script to assume string literal values, but allow expansion of environment variables (#3) | ||
- Added basic console logging for successful execution (#7) | ||
### Fixed | ||
- Updated to latest dependencies | ||
## v0.5.0 (2020-11-10) | ||
Initial implementation |
63
index.js
@@ -5,16 +5,60 @@ 'use strict'; | ||
const path = require('path'); | ||
const schema = require('./lib/schema'); | ||
const logger = require('ci-logger'); | ||
const { usesChangelog, processChangelogData } = require('./lib/changelog'); | ||
const { isValidGitLabReleaser, isValidRelease, isValidSchemaType, schemaTypes } = require('./lib/schema'); | ||
const cli = require('./lib/cli-args'); | ||
const getReleaseCliCommand = (directory, releaseFileName) => { | ||
const getErrorLogEntry = (message) => { | ||
return { message, level: logger.levels.error, exitOnError: true, errorCode: 1 }; | ||
}; | ||
const processReleaseData = (data, tag) => { | ||
const createReleaseCommand = 'release-cli create'; | ||
let processedData = data; | ||
if (usesChangelog(data)) { | ||
processedData = processChangelogData(data, tag); | ||
} | ||
const args = cli.getArgsString(processedData); | ||
return `${createReleaseCommand}${args}`; | ||
}; | ||
const getReleaseFromGitLabReleaser = (data, tag) => { | ||
const releaseData = data.releases && Object.keys(data.releases).includes(tag) ? data.releases[tag]: {}; | ||
return Object.assign(Object.create(null), data.defaults, releaseData); | ||
}; | ||
const validateTagExists = (tag) => { | ||
if (!tag) { | ||
logger.log(getErrorLogEntry('Tag must be specified')); | ||
} | ||
}; | ||
const validateSchemaType = (type) => { | ||
if (!isValidSchemaType(type)) { | ||
logger.log(getErrorLogEntry(`Schema type "${type}" is invalid, must be one of '${Object.values(schemaTypes).join('\', \'')}'`)); | ||
} | ||
}; | ||
const getReleaseCliCommand = (directory, releaseFileName, type, tag) => { | ||
validateTagExists(tag); | ||
validateSchemaType(type); | ||
const releaseFile = path.join(directory, releaseFileName); | ||
const data = JSON.parse(fs.readFileSync(releaseFile)); | ||
if (schema.isValidRelease(data)) { | ||
const args = cli.getArgsString(data); | ||
return `${createReleaseCommand}${args}`; | ||
let release; | ||
if (type === schemaTypes.gitlabReleaser) { | ||
if (!isValidGitLabReleaser(data)) { | ||
logger.log(getErrorLogEntry(`"${releaseFile}" is invalid gitlab-releaser file`)); | ||
} | ||
release = getReleaseFromGitLabReleaser(data, tag); | ||
} | ||
console.error(`'${releaseFile}' is invalid`); | ||
process.exit(1); // eslint-disable-line no-process-exit | ||
else { | ||
release = data; | ||
} | ||
if (!isValidRelease(release)) { | ||
logger.log(getErrorLogEntry(`"${releaseFile}" is invalid release file`)); | ||
} | ||
return processReleaseData(release, tag); | ||
}; | ||
@@ -27,8 +71,7 @@ | ||
const releaseScript = `${shebang}\n${command}`; | ||
// console.log(releaseScript); | ||
fs.writeFileSync(releaseScriptFile, releaseScript); | ||
logger.log({ message: `Saved file "${releaseScriptFile}"` }); | ||
} | ||
catch (err) { | ||
console.error(`Error saving file\n${err.message}`); | ||
process.exit(1); // eslint-disable-line no-process-exit | ||
logger.log(getErrorLogEntry(`Error saving file\n${err.message}`)); | ||
} | ||
@@ -35,0 +78,0 @@ }; |
'use strict'; | ||
const getFormattedValue = (value) => { | ||
// Double quote value if it contains whitespace or single quote | ||
return value.match(/[\s']/) ? `"${value}"` : value; | ||
}; | ||
const { escapeString } = require('./string-escape'); | ||
const getOption = (value, optionName) => { | ||
return value ? ` ${optionName} ${getFormattedValue(value)}`: ''; | ||
return value ? ` ${optionName} ${escapeString(value)}`: ''; | ||
}; | ||
@@ -27,3 +24,3 @@ | ||
assets.links.forEach(link => { | ||
result += ` ${optionName} '${JSON.stringify(link)}'`; | ||
result += getOption(JSON.stringify(link), optionName); | ||
}); | ||
@@ -30,0 +27,0 @@ } |
@@ -9,2 +9,11 @@ 'use strict'; | ||
const schemaTypes = { | ||
release: 'release', | ||
gitlabReleaser: 'gitlab-releaser' | ||
}; | ||
const isValidSchemaType = (value) => { | ||
return Object.values(schemaTypes).includes(value); | ||
}; | ||
const validateDataAgainstSchema = (schemaFile, data) => { | ||
@@ -16,7 +25,15 @@ const schema = JSON.parse(fs.readFileSync(path.join(__dirname, '..', schemaDirectory, schemaFile))); | ||
const isValidGitLabReleaser = (data) => { | ||
const gitlabReleaserSchemaFile = 'gitlab-releaser.schema.json'; | ||
return validateDataAgainstSchema(gitlabReleaserSchemaFile, data); | ||
}; | ||
const isValidRelease = (data) => { | ||
const schemaFile = 'release.schema.json'; | ||
return validateDataAgainstSchema(schemaFile, data); | ||
const releaseSchemaFile = 'release.schema.json'; | ||
return validateDataAgainstSchema(releaseSchemaFile, data); | ||
}; | ||
module.exports.isValidRelease = isValidRelease; | ||
module.exports.isValidGitLabReleaser = isValidGitLabReleaser; | ||
module.exports.isValidSchemaType = isValidSchemaType; | ||
module.exports.schemaTypes = schemaTypes; |
{ | ||
"name": "gitlab-releaser", | ||
"version": "0.5.0", | ||
"version": "1.0.0", | ||
"description": "Generate arguments for GitLab release-cli command", | ||
"bin": "./bin/releaser.js", | ||
"bin": "./bin/gitlab-releaser.js", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "node ./bin/releaser.js", | ||
"start": "node ./bin/gitlab-releaser.js", | ||
"test": "jest --ci", | ||
@@ -35,5 +35,5 @@ "lint-js": "eslint \"**/*.js\"", | ||
"@aarongoldenthal/eslint-config-standard": "^6.0.0", | ||
"bin-tester": "^1.0.0", | ||
"eslint": "^7.13.0", | ||
"eslint-plugin-jest": "^24.1.0", | ||
"bin-tester": "^1.1.1", | ||
"eslint": "^7.14.0", | ||
"eslint-plugin-jest": "^24.1.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
@@ -44,3 +44,3 @@ "eslint-plugin-sonarjs": "^0.5.0", | ||
"jest-junit": "^12.0.0", | ||
"markdownlint-cli": "^0.24.0" | ||
"markdownlint-cli": "^0.25.0" | ||
}, | ||
@@ -75,4 +75,8 @@ "jest": { | ||
"dependencies": { | ||
"ajv": "^6.12.6" | ||
"ajv": "^6.12.6", | ||
"ci-logger": "^3.0.1", | ||
"commander": "^6.2.0", | ||
"gitlab-ci-env": "^3.2.0", | ||
"releaselog": "^1.0.4" | ||
} | ||
} |
129
README.md
# GitLab Releaser | ||
Takes a JSON file with details for a release and generates a shell script to leverage GitLab's [release-cli](https://gitlab.com/gitlab-org/release-cli/) application to create the release. | ||
GitLab Releaser takes a JSON file with details for a release and generates a shell script to leverage GitLab's [release-cli](https://gitlab.com/gitlab-org/release-cli/) application to create the release. | ||
## Requirements | ||
GitLab Releaser looks for a JSON file at `.gitlab/release.json` with release details, for example: | ||
GitLab Releaser accepts a JSON file in one of two formats with release details: | ||
- Release file, with a single release | ||
- GitLab Releaser file, with multiple releases | ||
Special handling is provided to pull some values from the project CHANGELOG and for environment variables. | ||
### Release File | ||
GitLab Releaser can accept a Release file at `.gitlab/release.json` with the details of an individual release, for example: | ||
```json | ||
{ | ||
"name": "v1.0.0 (2020-10-28)", | ||
"description": "Initial release", | ||
"description": "Another release", | ||
"tag_name": "1.0.0", | ||
@@ -17,4 +26,5 @@ "assets": { | ||
{ | ||
"name": "Asset link name", | ||
"url": "https://<domain>/some/location/1" | ||
"name": "npm", | ||
"url": "https://www.npmjs.com/package/gitlab-releaser", | ||
"type": "package" | ||
} | ||
@@ -29,4 +39,109 @@ ] | ||
### GitLab Releaser File | ||
GitLab Releaser can accept a GitLab Releaser file at `.gitlab/gitlab-releaser.json` which can contain default values applicable to all releases and overrides for multiple specific releases denoted by tag, for example: | ||
```json | ||
{ | ||
"defaults": { | ||
"assets": { | ||
"links": [ | ||
{ | ||
"name": "npm", | ||
"url": "https://www.npmjs.com/package/gitlab-releaser", | ||
"type": "package" | ||
} | ||
] | ||
} | ||
}, | ||
"releases": { | ||
"1.0.0": { | ||
"name": "v1.0.0 (2020-10-28)", | ||
"description": "Another release", | ||
"tag_name": "1.0.0", | ||
"milestones": [ "1.0.0" ] | ||
}, | ||
"0.5.0": { | ||
"name": "v0.5.0 (2020-10-10)", | ||
"description": "Initial release", | ||
"tag_name": "0.5.0", | ||
"milestones": [ "0.5.0" ] | ||
} | ||
} | ||
} | ||
``` | ||
The `defaults` and each `releases` properties can contain and release properties, and the `releases` properties will override any `defaults`. | ||
A tag must be specified to pull the appropriate release information. For example, tag `1.0.0` would result in the following equivalent `release.json` file. | ||
```json | ||
{ | ||
"name": "v1.0.0 (2020-10-28)", | ||
"description": "Another release", | ||
"tag_name": "1.0.0", | ||
"assets": { | ||
"links": [ | ||
{ | ||
"name": "npm", | ||
"url": "https://www.npmjs.com/package/gitlab-releaser", | ||
"type": "package" | ||
} | ||
] | ||
}, | ||
"milestones": [ "1.0.0" ] | ||
} | ||
``` | ||
The full JSON schema is included [here](https://gitlab.com/gitlab-ci-utils/gitlab-releaser/-/raw/master/schemas/gitlab-releaser.schema.json). | ||
### Pulling Data From Changelog | ||
The release `name` and `description` can optionally be pulled dynamically from the CHANGELOG. This will be done if the value specified in the Release or GitLab Releaser file is "`$$CHANGELOG`", e.g. | ||
```json | ||
{ | ||
"name": "$$CHANGELOG", | ||
"description": "$$CHANGELOG", | ||
"tag_name": "1.0.0" | ||
} | ||
``` | ||
The [`releaselog`](https://www.npmjs.com/package/releaselog) module is used to pull this data and has details on CHANGELOG formatting requirements. The data is retrieved by the tag specified via the CLI, if specified, otherwise the value of `CI_COMMIT_TAG` is used. | ||
If either `name` or `description` specifies pulling data from the CHANGELOG, but that data cannot be found in the CHANGELOG, the job will report the error and fail. | ||
### Environment Variables | ||
By default, release parameters are assumed to be string literal values, and are quoted as such when the shell script is created. Any release properties can include environment variables, but they must be denoted in parameter substitution syntax, e.g. `${CI_COMMIT_TAG}`. Any parameters with variables in this format will be encoded in the generated shell script so that they are expanded. A value with a variable in any other format, e.g. `$CI_COMMIT_TAG`, will be treated as a string literal. | ||
For example, the following `release.json` file using both notations: | ||
```json | ||
{ | ||
"name": "v${CI_COMMIT_TAG} release", | ||
"description": "Fixed handling of $CI_COMMIT_TAG" | ||
} | ||
``` | ||
will result in a command line arguments: | ||
```sh | ||
--name 'v'"${CI_COMMIT_TAG}"' release' --description 'Fixed handling of $CI_COMMIT_TAG' | ||
``` | ||
## Usage | ||
The `gitlab-releaser` command line interface is run as detailed below: | ||
```sh | ||
Usage: gitlab-releaser [options] | ||
Options: | ||
-V, --version output the version number | ||
-s, --schema <schema> the schema type of the JSON input file (default: "gitlab-releaser") | ||
-t, --tag <tag> the path to the output directory for HTML report files (default: "$CI_COMMIT_TAG") | ||
-h, --help display help for command | ||
``` | ||
The following is an example `.gitlab-ci.yml` file illustrating preparing and creating a release on every tag pipeline. | ||
@@ -63,9 +178,9 @@ | ||
The `prepare_release` job run on a Node.js image and installs and runs `gitlab-releaser` to generate the shell script to prepare the release, saved as `.gitlab/release.sh`. For the example `release.json` file above, the following shell script will be generated: | ||
The `prepare_release` job runs on a Node.js image and installs and runs `gitlab-releaser` to generate the shell script to prepare the release, saved as `.gitlab/release.sh`. For the example `release.json` file above, or the `gitlab-releaser.json` for tag `1.0.0`, the following shell script will be generated: | ||
```sh | ||
#!/bin/sh | ||
release-cli create --name "v1.0.0 (2020-10-28)" --description "Initial release" --tag-name 1.0.0 --assets-link '{"name":"Asset link name","url":"https://<domain>/some/location/1"}' --milestone 1.0.0 | ||
release-cli create --name 'v1.0.0 (2020-10-28)' --description 'Another release' --tag-name 1.0.0 --assets-link '{"name":"npm","url":"https://www.npmjs.com/package/gitlab-releaser","type":"package"}' --milestone 1.0.0 | ||
``` | ||
The `create_release` job then runs the script to create the release. Note this job requires the `registry.gitlab.com/gitlab-org/release-cli` image, which contains the `release-cli` executable. |
@@ -9,4 +9,5 @@ 'use strict'; | ||
const testCaseDirectory = 'test-cases'; | ||
const allValuesFileName = 'valid-all-values.json'; | ||
const releaseAllValues = JSON.parse(fs.readFileSync(path.join(testDirectory, testCaseDirectory, allValuesFileName))); | ||
const schemaTypeDirectory = 'release'; | ||
const allValuesFileName = 'release-valid-all-values.json'; | ||
const releaseAllValues = JSON.parse(fs.readFileSync(path.join(testDirectory, testCaseDirectory, schemaTypeDirectory, allValuesFileName))); | ||
@@ -13,0 +14,0 @@ // eslint-disable-next-line max-lines-per-function |
@@ -6,18 +6,57 @@ 'use strict'; | ||
const { getReleaseCliCommand, saveReleaseCliScript } = require('../'); | ||
const { schemaTypes } = require('../lib/schema'); | ||
// eslint-disable-next-line max-lines-per-function | ||
describe('get release cli command', () => { | ||
const testDirectory = 'tests'; | ||
const testCaseDirectory = 'test-cases'; | ||
const releaseTestFileDirectory = path.join(testDirectory, testCaseDirectory, schemaTypes.release); | ||
const gitlabReleaserTestFileDirectory = path.join(testDirectory, testCaseDirectory, schemaTypes.gitlabReleaser); | ||
const defaultValidReleaseFileName = 'release-valid-all-values.json'; | ||
const defaultSchemaType = schemaTypes.release; | ||
const defaultTag = '0.5.0'; | ||
beforeEach(() => { | ||
jest.clearAllMocks(); | ||
}); | ||
it('should accept valid file with all arguments and return expected command', () => { | ||
expect.assertions(1); | ||
const directory = path.join('tests', 'test-cases'); | ||
const releaseFileName = 'valid-all-values.json'; | ||
const result = getReleaseCliCommand(directory, releaseFileName); | ||
const result = getReleaseCliCommand(releaseTestFileDirectory, defaultValidReleaseFileName, defaultSchemaType, defaultTag); | ||
expect(result).toMatchSnapshot(); | ||
}); | ||
it('should accept invalid file, log error, and exit 1', () => { | ||
it('should pull name value from CHANGELOG if specified', () => { | ||
expect.assertions(1); | ||
const releaseFileName = 'release-valid-changelog-name-with-tag.json'; | ||
// Add mock to catch console output | ||
jest.spyOn(console, 'log').mockImplementation(() => {}); | ||
const result = getReleaseCliCommand(releaseTestFileDirectory, releaseFileName, defaultSchemaType, defaultTag); | ||
expect(result).toMatchSnapshot(); | ||
}); | ||
it('should pull description value from CHANGELOG if specified', () => { | ||
expect.assertions(1); | ||
const releaseFileName = 'release-valid-changelog-desc-with-tag.json'; | ||
// Add mock to catch console output | ||
jest.spyOn(console, 'log').mockImplementation(() => {}); | ||
const result = getReleaseCliCommand(releaseTestFileDirectory, releaseFileName, defaultSchemaType, defaultTag); | ||
expect(result).toMatchSnapshot(); | ||
}); | ||
it('should get release from a valid gitlab-releaser.json file', () => { | ||
expect.assertions(1); | ||
const fileName = 'gitlab-releaser-valid-all-values.json'; | ||
const tag = '0.1.0'; | ||
const resultFromGitlabReleaser = getReleaseCliCommand(gitlabReleaserTestFileDirectory, fileName, schemaTypes.gitlabReleaser, tag); | ||
const resultFromRelease = getReleaseCliCommand(releaseTestFileDirectory, defaultValidReleaseFileName, schemaTypes.release, tag); | ||
expect(resultFromGitlabReleaser).toStrictEqual(resultFromRelease); | ||
}); | ||
const invalidInputTest = (directory, testFileName, schemaType, tag, errorMessage) => { | ||
expect.assertions(2); // eslint-disable-line no-magic-numbers | ||
const testDirectory = 'tests'; | ||
const testCaseDirectory = 'test-cases'; | ||
const testFileDirectory = path.join(testDirectory, testCaseDirectory); | ||
const testFileName = 'invalid-extra-property.json'; | ||
@@ -27,6 +66,31 @@ const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); | ||
getReleaseCliCommand(testFileDirectory, testFileName); | ||
expect(consoleErrorSpy).toHaveBeenCalledWith(`'${path.join(testFileDirectory, testFileName)}' is invalid`); | ||
getReleaseCliCommand(directory, testFileName, schemaType, tag); | ||
expect(consoleErrorSpy.mock.calls[0][0]).toMatch(errorMessage); | ||
expect(processExitSpy).toHaveBeenCalledWith(1); | ||
}; | ||
it('should log error and exit 1 if invalid release.json file is provided', () => { | ||
expect.hasAssertions(); | ||
const testFileName = 'release-invalid-extra-property.json'; | ||
invalidInputTest(releaseTestFileDirectory, testFileName, defaultSchemaType, defaultTag, `"${path.join(releaseTestFileDirectory, testFileName)}" is invalid`); | ||
}); | ||
it('should log error and exit 1 if an invalid gitlab-releaser.json file is provided', () => { | ||
expect.hasAssertions(); | ||
const testFileName = 'gitlab-releaser-invalid-default-extra-property.json'; | ||
invalidInputTest(gitlabReleaserTestFileDirectory, testFileName, schemaTypes.gitlabReleaser, defaultTag, | ||
`"${path.join(gitlabReleaserTestFileDirectory, testFileName)}" is invalid`); | ||
}); | ||
it('should log error and exit 1 if a tag is not specified', () => { | ||
expect.hasAssertions(); | ||
invalidInputTest(releaseTestFileDirectory, defaultValidReleaseFileName, defaultSchemaType, '', 'Tag'); | ||
}); | ||
it('should log error and exit 1 if a valid schema type is not specified', () => { | ||
expect.hasAssertions(); | ||
const schemaType = 'foo'; | ||
invalidInputTest(releaseTestFileDirectory, defaultValidReleaseFileName, schemaType, defaultTag, `Schema type "${schemaType}"`); | ||
}); | ||
}); | ||
@@ -42,2 +106,3 @@ | ||
const saveFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(() => {}); | ||
const consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => {}); | ||
const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); | ||
@@ -50,2 +115,3 @@ const processExitSpy = jest.spyOn(process, 'exit').mockImplementation(() => {}); | ||
saveFileSpy, | ||
consoleLogSpy, | ||
consoleErrorSpy, | ||
@@ -79,2 +145,10 @@ processExitSpy | ||
it('should log that a file was saved and the file name', () => { | ||
expect.assertions(3); // eslint-disable-line no-magic-numbers | ||
const { consoleLogSpy } = saveFileTest(defaultDirectory, defaultFileName, defaultCommand); | ||
expect(consoleLogSpy.mock.calls[0][0]).toMatch('Saved file'); | ||
expect(consoleLogSpy.mock.calls[0][0]).toMatch(defaultDirectory); | ||
expect(consoleLogSpy.mock.calls[0][0]).toMatch(defaultFileName); | ||
}); | ||
it('should log error and exit 1 if directory not specified', () => { | ||
@@ -81,0 +155,0 @@ expect.assertions(2); // eslint-disable-line no-magic-numbers |
@@ -5,24 +5,58 @@ 'use strict'; | ||
const fs = require('fs'); | ||
const schema = require('../lib/schema'); | ||
const { isValidGitLabReleaser, isValidRelease, isValidSchemaType, schemaTypes } = require('../lib/schema'); | ||
describe('schema', () => { | ||
describe('isValidRelease', () => { | ||
describe('is valid schema type', () => { | ||
it('should return true for all valid schema types', () => { | ||
// eslint-disable-next-line jest/prefer-expect-assertions | ||
expect.assertions(Object.values(schemaTypes).length); | ||
Object.values(schemaTypes).forEach(type => { | ||
expect(isValidSchemaType(type)).toStrictEqual(true); | ||
}); | ||
}); | ||
it('should return false for invalid schema type', () => { | ||
expect.assertions(1); | ||
expect(isValidSchemaType('foo')).toStrictEqual(false); | ||
}); | ||
}); | ||
// eslint-disable-next-line max-lines-per-function | ||
describe('schema validity', () => { | ||
const testSchemaValidity = (schemaTypeDirectory, testFiles, validatorFunction) => { | ||
const testDirectory = 'tests'; | ||
const testCaseDirectory = 'test-cases'; | ||
const testFiles = [ | ||
{ file: 'invalid-asset-link.json', expectedResult: false }, | ||
{ file: 'invalid-extra-property.json', expectedResult: false }, | ||
{ file: 'valid-all-values.json', expectedResult: true }, | ||
{ file: 'valid-none.json', expectedResult: true } | ||
]; | ||
testFiles.forEach(({ file, expectedResult }) => { | ||
const validity = expectedResult ? 'valid' : 'invalid'; | ||
testFiles.forEach(file => { | ||
const validity = file.includes('invalid') ? 'invalid' : 'valid'; | ||
const expectedResult = validity === 'valid'; | ||
it(`should find that file '${file}' is ${validity}`, () => { | ||
expect.assertions(1); | ||
const data = JSON.parse(fs.readFileSync(path.join(testDirectory, testCaseDirectory, file))); | ||
expect(schema.isValidRelease(data)).toStrictEqual(expectedResult); | ||
const data = JSON.parse(fs.readFileSync(path.join(testDirectory, testCaseDirectory, schemaTypeDirectory, file))); | ||
expect(validatorFunction(data)).toStrictEqual(expectedResult); | ||
}); | ||
}); | ||
}; | ||
describe('is valid gitlab releaser', () => { | ||
const schemaTypeDirectory = 'gitlab-releaser'; | ||
const testFiles = [ | ||
'gitlab-releaser-valid-all-values.json', | ||
'gitlab-releaser-valid-none.json', | ||
'gitlab-releaser-invalid-default-extra-property.json', | ||
'gitlab-releaser-invalid-release-asset-link.json' | ||
]; | ||
testSchemaValidity(schemaTypeDirectory, testFiles, isValidGitLabReleaser); | ||
}); | ||
describe('is valid release', () => { | ||
const schemaTypeDirectory = 'release'; | ||
const testFiles = [ | ||
'release-invalid-asset-link.json', | ||
'release-invalid-extra-property.json', | ||
'release-valid-all-values.json', | ||
'release-valid-none.json' | ||
]; | ||
testSchemaValidity(schemaTypeDirectory, testFiles, isValidRelease); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
61438
43
1138
0
184
5
+ Addedci-logger@^3.0.1
+ Addedcommander@^6.2.0
+ Addedgitlab-ci-env@^3.2.0
+ Addedreleaselog@^1.0.4
+ Added@sindresorhus/is@4.6.0(transitive)
+ Addedci-logger@3.0.5(transitive)
+ Addedcommander@6.2.17.2.0(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedgitlab-ci-env@3.7.0(transitive)
+ Addedreleaselog@1.0.9(transitive)