Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Feb 12, 2024
1 parent 197fbcf commit 94f44d0
Show file tree
Hide file tree
Showing 124 changed files with 689 additions and 230 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
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)
15 changes: 15 additions & 0 deletions .changeset/config.json
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
}
}
150 changes: 150 additions & 0 deletions .changeset/my-changelog-config.js
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
5 changes: 5 additions & 0 deletions .changeset/sour-paws-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/design-system-components': patch
---

**cli**: first release test
94 changes: 93 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "Apache-2.0",
"scripts": {
"format": "nx format:write",
"registry": "bash scripts/registry"
"registry": "bash scripts/registry",
"changeset": "node scripts/changeset.mjs"
},
"private": true,
"devDependencies": {
Expand All @@ -27,6 +28,7 @@
"@nx/rollup": "18.0.4",
"@nx/vite": "18.0.4",
"@nx/web": "18.0.4",
"@nxkit/style-dictionary": "^5.0.0",
"@stencil/core": "~4.11.0",
"@stencil/sass": "~3.0.8",
"@swc-node/register": "~1.8.0",
Expand All @@ -43,7 +45,6 @@
"@vitest/ui": "^1.0.4",
"eslint": "~8.56.0",
"eslint-config-prettier": "^9.0.0",
"svgo": "~3.2.0",
"fs-extra": "11.2.0",
"glob": "~10.3.10",
"jest": "^29.4.1",
Expand All @@ -55,8 +56,10 @@
"lodash.upperfirst": "~4.3.1",
"nx": "18.0.4",
"prettier": "~3.2.4",
"prompts": "~2.4.2",
"shelljs": "~0.8.5",
"style-dictionary": "^3.9.0",
"svgo": "~3.2.0",
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"typescript": "~4.8.2",
Expand Down
19 changes: 11 additions & 8 deletions packages/icons/package.json
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"
}
4 changes: 3 additions & 1 deletion packages/icons/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"outputPath": "dist/packages/icons",
"main": "packages/icons/src/index.ts",
"tsConfig": "packages/icons/tsconfig.lib.json",
"assets": [],
"assets": [
"packages/icons/src/assets"
],
"project": "packages/icons/package.json",
"compiler": "swc",
"format": ["cjs", "esm"]
Expand Down
Loading

0 comments on commit 94f44d0

Please sign in to comment.