gitlab-releaser
Advanced tools
Comparing version 1.0.3 to 1.0.4
# Changelog | ||
## v1.0.4 (2021-05-12) | ||
### Fixed | ||
- Updated to latest dependencies, including resolving vulnerabilities | ||
### Miscellaneous | ||
- Optimized published package to only include the minimum required files (#20) | ||
## v1.0.3 (2021-03-27) | ||
@@ -4,0 +14,0 @@ |
@@ -25,3 +25,3 @@ 'use strict'; | ||
const getReleaseFromGitLabReleaser = (data, tag) => { | ||
const releaseData = data.releases && Object.keys(data.releases).includes(tag) ? data.releases[tag]: {}; | ||
const releaseData = data.releases && Object.keys(data.releases).includes(tag) ? data.releases[tag] : {}; | ||
return Object.assign(Object.create(null), data.defaults, releaseData); | ||
@@ -28,0 +28,0 @@ }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const getOption = (value, optionName) => { | ||
return value ? ` ${optionName} ${escapeString(value)}`: ''; | ||
return value ? ` ${optionName} ${escapeString(value)}` : ''; | ||
}; | ||
@@ -9,0 +9,0 @@ |
{ | ||
"name": "gitlab-releaser", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Generate arguments for GitLab release-cli command", | ||
@@ -29,2 +29,8 @@ "bin": "./bin/gitlab-releaser.js", | ||
}, | ||
"files": [ | ||
"index.js", | ||
"lib/", | ||
"bin/", | ||
"schemas/" | ||
], | ||
"bugs": { | ||
@@ -38,3 +44,2 @@ "url": "https://gitlab.com/gitlab-ci-utils/gitlab-releaser/issues" | ||
"eslint": "^7.23.0", | ||
"husky": "^4.3.8", | ||
"jest": "^26.6.3", | ||
@@ -44,36 +49,9 @@ "jest-junit": "^12.0.0", | ||
}, | ||
"jest": { | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"**/*.js", | ||
"!**/bin/**", | ||
"!**/coverage/**" | ||
], | ||
"reporters": [ | ||
"default", | ||
[ | ||
"jest-junit", | ||
{ | ||
"suiteNameTemplate": "{filename}", | ||
"classNameTemplate": "{classname}", | ||
"titleTemplate": "{title}" | ||
} | ||
] | ||
], | ||
"verbose": true, | ||
"testEnvironment": "node" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "npm run lint", | ||
"pre-push": "npm run push" | ||
} | ||
}, | ||
"dependencies": { | ||
"ajv": "^8.0.0", | ||
"ci-logger": "^3.0.4", | ||
"ajv": "^8.3.0", | ||
"ci-logger": "^3.0.5", | ||
"commander": "^7.2.0", | ||
"gitlab-ci-env": "^3.7.0", | ||
"releaselog": "^1.0.8" | ||
"releaselog": "^1.0.9" | ||
} | ||
} |
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://gitlab.com/gitlab-ci-utils/gitlab-releaser/-/raw/master/schemas/gitlab-releaser.schema.json", | ||
"title": "GitLab Releaser Input", | ||
"description": "JSON schema containing defaults and all release data for a project as input to GitLab Releaser", | ||
"type": "object", | ||
"properties": { | ||
"defaults": { | ||
"description": "Default values applicable to all releases", | ||
"$ref": "#/definitions/release" | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://gitlab.com/gitlab-ci-utils/gitlab-releaser/-/raw/master/schemas/gitlab-releaser.schema.json", | ||
"title": "GitLab Releaser Input", | ||
"description": "JSON schema containing defaults and all release data for a project as input to GitLab Releaser", | ||
"type": "object", | ||
"properties": { | ||
"defaults": { | ||
"description": "Default values applicable to all releases", | ||
"$ref": "#/definitions/release" | ||
}, | ||
"releases": { | ||
"description": "Details for each release (will override defaults)", | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/release" | ||
}, | ||
"minProperties": 1 | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"definitions": { | ||
"release": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "The release name", | ||
"type": "string" | ||
}, | ||
"releases": { | ||
"description": "Details for each release (will override defaults)", | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/release" | ||
}, | ||
"minProperties": 1 | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"definitions": { | ||
"release": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "The release name", | ||
"description": { | ||
"description": "The description of the release (i.e. release notes), you can use Markdown", | ||
"type": "string" | ||
}, | ||
"tag_name": { | ||
"description": "The tag the release will be created from (defaults to $CI_COMMIT_TAG)", | ||
"type": "string" | ||
}, | ||
"ref": { | ||
"description": "If tag_name doesn’t exist, the release will be created from ref; it can be a commit SHA, another tag name, or a branch name (defaults to $CI_COMMIT_SHA)", | ||
"type": "string" | ||
}, | ||
"assets": { | ||
"description": "Assets associated with a release", | ||
"type": "object", | ||
"properties": { | ||
"links": { | ||
"description": "List of asset links associated with a release", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "The name of the link", | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "The description of the release (i.e. release notes), you can use Markdown", | ||
}, | ||
"url": { | ||
"description": "The URL of the link", | ||
"type": "string" | ||
}, | ||
"tag_name": { | ||
"description": "The tag the release will be created from (defaults to $CI_COMMIT_TAG)", | ||
}, | ||
"type": { | ||
"description": "The type of the link: other (default), runbook, image, package", | ||
"enum": [ | ||
"other", | ||
"runbook", | ||
"image", | ||
"package" | ||
] | ||
}, | ||
"filepath": { | ||
"description": "Optional path for a Direct Asset link", | ||
"type": "string" | ||
} | ||
}, | ||
"ref": { | ||
"description": "If tag_name doesn’t exist, the release will be created from ref; it can be a commit SHA, another tag name, or a branch name (defaults to $CI_COMMIT_SHA)", | ||
"type": "string" | ||
}, | ||
"assets": { | ||
"description": "Assets associated with a release", | ||
"type": "object", | ||
"properties": { | ||
"links": { | ||
"description": "List of asset links associated with a release", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "The name of the link", | ||
"type": "string" | ||
}, | ||
"url": { | ||
"description": "The URL of the link", | ||
"type": "string" | ||
}, | ||
"type": { | ||
"description": "The type of the link: other (default), runbook, image, package", | ||
"enum": [ | ||
"other", | ||
"runbook", | ||
"image", | ||
"package" | ||
] | ||
}, | ||
"filepath": { | ||
"description": "Optional path for a Direct Asset link", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"name", | ||
"url" | ||
] | ||
}, | ||
"minItems": 1, | ||
"maxItems": 100, | ||
"uniqueItems": true | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"links" | ||
] | ||
}, | ||
"milestones": { | ||
"description": "List of the titles of each milestone the release is associated with (each milestone needs to exist)", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"released_at": { | ||
"description": "The date when the release will be/was ready; defaults to the current time; expected in ISO 8601 format (2019-03-15T08:00:00Z)", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
"additionalProperties": false, | ||
"required": [ | ||
"name", | ||
"url" | ||
] | ||
}, | ||
"minItems": 1, | ||
"maxItems": 100, | ||
"uniqueItems": true | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"links" | ||
] | ||
}, | ||
"milestones": { | ||
"description": "List of the titles of each milestone the release is associated with (each milestone needs to exist)", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"released_at": { | ||
"description": "The date when the release will be/was ready; defaults to the current time; expected in ISO 8601 format (2019-03-15T08:00:00Z)", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://gitlab.com/gitlab-ci-utils/gitlab-releaser/-/raw/master/schemas/release.schema.json", | ||
"title": "GitLab Release-CLI Input", | ||
"description": "JSON schema representing a release for input to GitLab Release-CLI", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "The release name", | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "The description of the release (i.e. release notes), you can use Markdown", | ||
"type": "string" | ||
}, | ||
"tag_name": { | ||
"description": "The tag the release will be created from (defaults to $CI_COMMIT_TAG)", | ||
"type": "string" | ||
}, | ||
"ref": { | ||
"description": "If tag_name doesn’t exist, the release will be created from ref; it can be a commit SHA, another tag name, or a branch name (defaults to $CI_COMMIT_SHA)", | ||
"type": "string" | ||
}, | ||
"assets": { | ||
"description": "Assets associated with a release", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://gitlab.com/gitlab-ci-utils/gitlab-releaser/-/raw/master/schemas/release.schema.json", | ||
"title": "GitLab Release-CLI Input", | ||
"description": "JSON schema representing a release for input to GitLab Release-CLI", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "The release name", | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "The description of the release (i.e. release notes), you can use Markdown", | ||
"type": "string" | ||
}, | ||
"tag_name": { | ||
"description": "The tag the release will be created from (defaults to $CI_COMMIT_TAG)", | ||
"type": "string" | ||
}, | ||
"ref": { | ||
"description": "If tag_name doesn’t exist, the release will be created from ref; it can be a commit SHA, another tag name, or a branch name (defaults to $CI_COMMIT_SHA)", | ||
"type": "string" | ||
}, | ||
"assets": { | ||
"description": "Assets associated with a release", | ||
"type": "object", | ||
"properties": { | ||
"links": { | ||
"description": "List of asset links associated with a release", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"links": { | ||
"description": "List of asset links associated with a release", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "The name of the link", | ||
"type": "string" | ||
}, | ||
"url": { | ||
"description": "The URL of the link", | ||
"type": "string" | ||
}, | ||
"type": { | ||
"description": "The type of the link: other (default), runbook, image, package", | ||
"enum": [ | ||
"other", | ||
"runbook", | ||
"image", | ||
"package" | ||
] | ||
}, | ||
"filepath": { | ||
"description": "Optional path for a Direct Asset link", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"name", | ||
"url" | ||
] | ||
}, | ||
"minItems": 1, | ||
"maxItems": 100, | ||
"uniqueItems": true | ||
} | ||
"name": { | ||
"description": "The name of the link", | ||
"type": "string" | ||
}, | ||
"url": { | ||
"description": "The URL of the link", | ||
"type": "string" | ||
}, | ||
"type": { | ||
"description": "The type of the link: other (default), runbook, image, package", | ||
"enum": [ | ||
"other", | ||
"runbook", | ||
"image", | ||
"package" | ||
] | ||
}, | ||
"filepath": { | ||
"description": "Optional path for a Direct Asset link", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"links" | ||
"name", | ||
"url" | ||
] | ||
}, | ||
"milestones": { | ||
"description": "List of the titles of each milestone the release is associated with (each milestone needs to exist)", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"released_at": { | ||
"description": "The date when the release will be/was ready; defaults to the current time; expected in ISO 8601 format (2019-03-15T08:00:00Z)", | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"maxItems": 100, | ||
"uniqueItems": true | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"links" | ||
] | ||
}, | ||
"additionalProperties": false | ||
"milestones": { | ||
"description": "List of the titles of each milestone the release is associated with (each milestone needs to exist)", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"released_at": { | ||
"description": "The date when the release will be/was ready; defaults to the current time; expected in ISO 8601 format (2019-03-15T08:00:00Z)", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
Sorry, the diff of this file is not supported yet
6
2
26011
12
415
Updatedajv@^8.3.0
Updatedci-logger@^3.0.5
Updatedreleaselog@^1.0.9