From 890b47571f8b551b0257d9fead1d787ac013cdd5 Mon Sep 17 00:00:00 2001 From: Andrey Myssak Date: Mon, 29 May 2023 18:35:57 +0600 Subject: [PATCH] Update the default branch (#584) Co-authored-by: Sergey Myssak Signed-off-by: Andrey Myssak --- FAQ.md | 2 +- scripts/deploy/deploy_docs | 4 ++-- scripts/update-changelog-version.js | 17 ++++++++++------- src-docs/src/views/datagrid/datagrid_example.js | 2 +- src-docs/src/views/guidelines/sass.js | 12 ++++++------ src-docs/src/views/home/home_view.js | 6 +++--- src-docs/src/views/package/changelog.js | 2 +- src-docs/src/views/package/i18n_tokens.js | 2 +- src-docs/src/views/tool_tip/tool_tip_example.js | 2 +- wiki/documentation-guidelines.md | 6 +++--- 10 files changed, 29 insertions(+), 26 deletions(-) diff --git a/FAQ.md b/FAQ.md index f7173c787f..fd5fe85032 100644 --- a/FAQ.md +++ b/FAQ.md @@ -14,7 +14,7 @@ Yes, but be aware of the [license](LICENSE) as always. The roadmap and prioritie We use [semver](https://semver.org/) for versioning and use that to denote breaking changes in OUI upgrades. We consider API changes in our prop names or existing component functionality to be a reason for a breaking change, but do not consider renaming of CSS selectors, mixins, or other style changes to be breaking. -Traditionally releases are made weekly against whatever is in master and you can upgrade from NPM as you see fit. +Traditionally releases are made weekly against whatever is in main and you can upgrade from NPM as you see fit. ## How do you handle Typescript, Sass and theming? diff --git a/scripts/deploy/deploy_docs b/scripts/deploy/deploy_docs index f2c3e466e0..d8eeb9a110 100755 --- a/scripts/deploy/deploy_docs +++ b/scripts/deploy/deploy_docs @@ -41,7 +41,7 @@ set +x # Expected env variables: # * GPROJECT - GCE project name, e.g. elastic-bekitzur # * GCE_ACCOUNT - credentials for the google service account (JSON blob) -# * GIT_BRANCH - current Git branch or tag (e.g. "refs/heads/master", "v18.2.1") +# * GIT_BRANCH - current Git branch or tag (e.g. "refs/heads/main", "v18.2.1") if [[ -z "${GPROJECT}" ]]; then echo "GPROJECT is not set, e.g. 'GPROJECT=elastic-bekitzur'" @@ -52,7 +52,7 @@ if [[ -z "${GCE_ACCOUNT}" ]]; then exit 1 fi if [[ -z "${GIT_BRANCH}" ]]; then - echo "GIT_BRANCH is not set, e.g. 'GIT_BRANCH=refs/heads/master'" + echo "GIT_BRANCH is not set, e.g. 'GIT_BRANCH=refs/heads/main'" exit 1 fi diff --git a/scripts/update-changelog-version.js b/scripts/update-changelog-version.js index 9f1df53404..945162b190 100644 --- a/scripts/update-changelog-version.js +++ b/scripts/update-changelog-version.js @@ -21,17 +21,20 @@ const { version } = require(pathToPackage); const pathToChangelog = path.resolve(cwd, 'CHANGELOG.md'); let changelogContents = fs.readFileSync(pathToChangelog).toString(); -const masterHeading = '## [`master`](https://github.com/opensearch-project/oui/tree/master)'; -// sanity check, changelog should start with master heading -if (changelogContents.indexOf(masterHeading) !== 0) { - console.error(`Cannot update CHANGELOG.md: does not start with expected heading "${masterHeading}"`); +const mainHeading = + '## [`main`](https://github.com/opensearch-project/oui/tree/main)'; +// sanity check, changelog should start with main heading +if (changelogContents.indexOf(mainHeading) !== 0) { + console.error( + `Cannot update CHANGELOG.md: does not start with expected heading "${mainHeading}"` + ); process.exit(1); } -// Insert the changelog template after the master header +// Insert the changelog template after the main header changelogContents = changelogContents.replace( - masterHeading, - `${masterHeading} + mainHeading, + `${mainHeading} No public interface changes since \`${version}\`. diff --git a/src-docs/src/views/datagrid/datagrid_example.js b/src-docs/src/views/datagrid/datagrid_example.js index 02004839ed..0f020e791b 100644 --- a/src-docs/src/views/datagrid/datagrid_example.js +++ b/src-docs/src/views/datagrid/datagrid_example.js @@ -427,7 +427,7 @@ export const DataGridExample = { explanation on the lower level object types. The majority of the types are defined in the{' '} /datagrid/data_grid_types.ts {' '} diff --git a/src-docs/src/views/guidelines/sass.js b/src-docs/src/views/guidelines/sass.js index b06c5f0e8e..52a03a8257 100644 --- a/src-docs/src/views/guidelines/sass.js +++ b/src-docs/src/views/guidelines/sass.js @@ -611,11 +611,11 @@ export const SassGuidelines = ({ selectedTheme }) => {

View the{' '} - + variable {' '} and{' '} - + mixins {' '} Sass code for typography. For most of your components we recommend @@ -753,7 +753,7 @@ export const SassGuidelines = ({ selectedTheme }) => {

- + View the Sass code for shadow mixins . @@ -888,7 +888,7 @@ export const SassGuidelines = ({ selectedTheme }) => {

If you need to further customize the position or side of the overflow shadow use the ouiOverflowShadow{' '} - + mixin . @@ -903,7 +903,7 @@ export const SassGuidelines = ({ selectedTheme }) => {

- + View the Sass code for media queries . @@ -983,7 +983,7 @@ export const SassGuidelines = ({ selectedTheme }) => { Animation

- + View the Sass code for animation . diff --git a/src-docs/src/views/home/home_view.js b/src-docs/src/views/home/home_view.js index feacba70aa..fa86cfe2d0 100644 --- a/src-docs/src/views/home/home_view.js +++ b/src-docs/src/views/home/home_view.js @@ -66,7 +66,7 @@ export const HomeView = () => (

- + Getting started @@ -76,7 +76,7 @@ export const HomeView = () => ( - + Contributing @@ -212,7 +212,7 @@ export const HomeView = () => (

OUI is licensed under{' '} - + Apache License 2.0 {' '} | © OpenSearch contributors, {new Date().getFullYear()}. diff --git a/src-docs/src/views/package/changelog.js b/src-docs/src/views/package/changelog.js index a23ed60a7c..682d6c3739 100644 --- a/src-docs/src/views/package/changelog.js +++ b/src-docs/src/views/package/changelog.js @@ -15,7 +15,7 @@ import { OuiMarkdownFormat } from '../../../../src'; import { GuidePage } from '../../components/guide_page'; const changelogSource = require('!!raw-loader!../../../../CHANGELOG.md').default.replace( - /## \[`master`\].+?##/s, // remove the `master` heading & contents + /## \[`main`\].+?##/s, // remove the `main` heading & contents '##' ); diff --git a/src-docs/src/views/package/i18n_tokens.js b/src-docs/src/views/package/i18n_tokens.js index e765349c83..a67077d9a4 100644 --- a/src-docs/src/views/package/i18n_tokens.js +++ b/src-docs/src/views/package/i18n_tokens.js @@ -36,7 +36,7 @@ const columns = [ + href={`https://github.com/opensearch-project/oui/blob/main/${filepath}#L${loc.start.line}`}> {filepath}:{loc.start.line}:{loc.start.column} diff --git a/src-docs/src/views/tool_tip/tool_tip_example.js b/src-docs/src/views/tool_tip/tool_tip_example.js index 9359a31ab6..49d9be1b26 100644 --- a/src-docs/src/views/tool_tip/tool_tip_example.js +++ b/src-docs/src/views/tool_tip/tool_tip_example.js @@ -88,7 +88,7 @@ export const ToolTipExample = { pass in a custom component, then you’ll need to make sure these props are applied to the root element rendered by your component. The best way to do that is to follow{' '} - + OUI’s guidelines on pass-through props . diff --git a/wiki/documentation-guidelines.md b/wiki/documentation-guidelines.md index 9ada424101..5c89843fa1 100644 --- a/wiki/documentation-guidelines.md +++ b/wiki/documentation-guidelines.md @@ -51,7 +51,7 @@ import { // ... -View the Sass code for shadow mixins. +View the Sass code for shadow mixins. ``` ## Adding snippets @@ -134,7 +134,7 @@ Most documentation pages include a [playground section](https://oui.opensearch.o ### Toggles for required props -Props marked required for a component typically do not have default values and therefore need to be set for the playground to work well. For example, the `children` prop, which can be set in the component's [`playground.js` file](https://github.com/opensearch-project/oui/blob/master/src-docs/src/views/accordion/playground.js): +Props marked required for a component typically do not have default values and therefore need to be set for the playground to work well. For example, the `children` prop, which can be set in the component's [`playground.js` file](https://github.com/opensearch-project/oui/blob/main/src-docs/src/views/accordion/playground.js): ```js propsToUse.children = { @@ -213,7 +213,7 @@ import { ExampleContext } from '../../services'; Any updates to the `src/` folder require an entry in the [CHANGELOG.md](../CHANGELOG.md) file. Documentation-only changes do not. Here are our guidelines for updating the file: -* Append your changes to the `master` sub-heading of `CHANGELOG.md`. +* Append your changes to the `main` sub-heading of `CHANGELOG.md`. * Add a list item for each significant change in the PR: bugs that were fixed, new features, new components, or changes to the public API * In the list item, always link to any relevant pull requests * Add a summary of what has changed, making sure it's informative to consumers who might be unaware of implementation details