Skip to content

Commit

Permalink
[d3-chart] fixed reexporting in semcore/ui
Browse files Browse the repository at this point in the history
  • Loading branch information
msereniti committed May 14, 2024
1 parent 1270d54 commit bc36a54
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
23 changes: 20 additions & 3 deletions .ci/lint-commit-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (!commitTitle) {

if (!commitTitle.startsWith('[') || !commitTitle.includes(']')) {
outputError(
`Should be in format "[scope] change description"${pc.gray(
`Should be in format "[scope] change description" or "[xxxxxxxxx][scope] change description"${pc.gray(
', e.g. "[button] added blockchain support"]',
)}`,
);
Expand All @@ -45,8 +45,25 @@ if (!commitTitle.includes('] ')) {
outputError(`Missing in "] " in message of format "[scope${pc.red('] ')}change description" `);
}

const scope = commitTitle.substring(1, commitTitle.indexOf('] '));
const description = commitTitle.substring(commitTitle.indexOf('] ') + 3);
let taskId: null | string = null;
let scope: null | string = null;
let description: null | string = null;

if (commitTitle.includes('][')) {
taskId = commitTitle.substring(1, commitTitle.indexOf(']['));
scope = commitTitle.substring(
commitTitle.indexOf('][') + 2,
commitTitle.indexOf('] ', commitTitle.indexOf('][')),
);
description = commitTitle.substring(commitTitle.indexOf('] ', commitTitle.indexOf('][')) + 2);
} else {
scope = commitTitle.substring(1, commitTitle.indexOf('] '));
description = commitTitle.substring(commitTitle.indexOf('] ') + 3);
}

if (taskId && taskId.length !== 9) {
outputError(`Got task id "${taskId}" in message while it's expected to be 9 characters long`);
}

if (!scope) {
outputError('Got empty scope in message of format "[scope] change description"');
Expand Down
6 changes: 6 additions & 0 deletions semcore/d3-chart/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).

## [3.40.1] - 2024-05-14

### Fixed

- Exporting from `@semcore/ui` package.

## [3.40.0] - 2024-05-10

### Changed
Expand Down
2 changes: 1 addition & 1 deletion semcore/ui/generate-reexport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const dirname = path.resolve(filename, '..');

const components = fs.readJSONSync(path.resolve(dirname, './components.json'));

const EXPORT_DEFAULT_REG = /export ({ default|default)/gm;
const EXPORT_DEFAULT_REG = /export ({ default }|default)/gm;

const hasExportDefault = async (dependency: string) => {
const require = createRequire(import.meta.url);
Expand Down

0 comments on commit bc36a54

Please sign in to comment.