From 11c1f93ae2de0de30c6ed627729fa53d2bad89eb Mon Sep 17 00:00:00 2001 From: Javier Pedemonte Date: Wed, 26 Apr 2023 13:21:03 -0500 Subject: [PATCH] chore: upgrade mustache and other deps (#508) * chore: ignore pdf.js lib in public/assets * chore: upgrade mustache and other deps * chore: upgrade rollup TS plugin * chore: upgrade ts-loader --- examples/discovery-search-app/.gitignore | 3 +- package.json | 6 +- .../discovery-react-components/package.json | 10 +- .../rollup.config.js | 1 - .../src/components/CIDocument/types.ts | 6 +- .../utils/__tests__/elementFromPoint.spec.ts | 8 +- .../__tests__/DocumentPreview.test.tsx | 6 +- .../utils/common/TextNormalizer.ts | 2 +- .../__tests__/SimpleDocument.test.tsx | 21 +- .../utils/__tests__/documentData.test.ts | 9 +- .../__tests__/CollapsibleFacetsGroup.test.tsx | 28 +-- .../components/__tests__/FieldFacets.test.tsx | 4 +- .../__tests__/SearchResults.test.tsx | 9 +- .../Result/__tests__/Result.test.tsx | 2 +- .../__tests__/StructuredQuery.test.tsx | 3 +- .../__tests__/RuleGroupDropdown.test.tsx | 4 +- .../document/__tests__/processDoc.spec.tsx | 8 +- .../__tests__/transformEnrichment.spec.tsx | 59 +++-- yarn.lock | 216 ++++++++---------- 19 files changed, 205 insertions(+), 200 deletions(-) diff --git a/examples/discovery-search-app/.gitignore b/examples/discovery-search-app/.gitignore index fae18a508..6c3bd2b8f 100644 --- a/examples/discovery-search-app/.gitignore +++ b/examples/discovery-search-app/.gitignore @@ -1,3 +1,4 @@ -build ibm-credentials.env .env.local +build +public/assets/** diff --git a/package.json b/package.json index 28db6b972..8d732fe29 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@commitlint/config-conventional": "^11.0.0", "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^11.2.7", - "@testing-library/react-hooks": "^7.0.2", + "@testing-library/react-hooks": "^8.0.1", "@types/babel__preset-env": "^7.9.2", "@types/classnames": "^2.2.9", "@types/debounce": "^1.2.0", @@ -30,7 +30,7 @@ "@types/jest": "^24.0.18", "@types/lodash": "^4.14.141", "@types/md5": "2.3.2", - "@types/mustache": "^0.8.32", + "@types/mustache": "^4.2.2", "@types/node": "^16.18.23", "@types/react": "^17.0.38", "@types/react-dom": "^17.0.11", @@ -74,7 +74,7 @@ "regenerator-runtime": "^0.13.3", "seedrandom": "^3.0.5", "source-map-explorer": "2.0.1", - "ts-loader": "^6.2.1", + "ts-loader": "^9.4.2", "typescript": "^3.8.2", "vue": "^2.6.11", "webpack": "5.72.1", diff --git a/packages/discovery-react-components/package.json b/packages/discovery-react-components/package.json index d68e5d907..79035a0db 100644 --- a/packages/discovery-react-components/package.json +++ b/packages/discovery-react-components/package.json @@ -33,13 +33,13 @@ "dependencies": { "@react-hook/size": "^2.1.2", "buffer": "^6.0.3", - "classnames": "^2.2.6", - "debounce": "^1.2.0", + "classnames": "^2.3.2", + "debounce": "^1.2.1", "dompurify": "^3.0.2", - "entities": "^4.4.0", + "entities": "^4.5.0", "htmlparser2": "^4.0.0", "lodash": "^4.17.21", - "mustache": "^3.1.0", + "mustache": "^4.2.0", "pdfjs-dist": "2.6.347", "react-error-boundary": "^1.2.5", "react-resize-detector": "^4.2.1", @@ -73,7 +73,7 @@ "rollup": "^2.57.0", "rollup-plugin-string": "^3.0.0", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.30.0", + "rollup-plugin-typescript2": "^0.34.1", "sass-embedded": "^1.52.2", "sass-loader": "^12.3.0", "style-loader": "^1.3.0", diff --git a/packages/discovery-react-components/rollup.config.js b/packages/discovery-react-components/rollup.config.js index 53e4d723f..f6d10eb46 100644 --- a/packages/discovery-react-components/rollup.config.js +++ b/packages/discovery-react-components/rollup.config.js @@ -59,7 +59,6 @@ const COMMON_PLUGINS = [ include: [pdfWorkerRegex] }), typescript({ - rollupCommonJSResolveHack: true, clean: true, tsconfig: 'tsconfig.prod.json' }) diff --git a/packages/discovery-react-components/src/components/CIDocument/types.ts b/packages/discovery-react-components/src/components/CIDocument/types.ts index daf839616..ad3fc5ea3 100644 --- a/packages/discovery-react-components/src/components/CIDocument/types.ts +++ b/packages/discovery-react-components/src/components/CIDocument/types.ts @@ -48,13 +48,13 @@ export interface ItemMap { export type EnrichedHtml = EnrichedHtmlContract | EnrichedHtmlInvoice | EnrichedHtmlPurchaseOrder; -interface EnrichedHtmlContract { +export interface EnrichedHtmlContract { contract: Contract; } -interface EnrichedHtmlInvoice { +export interface EnrichedHtmlInvoice { invoice: Invoice; } -interface EnrichedHtmlPurchaseOrder { +export interface EnrichedHtmlPurchaseOrder { purchase_order: PurchaseOrder; } diff --git a/packages/discovery-react-components/src/components/CIDocument/utils/__tests__/elementFromPoint.spec.ts b/packages/discovery-react-components/src/components/CIDocument/utils/__tests__/elementFromPoint.spec.ts index 4dde3f653..fe8980359 100644 --- a/packages/discovery-react-components/src/components/CIDocument/utils/__tests__/elementFromPoint.spec.ts +++ b/packages/discovery-react-components/src/components/CIDocument/utils/__tests__/elementFromPoint.spec.ts @@ -42,7 +42,7 @@ describe('elementFromPoint returns expected mock element', () => { }); it('runs elementsFromPoint function for standard web browsers', () => { - document.elementsFromPoint = (x: number, y: number): Element[] => { + document.elementsFromPoint = (_x: number, _y: number): Element[] => { return mockElements as unknown as Element[]; }; @@ -51,7 +51,7 @@ describe('elementFromPoint returns expected mock element', () => { }); it('runs elementFromPointMs function for MS Edge browser', () => { - (document as MsDocument).msElementsFromPoint = (x: number, y: number): HTMLElement[] => { + (document as MsDocument).msElementsFromPoint = (_x: number, _y: number): HTMLElement[] => { return mockElements as unknown as HTMLElement[]; }; @@ -61,7 +61,7 @@ describe('elementFromPoint returns expected mock element', () => { it('runs elementFromPointFallback function for older browsers', () => { let nextElementIndex = 0; - document.elementFromPoint = (x: number, y: number): Element | null => { + document.elementFromPoint = (_x: number, _y: number): Element | null => { return nextElementIndex < mockElements.length ? (mockElements[nextElementIndex++] as unknown as Element) : null; @@ -73,7 +73,7 @@ describe('elementFromPoint returns expected mock element', () => { it('runs elementFromPointFallback and fails to find element', () => { let nextElementIndex = 0; - document.elementFromPoint = (x: number, y: number): Element | null => { + document.elementFromPoint = (_x: number, _y: number): Element | null => { return nextElementIndex < mockElements.length ? (mockElements[nextElementIndex++] as unknown as Element) : null; diff --git a/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx b/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx index b7a862364..19ac1795f 100644 --- a/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx +++ b/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx @@ -190,7 +190,7 @@ describe('DocumentPreview', () => { const results = { matching_results: 1, results: [selectedResult] - }; + } as unknown as DiscoveryV2.QueryResponse; render( { const results = { matching_results: 1, results: [selectedResult] - }; + } as unknown as DiscoveryV2.QueryResponse; render( { const results = { matching_results: 1, results: [selectedResult] - }; + } as unknown as DiscoveryV2.QueryResponse; render( { throw new Error(); @@ -16,7 +17,7 @@ describe('SimpleDocument', () => { extracted_metadata: { filename: 'i_am_a_file' } - }; + } as unknown as DiscoveryV2.QueryResult; beforeAll(() => { window.HTMLElement.prototype.scrollIntoView = jest.fn(); @@ -29,6 +30,8 @@ describe('SimpleDocument', () => { document={minimalDoc} setHideToolbarControls={(): void => {}} setLoading={(): void => {}} + loading={false} + hideToolbarControls={false} /> ); }); @@ -42,9 +45,11 @@ describe('SimpleDocument', () => { act(() => { ({ getByText } = render( {}} setHideToolbarControls={(): void => mock('setHideToolbarControls called')} + loading={false} + hideToolbarControls={false} /> )); }); @@ -59,7 +64,7 @@ describe('SimpleDocument', () => { const documentText = 'This is the text of the document.'; const customDoc = { body_field: documentText - }; + } as unknown as DiscoveryV2.QueryResult; const context: Partial = { componentSettings: { fields_shown: { @@ -79,6 +84,8 @@ describe('SimpleDocument', () => { document={customDoc} setHideToolbarControls={(): void => {}} setLoading={(): void => {}} + loading={false} + hideToolbarControls={false} />, api, context @@ -96,7 +103,7 @@ describe('SimpleDocument', () => { const customDoc = { body_field: bodyText, passage_field: passageText - }; + } as unknown as DiscoveryV2.QueryResult; const context: Partial = { componentSettings: { @@ -126,6 +133,8 @@ describe('SimpleDocument', () => { highlight={highlight} setHideToolbarControls={(): void => {}} setLoading={(): void => {}} + loading={false} + hideToolbarControls={false} />, api, context diff --git a/packages/discovery-react-components/src/components/DocumentPreview/utils/__tests__/documentData.test.ts b/packages/discovery-react-components/src/components/DocumentPreview/utils/__tests__/documentData.test.ts index bb52630a0..1d180a897 100644 --- a/packages/discovery-react-components/src/components/DocumentPreview/utils/__tests__/documentData.test.ts +++ b/packages/discovery-react-components/src/components/DocumentPreview/utils/__tests__/documentData.test.ts @@ -1,10 +1,11 @@ +import { QueryResult } from 'ibm-watson/discovery/v2'; import { detectPreviewType, getTextMappings, isCsvFile, isJsonFile } from '../documentData'; import jsonDoc from '../../__fixtures__/Art Effects Koya Creative Base TSA 2008.pdf.json'; describe('documentData', () => { const noMetadata = { extracted_metadata: {} - }; + } as unknown as QueryResult; let consoleError: jest.SpyInstance; @@ -73,7 +74,7 @@ describe('documentData', () => { extracted_metadata: { file_type: 'json' } - }; + } as unknown as QueryResult; it('returns true if the document is a JSON file', () => { const docTypeJson = isJsonFile(jsonFileType); expect(docTypeJson).toEqual(true); @@ -83,7 +84,7 @@ describe('documentData', () => { extracted_metadata: { file_type: 'csv' } - }; + } as unknown as QueryResult; it('returns true if the document is a CSV file', () => { const docTypeJson = isCsvFile(csvFileType); expect(docTypeJson).toEqual(true); @@ -93,7 +94,7 @@ describe('documentData', () => { extracted_metadata: { file_type: true } - }; + } as unknown as QueryResult; it('returns false if the file type provided is not a string', () => { const falseDocType = isJsonFile(noStringFileType); expect(falseDocType).toEqual(false); diff --git a/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/CollapsibleFacetsGroup.test.tsx b/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/CollapsibleFacetsGroup.test.tsx index a814fbffa..1858f08f2 100644 --- a/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/CollapsibleFacetsGroup.test.tsx +++ b/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/CollapsibleFacetsGroup.test.tsx @@ -108,7 +108,7 @@ describe('CollapsibleFacetsGroupComponent', () => { const { searchFacetsComponent } = setup({ collapsedFacetsCount: 2 }); const authorFacets = await searchFacetsComponent.findAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && ['Research (138993)', 'Analytics (57158)', 'Documentation (32444)'].includes(content) ); }); @@ -117,7 +117,7 @@ describe('CollapsibleFacetsGroupComponent', () => { // Check MultiSelect facets const subjectFacets = searchFacetsComponent.queryAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && [ 'Neural network (138993)', 'Reinforced learning (57158)', @@ -135,7 +135,7 @@ describe('CollapsibleFacetsGroupComponent', () => { fireEvent.click(locationCategoryHeader); const locationFacets = searchFacetsComponent.queryAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && [ 'us (57158)', 'eu (57158)', @@ -154,7 +154,7 @@ describe('CollapsibleFacetsGroupComponent', () => { const { searchFacetsComponent } = setup({ collapsedFacetsCount: 2 }); const authorFacets = await searchFacetsComponent.findAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && ['Research (138993)', 'Analytics (57158)', 'Documentation (32444)'].includes(content) ); }); @@ -164,7 +164,7 @@ describe('CollapsibleFacetsGroupComponent', () => { fireEvent.click(showMoreButtons[1]); const subjectFacets = searchFacetsComponent.queryAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && [ 'Neural network (138993)', 'Reinforced learning (57158)', @@ -182,7 +182,7 @@ describe('CollapsibleFacetsGroupComponent', () => { const { searchFacetsComponent } = setup({ collapsedFacetsCount: 2 }); const authorFacets = await searchFacetsComponent.findAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && ['Research (138993)', 'Analytics (57158)', 'Documentation (32444)'].includes(content) ); }); @@ -217,7 +217,7 @@ describe('CollapsibleFacetsGroupComponent', () => { expect(productsHeader).toBeDefined(); const productsFacets = within(productsModal).queryAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && [ 'discovery (138993)', 'studio (57158)', @@ -375,7 +375,7 @@ describe('CollapsibleFacetsGroupComponent', () => { expect(searchBarValue).toBe(''); // all facets are initially shown const productsFacets = within(productsModal).queryAllByText((content, element) => { - return element.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); + return element?.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); }); expect(productsFacets).toHaveLength(16); }); @@ -387,7 +387,7 @@ describe('CollapsibleFacetsGroupComponent', () => { expect(productsSearchBar.getAttribute('value')).toBe('st'); // only two facets are left showing const filteredProductsFacets = within(productsModal).queryAllByText((content, element) => { - return element.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); + return element?.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); }); expect(filteredProductsFacets).toHaveLength(2); const studioFacet = within(productsModal).getByLabelText('studio (57158)'); @@ -402,7 +402,7 @@ describe('CollapsibleFacetsGroupComponent', () => { fireEvent.change(productsSearchBar, { target: { value: 'DiScOvErY' } }); // should return only the "discovery" facet const filteredFacets = within(productsModal).queryAllByText((content, element) => { - return element.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); + return element?.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); }); expect(filteredFacets).toHaveLength(1); const discoveryFacet = within(productsModal).getByLabelText('discovery (138993)'); @@ -412,7 +412,7 @@ describe('CollapsibleFacetsGroupComponent', () => { fireEvent.change(productsSearchBar, { target: { value: 'api KIT' } }); // should return only the "API kit" facet const filteredProductsFacets = within(productsModal).queryAllByText((content, element) => { - return element.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); + return element?.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); }); expect(filteredProductsFacets).toHaveLength(1); const apiFacet = within(productsModal).getByLabelText('API kit (57158)'); @@ -425,7 +425,7 @@ describe('CollapsibleFacetsGroupComponent', () => { fireEvent.change(productsSearchBar, { target: { value: '1' } }); // should show no matching facets const filteredFacets = within(productsModal).queryAllByText((content, element) => { - return element.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); + return element?.tagName.toLowerCase() === 'span' && productsFacetArray.includes(content); }); expect(filteredFacets).toHaveLength(0); const emptyStateMessage = within(productsModal).getByText('There were no results found'); @@ -468,7 +468,7 @@ describe('CollapsibleFacetsGroupComponent', () => { fireEvent.click(showLessButtons[0]); const authorFacets = searchFacetsComponent.queryAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && ['Research (138993)', 'Analytics (57158)', 'Documentation (32444)'].includes(content) ); }); @@ -484,7 +484,7 @@ describe('CollapsibleFacetsGroupComponent', () => { fireEvent.click(showLessButtons[0]); const subjectFacets = searchFacetsComponent.queryAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && [ 'Neural network (138993)', 'Reinforced learning (57158)', diff --git a/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/FieldFacets.test.tsx b/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/FieldFacets.test.tsx index 2c6184cb8..6f9b7e501 100644 --- a/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/FieldFacets.test.tsx +++ b/packages/discovery-react-components/src/components/SearchFacets/components/__tests__/FieldFacets.test.tsx @@ -814,7 +814,7 @@ describe('FieldFacetsComponent', () => { const topEntitiesQuantityFacets = within(quantityModal).queryAllByText( (content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && [ '$299 (32444)', '$399 (32444)', @@ -848,7 +848,7 @@ describe('FieldFacetsComponent', () => { expect(productsSearchBar).toBeDefined(); const productsFacets = within(productsModal).queryAllByText((content, element) => { return ( - element.tagName.toLowerCase() === 'span' && + element?.tagName.toLowerCase() === 'span' && [ 'discovery (138993)', 'studio (57158)', diff --git a/packages/discovery-react-components/src/components/SearchResults/__tests__/SearchResults.test.tsx b/packages/discovery-react-components/src/components/SearchResults/__tests__/SearchResults.test.tsx index 0f17af4b6..fce144797 100644 --- a/packages/discovery-react-components/src/components/SearchResults/__tests__/SearchResults.test.tsx +++ b/packages/discovery-react-components/src/components/SearchResults/__tests__/SearchResults.test.tsx @@ -104,10 +104,10 @@ describe('', () => { passage_text: 'this is the first passage text' } ] - }, + } as unknown as QueryResult, { document_id: 'some other document_id' - } + } as unknown as QueryResult ]; tableResults = [ { @@ -465,7 +465,7 @@ describe('', () => { describe('and the naturalLanguageQuery changes', () => { test('fetchDocuments should be called twice', () => { - let context = { + let context: Partial = { searchResponseStore: { isLoading: false, isError: false, @@ -492,7 +492,8 @@ describe('', () => { table: {} } ] - } + }, + error: null } }; diff --git a/packages/discovery-react-components/src/components/SearchResults/components/Result/__tests__/Result.test.tsx b/packages/discovery-react-components/src/components/SearchResults/components/Result/__tests__/Result.test.tsx index 0b3fa489b..8804cb177 100644 --- a/packages/discovery-react-components/src/components/SearchResults/components/Result/__tests__/Result.test.tsx +++ b/packages/discovery-react-components/src/components/SearchResults/components/Result/__tests__/Result.test.tsx @@ -87,7 +87,7 @@ describe('', () => { { document_id: 'some document_id', text: 'body text' - } + } as unknown as QueryResult ]; }); diff --git a/packages/discovery-react-components/src/components/StructuredQuery/__tests__/StructuredQuery.test.tsx b/packages/discovery-react-components/src/components/StructuredQuery/__tests__/StructuredQuery.test.tsx index 0af4961cd..1652c7b0f 100644 --- a/packages/discovery-react-components/src/components/StructuredQuery/__tests__/StructuredQuery.test.tsx +++ b/packages/discovery-react-components/src/components/StructuredQuery/__tests__/StructuredQuery.test.tsx @@ -42,7 +42,8 @@ function setup( isError: fieldsStoreErrorState, parameters: { projectId: '' - } + }, + error: null } }; const structuredQuery = render( diff --git a/packages/discovery-react-components/src/components/StructuredQuery/components/RuleGroupDropdown/__tests__/RuleGroupDropdown.test.tsx b/packages/discovery-react-components/src/components/StructuredQuery/components/RuleGroupDropdown/__tests__/RuleGroupDropdown.test.tsx index 189028966..c437fe895 100644 --- a/packages/discovery-react-components/src/components/StructuredQuery/components/RuleGroupDropdown/__tests__/RuleGroupDropdown.test.tsx +++ b/packages/discovery-react-components/src/components/StructuredQuery/components/RuleGroupDropdown/__tests__/RuleGroupDropdown.test.tsx @@ -7,7 +7,9 @@ describe('', () => { describe('rule group dropdown options and their selection', () => { let ruleGroupDropdown: RenderResult; beforeEach(() => { - ruleGroupDropdown = render(); + // @ts-ignore + const component = ; + ruleGroupDropdown = render(component); }); test('dropdown has correct initial selection', () => { diff --git a/packages/discovery-react-components/src/utils/document/__tests__/processDoc.spec.tsx b/packages/discovery-react-components/src/utils/document/__tests__/processDoc.spec.tsx index 15c424b87..ea1b0da40 100644 --- a/packages/discovery-react-components/src/utils/document/__tests__/processDoc.spec.tsx +++ b/packages/discovery-react-components/src/utils/document/__tests__/processDoc.spec.tsx @@ -238,13 +238,13 @@ describe('processDoc', () => { // // On 22 December 2008 ART EFFECTS LIMITED and Customer entered into an Information Technology Procurement Framework Agreement ("the // - expect(doc.bboxes[0].innerTextSource).toEqual( + expect(doc.bboxes?.[0].innerTextSource).toEqual( 'On 22 December 2008 ART EFFECTS LIMITED and Customer entered into an Information Technology Procurement Framework Agreement ("the ' ); - expect(doc.bboxes[0].innerTextLocation).toEqual({ begin: 2530, end: 2660 }); + expect(doc.bboxes?.[0].innerTextLocation).toEqual({ begin: 2530, end: 2660 }); // <Enter Amendment Text> - expect(doc.bboxes[1490].innerTextSource).toEqual('<Enter Amendment Text> '); - expect(doc.bboxes[1490].innerTextLocation).toEqual({ begin: 442990, end: 443016 }); + expect(doc.bboxes?.[1490].innerTextSource).toEqual('<Enter Amendment Text> '); + expect(doc.bboxes?.[1490].innerTextLocation).toEqual({ begin: 442990, end: 443016 }); }); }); diff --git a/packages/discovery-react-components/src/utils/document/__tests__/transformEnrichment.spec.tsx b/packages/discovery-react-components/src/utils/document/__tests__/transformEnrichment.spec.tsx index 7bd557f74..254395415 100644 --- a/packages/discovery-react-components/src/utils/document/__tests__/transformEnrichment.spec.tsx +++ b/packages/discovery-react-components/src/utils/document/__tests__/transformEnrichment.spec.tsx @@ -2,11 +2,18 @@ import transformEnrichment from '../transformEnrichment'; import contractData from 'components/CIDocument/components/CIDocument/__fixtures__/contract.json'; import invoiceData from 'components/CIDocument/components/CIDocument/__fixtures__/invoice-index_op.json'; import purchaseOrderData from 'components/CIDocument/components/CIDocument/__fixtures__/po-index_op.json'; -import { EnrichedHtml } from 'components/CIDocument/types'; +import { EnrichedHtmlPurchaseOrder } from 'components/CIDocument/types'; +import { Contract } from 'components/CIDocument/types'; +import { + EnrichedHtml, + EnrichedHtmlContract, + EnrichedHtmlInvoice, + Invoice +} from 'components/CIDocument/types'; describe('transformEnrichment - contracts', () => { let transformedDoc: EnrichedHtml[]; - const enriched_html = contractData.enriched_html; + const enriched_html = contractData.enriched_html as unknown as EnrichedHtmlContract[]; beforeAll(() => { // trasnform doc for use in tests @@ -19,19 +26,25 @@ describe('transformEnrichment - contracts', () => { }); it('adds metadata to contracts', () => { - expect(transformedDoc[0].contract.metadata).toHaveLength(2); - expect(transformedDoc[0].contract.metadata[0].metadataType).toEqual('effective_dates'); + expect((transformedDoc[0] as EnrichedHtmlContract).contract.metadata).toHaveLength(2); + expect((transformedDoc[0] as EnrichedHtmlContract).contract.metadata?.[0].metadataType).toEqual( + 'effective_dates' + ); }); it('does not add attributes and relations to contracts', () => { - expect(transformedDoc[0].contract.attributes).toBeUndefined(); - expect(transformedDoc[0].contract.relations).toBeUndefined(); + expect( + ((transformedDoc[0] as EnrichedHtmlContract).contract as unknown as Invoice).attributes + ).toBeUndefined(); + expect( + ((transformedDoc[0] as EnrichedHtmlContract).contract as unknown as Invoice).relations + ).toBeUndefined(); }); }); describe('transformEnrichment - Invoice', () => { let transformedDoc: EnrichedHtml[]; - const enriched_html = invoiceData.enriched_html; + const enriched_html = invoiceData.enriched_html as unknown as EnrichedHtmlInvoice[]; beforeAll(() => { // parse doc for use in tests @@ -39,23 +52,25 @@ describe('transformEnrichment - Invoice', () => { }); it('adds attributes and relations to invoices', () => { - expect(transformedDoc[0].invoice.attributes).toHaveLength(5); - expect(transformedDoc[0].invoice.attributes[0]).toEqual({ + expect((transformedDoc[0] as EnrichedHtmlInvoice).invoice.attributes).toHaveLength(5); + expect((transformedDoc[0] as EnrichedHtmlInvoice).invoice.attributes[0]).toEqual({ type: 'suppliers', text: 'INVOICE BNP Paribas S.A.', location: { end: 8831, begin: 8807 } }); - expect(transformedDoc[0].invoice.relations).toHaveLength(6); + expect((transformedDoc[0] as EnrichedHtmlInvoice).invoice.relations).toHaveLength(6); }); it('does not add metadata to invoices', () => { - expect(transformedDoc[0].invoice.metadata).toBeUndefined(); + expect( + ((transformedDoc[0] as EnrichedHtmlInvoice).invoice as unknown as Contract).metadata + ).toBeUndefined(); }); }); describe('transformEnrichment - Purchase orders', () => { let transformedDoc: EnrichedHtml[]; - const enriched_html = purchaseOrderData.enriched_html; + const enriched_html = purchaseOrderData.enriched_html as unknown as EnrichedHtmlPurchaseOrder[]; beforeAll(() => { // parse doc for use in tests @@ -63,16 +78,28 @@ describe('transformEnrichment - Purchase orders', () => { }); it('adds attributes and relations to purchase order data', () => { - expect(transformedDoc[0].purchase_order.attributes).toHaveLength(5); - expect(transformedDoc[0].purchase_order.attributes[0]).toEqual({ + expect( + ((transformedDoc[0] as EnrichedHtmlPurchaseOrder).purchase_order as unknown as Invoice) + .attributes + ).toHaveLength(5); + expect( + ((transformedDoc[0] as EnrichedHtmlPurchaseOrder).purchase_order as unknown as Invoice) + .attributes[0] + ).toEqual({ type: 'purchase_order_numbers', text: '4620257561', location: { end: 8319, begin: 8309 } }); - expect(transformedDoc[0].purchase_order.relations).toHaveLength(5); + expect( + ((transformedDoc[0] as EnrichedHtmlPurchaseOrder).purchase_order as unknown as Invoice) + .relations + ).toHaveLength(5); }); it('does not add metadata to purchase orders', () => { - expect(transformedDoc[0].purchase_order.metadata).toBeUndefined(); + expect( + ((transformedDoc[0] as EnrichedHtmlPurchaseOrder).purchase_order as unknown as Contract) + .metadata + ).toBeUndefined(); }); }); diff --git a/yarn.lock b/yarn.lock index 20815935b..d29fa50a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2238,7 +2238,7 @@ __metadata: languageName: node linkType: hard -"@ibm-watson/discovery-react-components@^4.2.1, @ibm-watson/discovery-react-components@workspace:packages/discovery-react-components": +"@ibm-watson/discovery-react-components@^4.2.2, @ibm-watson/discovery-react-components@workspace:packages/discovery-react-components": version: 0.0.0-use.local resolution: "@ibm-watson/discovery-react-components@workspace:packages/discovery-react-components" dependencies: @@ -2262,17 +2262,17 @@ __metadata: "@types/uuid": ^8 buffer: ^6.0.3 canvas: ^2.9.3 - classnames: ^2.2.6 + classnames: ^2.3.2 cross-env: ^7.0.3 css-loader: ^6.7.1 - debounce: ^1.2.0 + debounce: ^1.2.1 dompurify: ^3.0.2 - entities: ^4.4.0 + entities: ^4.5.0 htmlparser2: ^4.0.0 lodash: ^4.17.21 madge: ^5.0.1 marked: ^4.0.10 - mustache: ^3.1.0 + mustache: ^4.2.0 pdfjs-dist: 2.6.347 react-error-boundary: ^1.2.5 react-resize-detector: ^4.2.1 @@ -2281,7 +2281,7 @@ __metadata: rollup: ^2.57.0 rollup-plugin-string: ^3.0.0 rollup-plugin-terser: ^7.0.2 - rollup-plugin-typescript2: ^0.30.0 + rollup-plugin-typescript2: ^0.34.1 sass-embedded: ^1.52.2 sass-loader: ^12.3.0 style-loader: ^1.3.0 @@ -4029,13 +4029,13 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^4.1.0": - version: 4.1.1 - resolution: "@rollup/pluginutils@npm:4.1.1" +"@rollup/pluginutils@npm:^4.1.2": + version: 4.2.1 + resolution: "@rollup/pluginutils@npm:4.2.1" dependencies: estree-walker: ^2.0.1 picomatch: ^2.2.2 - checksum: 405f681c7d32661980aa3caa928ff22e1c06f0e081db1550e6ab9c179dc9d3d8d63c05dcc7338fe65ab3f856a56c465696a51300b83e98171956fcb141106e39 + checksum: 6bc41f22b1a0f1efec3043899e4d3b6b1497b3dea4d94292d8f83b4cf07a1073ecbaedd562a22d11913ff7659f459677b01b09e9598a98936e746780ecc93a12 languageName: node linkType: hard @@ -5333,25 +5333,25 @@ __metadata: languageName: node linkType: hard -"@testing-library/react-hooks@npm:^7.0.2": - version: 7.0.2 - resolution: "@testing-library/react-hooks@npm:7.0.2" +"@testing-library/react-hooks@npm:^8.0.1": + version: 8.0.1 + resolution: "@testing-library/react-hooks@npm:8.0.1" dependencies: "@babel/runtime": ^7.12.5 - "@types/react": ">=16.9.0" - "@types/react-dom": ">=16.9.0" - "@types/react-test-renderer": ">=16.9.0" react-error-boundary: ^3.1.0 peerDependencies: - react: ">=16.9.0" - react-dom: ">=16.9.0" - react-test-renderer: ">=16.9.0" + "@types/react": ^16.9.0 || ^17.0.0 + react: ^16.9.0 || ^17.0.0 + react-dom: ^16.9.0 || ^17.0.0 + react-test-renderer: ^16.9.0 || ^17.0.0 peerDependenciesMeta: + "@types/react": + optional: true react-dom: optional: true react-test-renderer: optional: true - checksum: 27c6169b5c9832bd02dcea232e6a0a3cd8d4504e13ecb49d57eb5ab6bea5e2f1bff65f3102068b7e57eec3cbd671326dc0b277335014b0edfbdedf11a1fe6db5 + checksum: 7fe44352e920deb5cb1876f80d64e48615232072c9d5382f1e0284b3aab46bb1c659a040b774c45cdf084a5257b8fe463f7e08695ad8480d8a15635d4d3d1f6d languageName: node linkType: hard @@ -5824,10 +5824,10 @@ __metadata: languageName: node linkType: hard -"@types/mustache@npm:^0.8.32": - version: 0.8.32 - resolution: "@types/mustache@npm:0.8.32" - checksum: 390fb7dc873932b9b07d8a3c09c2cf5708232ca01be71ddac8d58a145735909687f9fd661ed3ff9037f4051abf3e010f109c91baa5e704d87aad80d6cd377562 +"@types/mustache@npm:^4.2.2": + version: 4.2.2 + resolution: "@types/mustache@npm:4.2.2" + checksum: 1fa67a519f4302c96615524be4c8248067da02ca047bae9d4c4bb79977135ac7c15dcc388e7c70b8a817b9497004d5ca5c77a155dcb096bea16d53d4cdbe75d2 languageName: node linkType: hard @@ -5948,7 +5948,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:>=16.9.0, @types/react-dom@npm:^17.0.11": +"@types/react-dom@npm:^17.0.11": version: 17.0.11 resolution: "@types/react-dom@npm:17.0.11" dependencies: @@ -5966,15 +5966,6 @@ __metadata: languageName: node linkType: hard -"@types/react-test-renderer@npm:>=16.9.0": - version: 17.0.1 - resolution: "@types/react-test-renderer@npm:17.0.1" - dependencies: - "@types/react": "*" - checksum: ecaae8df36cd8cfeb89080d52534856acc3789bad9a6e369ff5119426377c827b4e5b5daa638507f2c1c2fd6c994bf45de288a698143178cd4049c2cd8b77b35 - languageName: node - linkType: hard - "@types/react-virtualized@npm:^9.21.11": version: 9.21.11 resolution: "@types/react-virtualized@npm:9.21.11" @@ -5985,7 +5976,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:>=16.9.0, @types/react@npm:^17.0.38": +"@types/react@npm:*, @types/react@npm:^17.0.38": version: 17.0.38 resolution: "@types/react@npm:17.0.38" dependencies: @@ -6124,20 +6115,13 @@ __metadata: languageName: node linkType: hard -"@types/trusted-types@npm:*": +"@types/trusted-types@npm:*, @types/trusted-types@npm:^2.0.2": version: 2.0.3 resolution: "@types/trusted-types@npm:2.0.3" checksum: 4794804bc4a4a173d589841b6d26cf455ff5dc4f3e704e847de7d65d215f2e7043d8757e4741ce3a823af3f08260a8d04a1a6e9c5ec9b20b7b04586956a6b005 languageName: node linkType: hard -"@types/trusted-types@npm:^2.0.2": - version: 2.0.2 - resolution: "@types/trusted-types@npm:2.0.2" - checksum: 3371eef5f1c50e1c3c07a127c1207b262ba65b83dd167a1c460fc1b135a3fb0c97b9f508efebd383f239cc5dd5b7169093686a692a501fde9c3f7208657d9b0d - languageName: node - linkType: hard - "@types/uglify-js@npm:*": version: 3.11.1 resolution: "@types/uglify-js@npm:3.11.1" @@ -9125,13 +9109,20 @@ __metadata: languageName: node linkType: hard -"classnames@npm:2.3.1, classnames@npm:^2.2.6": +"classnames@npm:2.3.1": version: 2.3.1 resolution: "classnames@npm:2.3.1" checksum: 14db8889d56c267a591f08b0834989fe542d47fac659af5a539e110cc4266694e8de86e4e3bbd271157dbd831361310a8293e0167141e80b0f03a0f175c80960 languageName: node linkType: hard +"classnames@npm:^2.2.6, classnames@npm:^2.3.2": + version: 2.3.2 + resolution: "classnames@npm:2.3.2" + checksum: 2c62199789618d95545c872787137262e741f9db13328e216b093eea91c85ef2bfb152c1f9e63027204e2559a006a92eb74147d46c800a9f96297ae1d9f96f4e + languageName: node + linkType: hard + "clean-css@npm:^4.2.3": version: 4.2.3 resolution: "clean-css@npm:4.2.3" @@ -10555,7 +10546,7 @@ __metadata: languageName: node linkType: hard -"debounce@npm:^1.2.0": +"debounce@npm:^1.2.1": version: 1.2.1 resolution: "debounce@npm:1.2.1" checksum: 682a89506d9e54fb109526f4da255c5546102fbb8e3ae75eef3b04effaf5d4853756aee97475cd4650641869794e44f410eeb20ace2b18ea592287ab2038519e @@ -11162,7 +11153,7 @@ __metadata: resolution: "discovery-search-app@workspace:examples/discovery-search-app" dependencies: "@carbon/icons": ^10.5.0 - "@ibm-watson/discovery-react-components": ^4.2.1 + "@ibm-watson/discovery-react-components": ^4.2.2 "@ibm-watson/discovery-styles": ^4.2.1 "@testing-library/cypress": ^7.0.7 "@types/proper-url-join": ^2 @@ -11676,7 +11667,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^4.0.0, enhanced-resolve@npm:^4.5.0": +"enhanced-resolve@npm:^4.5.0": version: 4.5.0 resolution: "enhanced-resolve@npm:4.5.0" dependencies: @@ -11687,13 +11678,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.3.2, enhanced-resolve@npm:^5.9.3": - version: 5.9.3 - resolution: "enhanced-resolve@npm:5.9.3" +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.3.2, enhanced-resolve@npm:^5.9.3": + version: 5.13.0 + resolution: "enhanced-resolve@npm:5.13.0" dependencies: graceful-fs: ^4.2.4 tapable: ^2.2.0 - checksum: 64c2dbbdd608d1a4df93b6e60786c603a1faf3b2e66dfd051d62cf4cfaeeb5e800166183685587208d62e9f7afff3f78f3d5978e32cd80125ba0c83b59a79d78 + checksum: 76d6844c4393d76beed5b3ce6cf5a98dee3ad5c84a9887f49ccde1224e3b7af201dfbd5a57ebf2b49f623b74883df262d50ff480d3cc02fc2881fc58b84e1bbe languageName: node linkType: hard @@ -11727,10 +11718,10 @@ __metadata: languageName: node linkType: hard -"entities@npm:^4.4.0": - version: 4.4.0 - resolution: "entities@npm:4.4.0" - checksum: 84d250329f4b56b40fa93ed067b194db21e8815e4eb9b59f43a086f0ecd342814f6bc483de8a77da5d64e0f626033192b1b4f1792232a7ea6b970ebe0f3187c2 +"entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 853f8ebd5b425d350bffa97dd6958143179a5938352ccae092c62d1267c4e392a039be1bae7d51b6e4ffad25f51f9617531fedf5237f15df302ccfb452cbf2d7 languageName: node linkType: hard @@ -13080,14 +13071,14 @@ __metadata: languageName: node linkType: hard -"find-cache-dir@npm:^3.3.1": - version: 3.3.1 - resolution: "find-cache-dir@npm:3.3.1" +"find-cache-dir@npm:^3.3.1, find-cache-dir@npm:^3.3.2": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" dependencies: commondir: ^1.0.1 make-dir: ^3.0.2 pkg-dir: ^4.1.0 - checksum: 0f7c22b65e07f9b486b4560227d014fab1e79ffbbfbafb87d113a2e878510bd620ef6fdff090e5248bb2846d28851d19e42bfdc7c50687966acc106328e7abf1 + checksum: 1e61c2e64f5c0b1c535bd85939ae73b0e5773142713273818cc0b393ee3555fb0fd44e1a5b161b8b6c3e03e98c2fcc9c227d784850a13a90a8ab576869576817 languageName: node linkType: hard @@ -13374,17 +13365,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:8.1.0, fs-extra@npm:^8.1.0": - version: 8.1.0 - resolution: "fs-extra@npm:8.1.0" - dependencies: - graceful-fs: ^4.2.0 - jsonfile: ^4.0.0 - universalify: ^0.1.0 - checksum: bf44f0e6cea59d5ce071bba4c43ca76d216f89e402dc6285c128abc0902e9b8525135aa808adad72c9d5d218e9f4bcc63962815529ff2f684ad532172a284880 - languageName: node - linkType: hard - "fs-extra@npm:^0.30.0": version: 0.30.0 resolution: "fs-extra@npm:0.30.0" @@ -13420,6 +13400,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^8.1.0": + version: 8.1.0 + resolution: "fs-extra@npm:8.1.0" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: bf44f0e6cea59d5ce071bba4c43ca76d216f89e402dc6285c128abc0902e9b8525135aa808adad72c9d5d218e9f4bcc63962815529ff2f684ad532172a284880 + languageName: node + linkType: hard + "fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": version: 9.1.0 resolution: "fs-extra@npm:9.1.0" @@ -17392,7 +17383,7 @@ __metadata: languageName: node linkType: hard -"loader-utils@npm:^1.0.2, loader-utils@npm:^1.2.3": +"loader-utils@npm:^1.2.3": version: 1.4.2 resolution: "loader-utils@npm:1.4.2" dependencies: @@ -18860,12 +18851,12 @@ __metadata: languageName: node linkType: hard -"mustache@npm:^3.1.0": - version: 3.2.1 - resolution: "mustache@npm:3.2.1" +"mustache@npm:^4.2.0": + version: 4.2.0 + resolution: "mustache@npm:4.2.0" bin: mustache: bin/mustache - checksum: d008c18f870ddffc7440b3848e2d9f549a7460042e2660ea407adf0cdf6292b9dd2f32757e483d72abe1791b3341ec1fb65340510586c3757b1c3ca07ee7f354 + checksum: 928fcb63e3aa44a562bfe9b59ba202cccbe40a46da50be6f0dd831b495be1dd7e38ca4657f0ecab2c1a89dc7bccba0885eab7ee7c1b215830da765758c7e0506 languageName: node linkType: hard @@ -23115,16 +23106,6 @@ __metadata: languageName: node linkType: hard -"resolve@npm:1.20.0": - version: 1.20.0 - resolution: "resolve@npm:1.20.0" - dependencies: - is-core-module: ^2.2.0 - path-parse: ^1.0.6 - checksum: 40cf70b2cde00ef57f99daf2dc63c6a56d6c14a1b7fc51735d06a6f0a3b97cb67b4fb7ef6c747b4e13a7baba83b0ef625d7c4ce92a483cd5af923c3b65fd16fe - languageName: node - linkType: hard - "resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.3.2": version: 1.22.0 resolution: "resolve@npm:1.22.0" @@ -23148,16 +23129,6 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@1.20.0#~builtin": - version: 1.20.0 - resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b" - dependencies: - is-core-module: ^2.2.0 - path-parse: ^1.0.6 - checksum: a0dd7d16a8e47af23afa9386df2dff10e3e0debb2c7299a42e581d9d9b04d7ad5d2c53f24f1e043f7b3c250cbdc71150063e53d0b6559683d37f790b7c8c3cd5 - languageName: node - linkType: hard - "resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin, resolve@patch:resolve@^1.3.2#~builtin": version: 1.22.0 resolution: "resolve@patch:resolve@npm%3A1.22.0#~builtin::version=1.22.0&hash=07638b" @@ -23310,19 +23281,19 @@ __metadata: languageName: node linkType: hard -"rollup-plugin-typescript2@npm:^0.30.0": - version: 0.30.0 - resolution: "rollup-plugin-typescript2@npm:0.30.0" +"rollup-plugin-typescript2@npm:^0.34.1": + version: 0.34.1 + resolution: "rollup-plugin-typescript2@npm:0.34.1" dependencies: - "@rollup/pluginutils": ^4.1.0 - find-cache-dir: ^3.3.1 - fs-extra: 8.1.0 - resolve: 1.20.0 - tslib: 2.1.0 + "@rollup/pluginutils": ^4.1.2 + find-cache-dir: ^3.3.2 + fs-extra: ^10.0.0 + semver: ^7.3.7 + tslib: ^2.4.0 peerDependencies: rollup: ">=1.26.3" typescript: ">=2.4.0" - checksum: e3097bb25c00e78cca556ed6a77b3bdf2330e5e5647847d1f967ade67dc6b66009b52bb8810de2b2c40857310693e4e663900a13da4f711f082fabac5165091a + checksum: 107e66b9ab1aaf4b237564e500ea9de9f2d3f0a81be5139dc753fc76bbf00a1a2230eb1ec59145d2dfc4c4da9be8211f1f3e1370007efe1e24ce45a00905e558 languageName: node linkType: hard @@ -23359,7 +23330,7 @@ __metadata: "@commitlint/config-conventional": ^11.0.0 "@testing-library/jest-dom": ^5.16.1 "@testing-library/react": ^11.2.7 - "@testing-library/react-hooks": ^7.0.2 + "@testing-library/react-hooks": ^8.0.1 "@types/babel__preset-env": ^7.9.2 "@types/classnames": ^2.2.9 "@types/debounce": ^1.2.0 @@ -23367,7 +23338,7 @@ __metadata: "@types/jest": ^24.0.18 "@types/lodash": ^4.14.141 "@types/md5": 2.3.2 - "@types/mustache": ^0.8.32 + "@types/mustache": ^4.2.2 "@types/node": ^16.18.23 "@types/react": ^17.0.38 "@types/react-dom": ^17.0.11 @@ -23411,7 +23382,7 @@ __metadata: regenerator-runtime: ^0.13.3 seedrandom: ^3.0.5 source-map-explorer: 2.0.1 - ts-loader: ^6.2.1 + ts-loader: ^9.4.2 typescript: ^3.8.2 vue: ^2.6.11 webpack: 5.72.1 @@ -25739,18 +25710,18 @@ __metadata: languageName: node linkType: hard -"ts-loader@npm:^6.2.1": - version: 6.2.2 - resolution: "ts-loader@npm:6.2.2" +"ts-loader@npm:^9.4.2": + version: 9.4.2 + resolution: "ts-loader@npm:9.4.2" dependencies: - chalk: ^2.3.0 - enhanced-resolve: ^4.0.0 - loader-utils: ^1.0.2 + chalk: ^4.1.0 + enhanced-resolve: ^5.0.0 micromatch: ^4.0.0 - semver: ^6.0.0 + semver: ^7.3.4 peerDependencies: typescript: "*" - checksum: b984b911848f5397e1cddf8b046a693caaf5556ff1ccc91611b40a20824b20232a3d1d28da326e4cf9bb20c23dce2886b1a5a5868634b44384a528bf462c81f4 + webpack: ^5.0.0 + checksum: 6f306ee4c615c2a159fb177561e3fb86ca2cbd6c641e710d408a64b4978e1ff3f2c9733df07bff27d3f82efbfa7c287523d4306049510c7485ac2669a9c37eb0 languageName: node linkType: hard @@ -25776,13 +25747,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.1.0": - version: 2.1.0 - resolution: "tslib@npm:2.1.0" - checksum: aa189c8179de0427b0906da30926fd53c59d96ec239dff87d6e6bc831f608df0cbd6f77c61dabc074408bd0aa0b9ae4ec35cb2c15f729e32f37274db5730cb78 - languageName: node - linkType: hard - "tslib@npm:^1.8.1, tslib@npm:^1.9.0": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -25790,10 +25754,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 +"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0": + version: 2.5.0 + resolution: "tslib@npm:2.5.0" + checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1 languageName: node linkType: hard