Skip to content

Commit 471374b

Browse files
authored
Merge branch 'main' into patch-1
2 parents 799559d + acaaafd commit 471374b

File tree

8 files changed

+695
-189
lines changed

8 files changed

+695
-189
lines changed

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
bump:
7+
required: true
8+
type: choice
9+
options:
10+
- major
11+
- minor
12+
- patch
13+
- premajor
14+
- preminor
15+
- prepatch
16+
- prerelease
17+
- from-git
18+
- from-package
19+
20+
jobs:
21+
release:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: volta-cli/action@v3
26+
- name: Dependencies
27+
run: yarn
28+
- name: Lint
29+
run: yarn lint
30+
- name: Build
31+
run: yarn build
32+
- name: Test
33+
run: yarn test
34+
- name: Do Release
35+
run: |
36+
yarn lerna publish ${{ github.event.inputs.bump }} --yes --summary-file
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
- name: Release info
40+
run: cat ./lerna-publish-summary.json
41+
- name: Read new version
42+
run: |
43+
pkg=$(cat ./packages/core/package.json)
44+
ver=$(jq -r '.version' <<< $pkg)
45+
echo "version=$ver" >> $GITHUB_ENV
46+
echo "New Version is $ver"
47+
- name: Check Changelog
48+
run: |
49+
if ! test -f "./next-release-notes.md"; then
50+
exit 1
51+
fi
52+
echo "Changelog:"
53+
cat ./next-release-notes.md
54+
- name: Update Changelog
55+
run: |
56+
now="$(date +'%d/%m/%Y')"
57+
# sorry
58+
echo -e "$(sed -n '1,6p' ./packages/docs/docs/changelog.mdx)\n\n## ${{env.version}} - $now\n\n$(cat ./next-release-notes.md)\n\n\n$(sed -n '6,99999p' ./packages/docs/docs/changelog.mdx)" > ./packages/docs/docs/changelog.mdx
59+
- name: Github Release
60+
uses: softprops/action-gh-release@v1
61+
with:
62+
body_path: next-release-notes.md
63+
name: ${{env.version}}
64+
tag_name: ${{env.version}}
65+
files: |
66+
lerna-publish-summary.json
67+
next-release-notes.md
68+
LICENSE
69+
- name: Prepare next Changelog
70+
run: |
71+
rm ./next-release-notes.md
72+
cp ./next-release-notes-template.md ./next-release-notes.md
73+
- name: Push next Changelog
74+
uses: EndBug/add-and-commit@v9
75+
with:
76+
add: './next-release-notes.md'
77+
author_name: lukasbachbot
78+
author_email: [email protected]
79+
message: 'chore: reset next release notes [skip-ci]'

next-release-notes-template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!--
2+
### Breaking Changes
3+
4+
### Features
5+
6+
### Bug Fixes and Improvements
7+
8+
### Other Changes
9+
-->

next-release-notes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Bug Fixes and Improvements
2+
* Fixed a bug where autofocus for the search input was not working for blueprintjs
3+
renderers (#197)
4+
* Fixed a bug where tree labels where not set (#195)
5+
* Reduce react peer dependency requirement to v16 (#196)
6+
7+
### Other Changes
8+
* Upgraded storybook and yarn dependencies in dev tooling
9+
* Added release pipeline in CI

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
"lint:fix": "eslint --ext .ts,.tsx packages/ --fix"
2121
},
2222
"devDependencies": {
23-
"@storybook/addon-a11y": "^6.5.13",
24-
"@storybook/addon-actions": "^6.5.13",
25-
"@storybook/addon-docs": "^6.5.13",
26-
"@storybook/addon-essentials": "^6.5.13",
27-
"@storybook/addon-links": "^6.5.13",
28-
"@storybook/addons": "^6.5.13",
29-
"@storybook/builder-webpack5": "^6.5.13",
30-
"@storybook/manager-webpack5": "^6.5.13",
23+
"@storybook/addon-a11y": "^6.5.14",
24+
"@storybook/addon-actions": "^6.5.14",
25+
"@storybook/addon-docs": "^6.5.14",
26+
"@storybook/addon-essentials": "^6.5.14",
27+
"@storybook/addon-links": "^6.5.14",
28+
"@storybook/addons": "^6.5.14",
29+
"@storybook/builder-webpack5": "^6.5.14",
30+
"@storybook/manager-webpack5": "^6.5.14",
3131
"@storybook/preset-typescript": "^3.0.0",
32-
"@storybook/react": "^6.5.13",
32+
"@storybook/react": "^6.5.14",
3333
"@types/storybook__react": "^5.2.1",
3434
"@typescript-eslint/eslint-plugin": "^5.41.0",
3535
"@typescript-eslint/parser": "^5.41.0",
@@ -42,7 +42,7 @@
4242
"eslint-plugin-prettier": "^4.2.1",
4343
"eslint-plugin-react": "^7.31.10",
4444
"eslint-plugin-react-hooks": "^4.6.0",
45-
"eslint-plugin-storybook": "^0.6.6",
45+
"eslint-plugin-storybook": "^0.6.8",
4646
"lerna": "^6.1.0",
4747
"prettier": "^2.7.1",
4848
"react": "^18.2.0",

packages/core/src/search/SearchInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const SearchInput: React.FC<{
7777
clearSearch();
7878
},
7979
ref: el => {
80-
el?.focus();
80+
el?.focus?.();
8181
},
8282
'aria-label': 'Search for items', // TODO
8383
...({

packages/core/src/tree/useCreatedTreeInformation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ export const useCreatedTreeInformation = (
2121
isProgrammaticallyDragging: dnd.isProgrammaticallyDragging ?? false,
2222
treeId: tree.treeId,
2323
rootItem: tree.rootItem,
24+
treeLabel: tree.treeLabel,
25+
treeLabelledBy: tree.treeLabelledBy,
2426
}),
2527
[
2628
environment.activeTreeId,
2729
tree.treeId,
2830
tree.rootItem,
31+
tree.treeLabel,
32+
tree.treeLabelledBy,
2933
renamingItem,
3034
selectedItems?.length,
3135
search,

packages/core/src/treeItem/TreeItemRenamingInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const TreeItemRenamingInput: React.FC<{
4646

4747
if (environment.autoFocus ?? true) {
4848
inputRef.current?.select();
49-
inputRef.current?.focus();
49+
inputRef.current?.focus?.();
5050
}
5151
},
5252
[environment, treeId],

0 commit comments

Comments
 (0)