-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
124 changed files
with
689 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", | ||
"changelog": ["./my-changelog-config.js", { "repo": "baloise-incubator/ds-playground" }], | ||
"commit": false, | ||
"fixed": [["@baloise/ds-*"]], | ||
"ignore ": [["@baloise/ds-output-target-*"]], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [], | ||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { | ||
"onlyUpdatePeerDependentsWhenOutOfRange": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
'use strict' | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }) | ||
|
||
var dotenv = require('dotenv') | ||
var getGithubInfo = require('@changesets/get-github-info') | ||
|
||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
}) | ||
} else { | ||
obj[key] = value | ||
} | ||
|
||
return obj | ||
} | ||
|
||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object) | ||
|
||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object) | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable | ||
}) | ||
keys.push.apply(keys, symbols) | ||
} | ||
|
||
return keys | ||
} | ||
|
||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {} | ||
|
||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]) | ||
}) | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)) | ||
}) | ||
} | ||
} | ||
|
||
return target | ||
} | ||
|
||
dotenv.config() | ||
const changelogFunctions = { | ||
getDependencyReleaseLine: async (changesets, dependenciesUpdated, options) => { | ||
return '' | ||
// if (!options.repo) { | ||
// throw new Error('Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]'); | ||
// } | ||
|
||
// if (dependenciesUpdated.length === 0) return ""; | ||
// const changesetLink = `- Updated dependencies [${(await Promise.all(changesets.map(async cs => { | ||
// if (cs.commit) { | ||
// let { | ||
// links | ||
// } = await getGithubInfo.getInfo({ | ||
// repo: options.repo, | ||
// commit: cs.commit | ||
// }); | ||
// return links.commit; | ||
// } | ||
// }))).filter(_ => _).join(", ")}]:`; | ||
// const updatedDepenenciesList = dependenciesUpdated.map(dependency => ` - ${dependency.name}@${dependency.newVersion}`); | ||
// return [changesetLink, ...updatedDepenenciesList].join("\n"); | ||
}, | ||
getReleaseLine: async (changeset, type, options) => { | ||
if (!options || !options.repo) { | ||
throw new Error( | ||
'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]', | ||
) | ||
} | ||
|
||
let prFromSummary | ||
let commitFromSummary | ||
let usersFromSummary = [] | ||
const replacedChangelog = changeset.summary | ||
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => { | ||
let num = Number(pr) | ||
if (!isNaN(num)) prFromSummary = num | ||
return '' | ||
}) | ||
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => { | ||
commitFromSummary = commit | ||
return '' | ||
}) | ||
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => { | ||
usersFromSummary.push(user) | ||
return '' | ||
}) | ||
.trim() | ||
const [firstLine, ...futureLines] = replacedChangelog.split('\n').map(l => l.trimRight()) | ||
const links = await (async () => { | ||
if (prFromSummary !== undefined) { | ||
let { links } = await getGithubInfo.getInfoFromPullRequest({ | ||
repo: options.repo, | ||
pull: prFromSummary, | ||
}) | ||
|
||
if (commitFromSummary) { | ||
links = _objectSpread2( | ||
_objectSpread2({}, links), | ||
{}, | ||
{ | ||
commit: `[\`${commitFromSummary}\`](https://github.com/${options.repo}/commit/${commitFromSummary})`, | ||
}, | ||
) | ||
} | ||
|
||
return links | ||
} | ||
|
||
const commitToFetchFrom = commitFromSummary || changeset.commit | ||
|
||
if (commitToFetchFrom) { | ||
let { links } = await getGithubInfo.getInfo({ | ||
repo: options.repo, | ||
commit: commitToFetchFrom, | ||
}) | ||
return links | ||
} | ||
|
||
return { | ||
commit: null, | ||
pull: null, | ||
user: null, | ||
} | ||
})() | ||
const prefix = links.pull === null ? ` ${links.commit}` : ` ${links.pull}` | ||
return `\n- ${firstLine} ${prefix ? `(${prefix})` : ''}\n${futureLines.map(l => ` ${l}`).join('\n')}${ | ||
futureLines && futureLines.length > 0 ? '\n' : '' | ||
}` | ||
}, | ||
} | ||
|
||
exports.default = changelogFunctions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@baloise/design-system-components': patch | ||
--- | ||
|
||
**cli**: first release test |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
{ | ||
"name": "@baloise/ds-icons", | ||
"version": "0.0.1", | ||
"dependencies": {}, | ||
"type": "commonjs", | ||
"main": "./index.cjs", | ||
"module": "./index.js", | ||
"files": [ | ||
"svg" | ||
] | ||
"version": "0.0.0", | ||
"description": "The Baloise Design-System is an open source project for styling awesome web applications that follow the Baloise corporate styling guidelines.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/baloise/design-system.git" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"homepage": "https://design.baloise.dev", | ||
"license": "Apache-2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.