From daecc555e29f1ec942a04cd8f81ff46003888bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 14 Nov 2023 15:55:51 +0100 Subject: [PATCH] MOBILE-3947 chore: Remove usage of raw loader --- jest.config.js | 5 +---- package-lock.json | 7 ------- package.json | 1 - src/core/components/error-info/error-info.ts | 6 ++---- src/types/raw.d.ts | 19 ------------------- 5 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 src/types/raw.d.ts diff --git a/jest.config.js b/jest.config.js index 4e39677f7..fde4afd9c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,8 +10,5 @@ module.exports = { '!src/testing/**/*', ], transformIgnorePatterns: ['node_modules/(?!@stencil|@angular|@ionic|@moodlehq|@ngx-translate|swiper)'], - moduleNameMapper: { - ...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '/src/' }), - '^!raw-loader!.*': 'jest-raw-loader', - }, + moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '/src/' }), }; diff --git a/package-lock.json b/package-lock.json index 13db67f1a..26ac4b768 100644 --- a/package-lock.json +++ b/package-lock.json @@ -141,7 +141,6 @@ "gulp-slash": "^1.1.3", "jest": "^29.7.0", "jest-preset-angular": "^13.1.4", - "jest-raw-loader": "^1.0.1", "jsonc-parser": "^2.3.1", "keytar": "^7.2.0", "minimatch": "^5.1.0", @@ -18822,12 +18821,6 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/jest-raw-loader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/jest-raw-loader/-/jest-raw-loader-1.0.1.tgz", - "integrity": "sha512-g9oaAjeC4/rIJk1Wd3RxVbOfMizowM7LSjEJqa4R9qDX0OjQNABXOhH+GaznUp+DjTGVPi2vPPbQXyX87DOnYg==", - "dev": true - }, "node_modules/jest-regex-util": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", diff --git a/package.json b/package.json index ed6a23c9b..1933cece1 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,6 @@ "gulp-slash": "^1.1.3", "jest": "^29.7.0", "jest-preset-angular": "^13.1.4", - "jest-raw-loader": "^1.0.1", "jsonc-parser": "^2.3.1", "keytar": "^7.2.0", "minimatch": "^5.1.0", diff --git a/src/core/components/error-info/error-info.ts b/src/core/components/error-info/error-info.ts index 948d27eb1..4104e7f3e 100644 --- a/src/core/components/error-info/error-info.ts +++ b/src/core/components/error-info/error-info.ts @@ -15,8 +15,6 @@ import { Component, ElementRef, Input, OnChanges, OnInit } from '@angular/core'; import { Translate } from '@singletons'; import { CoreForms } from '@singletons/form'; -import ChevronUpSVG from '!raw-loader!ionicons/dist/svg/chevron-up.svg'; -import ChevronDownSVG from '!raw-loader!ionicons/dist/svg/chevron-down.svg'; /** * Component to show error details. @@ -54,11 +52,11 @@ export class CoreErrorInfoComponent implements OnInit, OnChanges { diff --git a/src/types/raw.d.ts b/src/types/raw.d.ts deleted file mode 100644 index 131f58329..000000000 --- a/src/types/raw.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -declare module '!raw-loader!*' { - const contents: string; - - export = contents; -}