Merge pull request #29468 from secustor/chore/only-upgrade-yarn-to-v4
chore: upgrade yarn to v4
This commit is contained in:
File diff suppressed because one or more lines are too long
Vendored
-875
File diff suppressed because one or more lines are too long
+935
File diff suppressed because one or more lines are too long
+3
-5
@@ -1,3 +1,5 @@
|
||||
compressionLevel: mixed
|
||||
|
||||
enableGlobalCache: true
|
||||
|
||||
httpTimeout: 300000
|
||||
@@ -6,8 +8,4 @@ nodeLinker: node-modules
|
||||
|
||||
npmRegistryServer: 'https://registry.npmjs.org/'
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||
spec: '@yarnpkg/plugin-workspace-tools'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.8.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.8.1.cjs
|
||||
|
||||
+1767
-1767
File diff suppressed because it is too large
Load Diff
+4635
-4635
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -105,6 +105,9 @@
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"ast-types@0.14.2": "patch:ast-types@npm%3A0.14.2#./.yarn/patches/ast-types-npm-0.14.2-43c4ac4b0d.patch",
|
||||
"ast-types@^0.14.1": "patch:ast-types@npm%3A0.14.2#./.yarn/patches/ast-types-npm-0.14.2-43c4ac4b0d.patch",
|
||||
"csstype@npm:^3.0.2": "3.0.9",
|
||||
"csstype@npm:^3.1.2": "3.0.9",
|
||||
"csstype@npm:^3.1.3": "3.0.9",
|
||||
"jest-haste-map@^29.7.0": "patch:jest-haste-map@npm%3A29.7.0#./.yarn/patches/jest-haste-map-npm-29.7.0-e3be419eff.patch"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -149,7 +152,7 @@
|
||||
"typedoc": "^0.27.6",
|
||||
"typescript": "~5.6.0"
|
||||
},
|
||||
"packageManager": "yarn@3.8.1",
|
||||
"packageManager": "yarn@4.8.1",
|
||||
"engines": {
|
||||
"node": "20 || 22"
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^",
|
||||
"@backstage/plugin-catalog-react": "workspace:^",
|
||||
"@backstage/plugin-techdocs-addons-test-utils": "workspace:^",
|
||||
"@backstage/test-utils": "workspace:^",
|
||||
"@testing-library/dom": "^10.0.0",
|
||||
|
||||
+13
@@ -20,6 +20,7 @@ import React from 'react';
|
||||
import { fireEvent, waitFor } from '@testing-library/react';
|
||||
|
||||
import { ExpandableNavigation } from '../plugin';
|
||||
import { entityPresentationApiRef } from '@backstage/plugin-catalog-react';
|
||||
|
||||
const mockNavWithSublevels = (
|
||||
<div data-md-component="navigation">
|
||||
@@ -84,11 +85,21 @@ const mockNavWithoutSublevels = (
|
||||
);
|
||||
|
||||
describe('ExpandableNavigation', () => {
|
||||
const entityPresentationApiMock = {
|
||||
forEntity: jest.fn(),
|
||||
};
|
||||
entityPresentationApiMock.forEntity.mockReturnValue({
|
||||
snapshot: {
|
||||
primaryTitle: 'Test Entity',
|
||||
},
|
||||
});
|
||||
|
||||
it('renders without exploding', async () => {
|
||||
const { getByRole } = await TechDocsAddonTester.buildAddonsInTechDocs([
|
||||
<ExpandableNavigation />,
|
||||
])
|
||||
.withDom(mockNavWithSublevels)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
expect(getByRole('button', { name: 'expand-nav' })).toBeInTheDocument();
|
||||
@@ -100,6 +111,7 @@ describe('ExpandableNavigation', () => {
|
||||
<ExpandableNavigation />,
|
||||
])
|
||||
.withDom(mockNavWithSublevels)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
const toggles =
|
||||
@@ -137,6 +149,7 @@ describe('ExpandableNavigation', () => {
|
||||
<ExpandableNavigation />,
|
||||
])
|
||||
.withDom(mockNavWithoutSublevels)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
expect(
|
||||
|
||||
@@ -19,13 +19,24 @@ import { TechDocsAddonTester } from '@backstage/plugin-techdocs-addons-test-util
|
||||
import React from 'react';
|
||||
|
||||
import { LightBox } from '../plugin';
|
||||
import { entityPresentationApiRef } from '@backstage/plugin-catalog-react';
|
||||
|
||||
describe('LightBox', () => {
|
||||
const entityPresentationApiMock = {
|
||||
forEntity: jest.fn(),
|
||||
};
|
||||
entityPresentationApiMock.forEntity.mockReturnValue({
|
||||
snapshot: {
|
||||
primaryTitle: 'Test Entity',
|
||||
},
|
||||
});
|
||||
|
||||
it('renders without exploding', async () => {
|
||||
const { getByText } = await TechDocsAddonTester.buildAddonsInTechDocs([
|
||||
<LightBox />,
|
||||
])
|
||||
.withDom(<body>TEST_CONTENT</body>)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
expect(getByText('TEST_CONTENT')).toBeInTheDocument();
|
||||
@@ -42,6 +53,7 @@ describe('LightBox', () => {
|
||||
alt="dog"
|
||||
/>,
|
||||
)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
expect(getByTestId('fixture').onclick).not.toBeUndefined();
|
||||
|
||||
@@ -21,6 +21,7 @@ import { fireEvent, waitFor } from '@testing-library/react';
|
||||
|
||||
import { scmIntegrationsApiRef } from '@backstage/integration-react';
|
||||
import { ReportIssue } from '../plugin';
|
||||
import { entityPresentationApiRef } from '@backstage/plugin-catalog-react';
|
||||
|
||||
const byUrl = jest.fn();
|
||||
|
||||
@@ -52,6 +53,15 @@ describe('ReportIssue', () => {
|
||||
containsNode: () => true,
|
||||
} as unknown as Selection;
|
||||
|
||||
const entityPresentationApiMock = {
|
||||
forEntity: jest.fn(),
|
||||
};
|
||||
entityPresentationApiMock.forEntity.mockReturnValue({
|
||||
snapshot: {
|
||||
primaryTitle: 'Test Entity',
|
||||
},
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
@@ -93,7 +103,10 @@ describe('ReportIssue', () => {
|
||||
</body>
|
||||
</html>,
|
||||
)
|
||||
.withApis([[scmIntegrationsApiRef, { byUrl }]])
|
||||
.withApis([
|
||||
[scmIntegrationsApiRef, { byUrl }],
|
||||
[entityPresentationApiRef, entityPresentationApiMock],
|
||||
])
|
||||
.renderWithEffects();
|
||||
|
||||
(shadowRoot as ShadowRoot & Pick<Document, 'getSelection'>).getSelection =
|
||||
@@ -151,7 +164,10 @@ describe('ReportIssue', () => {
|
||||
</body>
|
||||
</html>,
|
||||
)
|
||||
.withApis([[scmIntegrationsApiRef, { byUrl }]])
|
||||
.withApis([
|
||||
[scmIntegrationsApiRef, { byUrl }],
|
||||
[entityPresentationApiRef, entityPresentationApiMock],
|
||||
])
|
||||
.renderWithEffects();
|
||||
|
||||
(shadowRoot as ShadowRoot & Pick<Document, 'getSelection'>).getSelection =
|
||||
@@ -217,7 +233,10 @@ describe('ReportIssue', () => {
|
||||
</body>
|
||||
</html>,
|
||||
)
|
||||
.withApis([[scmIntegrationsApiRef, { byUrl }]])
|
||||
.withApis([
|
||||
[scmIntegrationsApiRef, { byUrl }],
|
||||
[entityPresentationApiRef, entityPresentationApiMock],
|
||||
])
|
||||
.renderWithEffects();
|
||||
|
||||
(shadowRoot as ShadowRoot & Pick<Document, 'getSelection'>).getSelection =
|
||||
|
||||
@@ -19,6 +19,7 @@ import React from 'react';
|
||||
import { act, fireEvent, waitFor } from '@testing-library/react';
|
||||
import { TextSize } from '../plugin';
|
||||
import { useShadowRootElements } from '@backstage/plugin-techdocs-react';
|
||||
import { entityPresentationApiRef } from '@backstage/plugin-catalog-react';
|
||||
|
||||
jest.mock('@backstage/plugin-techdocs-react', () => ({
|
||||
...jest.requireActual('@backstage/plugin-techdocs-react'),
|
||||
@@ -28,6 +29,15 @@ jest.mock('@backstage/plugin-techdocs-react', () => ({
|
||||
describe('TextSize', () => {
|
||||
const useShadowRootElementsMock = useShadowRootElements as jest.Mock;
|
||||
|
||||
const entityPresentationApiMock = {
|
||||
forEntity: jest.fn(),
|
||||
};
|
||||
entityPresentationApiMock.forEntity.mockReturnValue({
|
||||
snapshot: {
|
||||
primaryTitle: 'Test Entity',
|
||||
},
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
useShadowRootElementsMock.mockReturnValue([]);
|
||||
});
|
||||
@@ -37,6 +47,7 @@ describe('TextSize', () => {
|
||||
<TextSize />,
|
||||
])
|
||||
.withDom(<body>TEST_CONTENT</body>)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
expect(getByText('TEST_CONTENT')).toBeInTheDocument();
|
||||
@@ -46,6 +57,7 @@ describe('TextSize', () => {
|
||||
const { getByTitle, getByText, getByRole, getByDisplayValue } =
|
||||
await TechDocsAddonTester.buildAddonsInTechDocs([<TextSize />])
|
||||
.withDom(<body>TEST_CONTENT</body>)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
const content = getByText('TEST_CONTENT');
|
||||
@@ -103,6 +115,7 @@ describe('TextSize', () => {
|
||||
getByDisplayValue,
|
||||
} = await TechDocsAddonTester.buildAddonsInTechDocs([<TextSize />])
|
||||
.withDom(<body>TEST_CONTENT</body>)
|
||||
.withApis([[entityPresentationApiRef, entityPresentationApiMock]])
|
||||
.renderWithEffects();
|
||||
|
||||
const content = getByText('TEST_CONTENT');
|
||||
|
||||
+1190
-1190
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user