From c1bcc38be8cc2f278c9518c1e4825576186e15fc Mon Sep 17 00:00:00 2001 From: Louis Bompart Date: Mon, 26 Aug 2024 15:14:55 -0400 Subject: [PATCH] chore: setup v2 legacy releases https://coveord.atlassian.net/browse/KIT-3466 --- .github/workflows/dependency-review.yml | 2 +- .github/workflows/masterbot.yml | 3 +-- .github/workflows/package-lock-root-fail.yml | 4 ++-- .github/workflows/package-lock-root-success.yml | 4 ++-- nx.json | 2 +- package.json | 2 +- .../atomic-hosted-page/src/components/utils/options-utils.ts | 2 +- packages/atomic/cypress/e2e/pager.cypress.ts | 2 +- .../atomic-commerce-pager.new.stories.tsx | 4 ++-- .../atomic-commerce-pager/e2e/atomic-commerce-pager.e2e.ts | 2 +- .../product-template-decorators.tsx | 2 +- packages/headless-react/README.md | 2 +- packages/headless/src/app/engine-configuration.ts | 4 ++-- .../default/lwc/quanticFeedbackModal/quanticFeedbackModal.js | 2 +- .../lwc/quanticFeedbackModalQna/quanticFeedbackModalQna.js | 2 +- scripts/reports/bundle-size/time-series.mjs | 2 +- utils/release/common/constants.mjs | 2 +- utils/release/lock-master.mjs | 2 +- 18 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 54e4d95fd06..76b656aef2d 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -2,7 +2,7 @@ name: 'Dependency Review' on: pull_request: - branches: ['master'] + branches: ['v2'] permissions: contents: read diff --git a/.github/workflows/masterbot.yml b/.github/workflows/masterbot.yml index 0ac29c00cf9..5ef0c16ccc0 100644 --- a/.github/workflows/masterbot.yml +++ b/.github/workflows/masterbot.yml @@ -2,8 +2,7 @@ name: Master Robot on: push: branches: - - master - - 'prerelease/**' + - v2 jobs: build: name: 'Build' diff --git a/.github/workflows/package-lock-root-fail.yml b/.github/workflows/package-lock-root-fail.yml index ebdc7f87b8f..738adea5fb0 100644 --- a/.github/workflows/package-lock-root-fail.yml +++ b/.github/workflows/package-lock-root-fail.yml @@ -2,13 +2,13 @@ name: 'package-lock.json root validator' on: push: - branches: [master] + branches: [v2] paths: - '**/package-lock.json' - '!utils/atomic-storybook/package-lock.json' - '!package-lock.json' pull_request: - branches: [master] + branches: [v2] paths: - '**/package-lock.json' - '!utils/atomic-storybook/package-lock.json' diff --git a/.github/workflows/package-lock-root-success.yml b/.github/workflows/package-lock-root-success.yml index 054e5195d33..172c4f52c0a 100644 --- a/.github/workflows/package-lock-root-success.yml +++ b/.github/workflows/package-lock-root-success.yml @@ -2,12 +2,12 @@ name: 'package-lock.json root validator' on: push: - branches: [master] + branches: [v2] paths-ignore: - '**/package-lock.json' - '!package-lock.json' pull_request: - branches: [master] + branches: [v2] paths-ignore: - '**/package-lock.json' - '!package-lock.json' diff --git a/nx.json b/nx.json index a3ab67db235..10da6340e57 100644 --- a/nx.json +++ b/nx.json @@ -129,7 +129,7 @@ ] } }, - "defaultBase": "master", + "defaultBase": "v2", "$schema": "./node_modules/nx/schemas/nx-schema.json", "useInferencePlugins": false } diff --git a/package.json b/package.json index 7393571ceaf..f17f9fe5f13 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "scripts": { "postinstall": "husky install && patch-package && npx playwright install", - "reset:install": "git checkout origin/master package-lock.json && npm i", + "reset:install": "git checkout origin/v2 package-lock.json && npm i", "clean:install": "git clean -xfd && npm run reset:install", "dev:atomic": "concurrently \"npm run -w @coveo/headless dev\" \"npm run -w @coveo/atomic start\"", "build": "nx run-many --target=build", diff --git a/packages/atomic-hosted-page/src/components/utils/options-utils.ts b/packages/atomic-hosted-page/src/components/utils/options-utils.ts index a073633e203..9a41781d4e9 100644 --- a/packages/atomic-hosted-page/src/components/utils/options-utils.ts +++ b/packages/atomic-hosted-page/src/components/utils/options-utils.ts @@ -23,7 +23,7 @@ export interface InitializationOptions { * * For example: `https://orgid.admin.org.coveo.com` * - * The [getOrganizationEndpoints](https://github.com/coveo/ui-kit/blob/master/packages/headless/src/api/platform-client.ts) helper function can be useful to create the appropriate object. + * The [getOrganizationEndpoints](https://github.com/coveo/ui-kit/blob/v2/packages/headless/src/api/platform-client.ts) helper function can be useful to create the appropriate object. * * We recommend using this option, since it has resiliency benefits and simplifies the overall configuration for multi-region deployments. */ diff --git a/packages/atomic/cypress/e2e/pager.cypress.ts b/packages/atomic/cypress/e2e/pager.cypress.ts index c195f7b2b5d..4ea46a48f06 100644 --- a/packages/atomic/cypress/e2e/pager.cypress.ts +++ b/packages/atomic/cypress/e2e/pager.cypress.ts @@ -153,7 +153,7 @@ describe('Pager Test Suites', () => { describe('Should allow customization of', () => { const iconTypes = ['previous', 'next']; const testCustomIcon = - 'https://raw.githubusercontent.com/coveo/ui-kit/master/packages/atomic/src/images/arrow-top-rounded.svg'; + 'https://raw.githubusercontent.com/coveo/ui-kit/v2/packages/atomic/src/images/arrow-top-rounded.svg'; beforeEach(() => { cy.intercept({ diff --git a/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx index 1dcd6a0f354..087bff27acd 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx @@ -33,9 +33,9 @@ export const CustomIcon: Story = { tags: ['commerce'], args: { 'attributes-previous-button-icon': - 'https://raw.githubusercontent.com/coveo/ui-kit/master/packages/atomic/src/images/arrow-top-rounded.svg', + 'https://raw.githubusercontent.com/coveo/ui-kit/v2/packages/atomic/src/images/arrow-top-rounded.svg', 'attributes-next-button-icon': - 'https://raw.githubusercontent.com/coveo/ui-kit/master/packages/atomic/src/images/arrow-top-rounded.svg', + 'https://raw.githubusercontent.com/coveo/ui-kit/v2/packages/atomic/src/images/arrow-top-rounded.svg', }, play: async (context) => { await play(context); diff --git a/packages/atomic/src/components/commerce/atomic-commerce-pager/e2e/atomic-commerce-pager.e2e.ts b/packages/atomic/src/components/commerce/atomic-commerce-pager/e2e/atomic-commerce-pager.e2e.ts index 3cfb9b991e4..0f958b6f1d7 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-pager/e2e/atomic-commerce-pager.e2e.ts +++ b/packages/atomic/src/components/commerce/atomic-commerce-pager/e2e/atomic-commerce-pager.e2e.ts @@ -190,7 +190,7 @@ test.describe('with numberOfPages=-5', () => { test.describe('should allow custom icons', () => { const customIcon = - 'https://raw.githubusercontent.com/coveo/ui-kit/master/packages/atomic/src/images/arrow-top-rounded.svg'; + 'https://raw.githubusercontent.com/coveo/ui-kit/v2/packages/atomic/src/images/arrow-top-rounded.svg'; test.beforeEach(async ({pager}) => { await pager.load({story: 'custom-icon'}); diff --git a/packages/atomic/src/components/commerce/product-template-components/product-template-decorators.tsx b/packages/atomic/src/components/commerce/product-template-components/product-template-decorators.tsx index c66828b22e8..a4c9ee7fd5c 100644 --- a/packages/atomic/src/components/commerce/product-template-components/product-template-decorators.tsx +++ b/packages/atomic/src/components/commerce/product-template-components/product-template-decorators.tsx @@ -16,7 +16,7 @@ import { * @ProductContext() private product!: Product; * ``` * - * For more information and examples, view the [Utilities section](https://github.com/coveo/ui-kit/tree/master/packages/atomic#utilities) of the Coveo Atomic README. + * For more information and examples, view the [Utilities section](https://github.com/coveo/ui-kit/tree/v2/packages/atomic#utilities) of the Coveo Atomic README. */ export function ProductContext(opts: {folded: boolean} = {folded: false}) { return ItemContext({parentName: 'atomic-product', folded: opts.folded}); diff --git a/packages/headless-react/README.md b/packages/headless-react/README.md index b75d204cf12..f8f1b4ea72d 100644 --- a/packages/headless-react/README.md +++ b/packages/headless-react/README.md @@ -5,5 +5,5 @@ ## Learn more - Checkout our [Documentation](https://docs.coveo.com/en/headless/latest/usage/headless-server-side-rendering/) -- Refer to [samples/headless-ssr](https://github.com/coveo/ui-kit/tree/master/packages/samples/headless-ssr/) for examples. +- Refer to [samples/headless-ssr](https://github.com/coveo/ui-kit/tree/v2/packages/samples/headless-ssr/) for examples. - All exports from `@coveo/headless/ssr` are also available from under `@coveo/headless-react/ssr` as convenience. diff --git a/packages/headless/src/app/engine-configuration.ts b/packages/headless/src/app/engine-configuration.ts index 6f026d34507..e2e92218a27 100644 --- a/packages/headless/src/app/engine-configuration.ts +++ b/packages/headless/src/app/engine-configuration.ts @@ -18,7 +18,7 @@ import {CoveoFramework} from '../utils/version'; * * For example: `https://orgid.org.coveo.com` * - * The [getOrganizationEndpoints](https://github.com/coveo/ui-kit/blob/master/packages/headless/src/api/platform-client.ts) helper function can be useful to create the appropriate object. + * The [getOrganizationEndpoints](https://github.com/coveo/ui-kit/blob/v2/packages/headless/src/api/platform-client.ts) helper function can be useful to create the appropriate object. */ export interface CoreEngineOrganizationEndpoints { /** @@ -83,7 +83,7 @@ export interface EngineConfiguration< * * For example: `https://orgid.org.coveo.com` * - * The [getOrganizationEndpoints](https://github.com/coveo/ui-kit/blob/master/packages/headless/src/api/platform-client.ts) helper function can be useful to create the appropriate object. + * The [getOrganizationEndpoints](https://github.com/coveo/ui-kit/blob/v2/packages/headless/src/api/platform-client.ts) helper function can be useful to create the appropriate object. * * We recommend using this option, since it has resiliency benefits and simplifies the overall configuration for multi-region deployments. See [Organization endpoints](https://docs.coveo.com/en/mcc80216). */ diff --git a/packages/quantic/force-app/main/default/lwc/quanticFeedbackModal/quanticFeedbackModal.js b/packages/quantic/force-app/main/default/lwc/quanticFeedbackModal/quanticFeedbackModal.js index 8ff6d8a4ba0..47256b69c78 100644 --- a/packages/quantic/force-app/main/default/lwc/quanticFeedbackModal/quanticFeedbackModal.js +++ b/packages/quantic/force-app/main/default/lwc/quanticFeedbackModal/quanticFeedbackModal.js @@ -20,7 +20,7 @@ import successTemplate from './success.html'; * The `QuanticFeedbackModal` component overlays a message modal on top of the current app window, the modal contains a form that allows the user to give feedback. * * Under the hood, the component relies on a [`lightningModal`](https://developer.salesforce.com/docs/component-library/bundle/lightning-modal/documentation) component. - * For an example of how to use the `QuanticFeedbackModal` component, see the [`quanticSmartSnippet`](https://github.com/coveo/ui-kit/blob/master/packages/quantic/force-app/main/default/lwc/quanticSmartSnippet/quanticSmartSnippet.js) implementation. + * For an example of how to use the `QuanticFeedbackModal` component, see the [`quanticSmartSnippet`](https://github.com/coveo/ui-kit/blob/v2/packages/quantic/force-app/main/default/lwc/quanticSmartSnippet/quanticSmartSnippet.js) implementation. * * @category Search * @category Insight Panel diff --git a/packages/quantic/force-app/main/default/lwc/quanticFeedbackModalQna/quanticFeedbackModalQna.js b/packages/quantic/force-app/main/default/lwc/quanticFeedbackModalQna/quanticFeedbackModalQna.js index cf72cbfd9bd..b6b5397a08c 100644 --- a/packages/quantic/force-app/main/default/lwc/quanticFeedbackModalQna/quanticFeedbackModalQna.js +++ b/packages/quantic/force-app/main/default/lwc/quanticFeedbackModalQna/quanticFeedbackModalQna.js @@ -32,7 +32,7 @@ import successTemplate from './templates/success.html'; * The `QuanticFeedbackModalQna` component overlays a message modal on top of the current app window, the modal contains a form that allows the user to give feedback on a CRGA response. * * Under the hood, the component relies on a [`lightningModal`](https://developer.salesforce.com/docs/component-library/bundle/lightning-modal/documentation) component. - * For an example of how to use the `QuanticFeedbackModalQna` component, see the [`quanticGeneratedAnswer`](https://github.com/coveo/ui-kit/blob/master/packages/quantic/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js) implementation. + * For an example of how to use the `QuanticFeedbackModalQna` component, see the [`quanticGeneratedAnswer`](https://github.com/coveo/ui-kit/blob/v2/packages/quantic/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js) implementation. * * @category Search * @category Insight Panel diff --git a/scripts/reports/bundle-size/time-series.mjs b/scripts/reports/bundle-size/time-series.mjs index 57493eecd22..1ee4c4429aa 100644 --- a/scripts/reports/bundle-size/time-series.mjs +++ b/scripts/reports/bundle-size/time-series.mjs @@ -5,7 +5,7 @@ const branch = process.env.GIT_BRANCH; const fileName = 'bundle-size-time-series.csv'; function isMasterBranch() { - return branch === 'origin/master'; + return branch === 'origin/v2'; } function dataFileExists() { diff --git a/utils/release/common/constants.mjs b/utils/release/common/constants.mjs index a4469049a39..cf821791350 100644 --- a/utils/release/common/constants.mjs +++ b/utils/release/common/constants.mjs @@ -4,7 +4,7 @@ import {fileURLToPath} from 'node:url'; export const REPO_HOST = 'https://github.com'; export const REPO_OWNER = 'coveo'; export const REPO_NAME = 'ui-kit'; -export const REPO_MAIN_BRANCH = 'master'; +export const REPO_MAIN_BRANCH = 'v2'; export const REPO_FS_ROOT = resolve( dirname(fileURLToPath(import.meta.url)), '..', diff --git a/utils/release/lock-master.mjs b/utils/release/lock-master.mjs index 2244758878c..e72b5caa613 100644 --- a/utils/release/lock-master.mjs +++ b/utils/release/lock-master.mjs @@ -10,7 +10,7 @@ import { REPO_OWNER, } from './common/constants.mjs'; -const RELEASE_FREEZE_ID = 215874; +const RELEASE_FREEZE_ID = 1510095; export const limitWriteAccessToBot = () => changeBranchRestrictions(true);