Skip to content

Commit

Permalink
[INTERNAL] rename to enhanceManifest/manifestEnhancer
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt committed Apr 17, 2024
1 parent e9b02dd commit 2c2886e
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const {SemVer: Version, lt} = semver;
import {promisify} from "node:util";
import path from "node:path/posix";
import {getLogger} from "@ui5/logger";
const log = getLogger("builder:processors:manifestEnricher");
const log = getLogger("builder:processors:manifestEnhancer");

const APP_DESCRIPTOR_V22 = new Version("1.21.0");

Expand Down Expand Up @@ -118,7 +118,7 @@ function getBundleUrlFromSapUi5LibraryI18n(vI18n) {
}
}

class ManifestEnricher {
class ManifestEnhancer {
/**
* @param {string} manifest manifest.json content
* @param {string} filePath manifest.json file path
Expand Down Expand Up @@ -352,7 +352,7 @@ class ManifestEnricher {
async run() {
// Prevent multiple invocations
if (this.runInvoked) {
throw new Error("ManifestEnricher#run can only be invoked once per instance");
throw new Error("ManifestEnhancer#run can only be invoked once per instance");
}
this.runInvoked = true;

Expand Down Expand Up @@ -382,7 +382,7 @@ class ManifestEnricher {
}

/**
* @module @ui5/builder/processors/manifestEnricher
* @module @ui5/builder/processors/manifestEnhancer
*/

/**
Expand All @@ -403,8 +403,8 @@ export default async function({resources, fs}) {
resources.map(async (resource) => {
const manifest = await resource.getString();
const filePath = resource.getPath();
const manifestEnricher = new ManifestEnricher(manifest, filePath, fs);
const enrichedManifest = await manifestEnricher.run();
const manifestEnhancer = new ManifestEnhancer(manifest, filePath, fs);
const enrichedManifest = await manifestEnhancer.run();
if (enrichedManifest) {
resource.setString(JSON.stringify(enrichedManifest, null, 2));
}
Expand All @@ -414,4 +414,4 @@ export default async function({resources, fs}) {
}

export const __internals__ = (process.env.NODE_ENV === "test") ?
{ManifestEnricher, getRelativeBundleUrlFromName, normalizeBundleUrl, resolveUI5Url} : undefined;
{ManifestEnhancer, getRelativeBundleUrlFromName, normalizeBundleUrl, resolveUI5Url} : undefined;
4 changes: 2 additions & 2 deletions lib/tasks/enrichManifest.js → lib/tasks/enhanceManifest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import manifestEnricher from "../processors/manifestEnricher.js";
import manifestEnhancer from "../processors/manifestEnhancer.js";
import fsInterface from "@ui5/fs/fsInterface";

/* eslint "jsdoc/check-param-names": ["error", {"disableExtraPropertyReporting":true}] */
Expand All @@ -21,7 +21,7 @@ export default async function({workspace, options}) {
// Note: all "manifest.json" files in the given namespace
const resources = await workspace.byGlob(`/resources/${projectNamespace}/**/manifest.json`);

const processedResources = await manifestEnricher({
const processedResources = await manifestEnhancer({
resources,
fs: fsInterface(workspace),
options
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/taskRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const taskInfos = {
replaceCopyright: {path: "./replaceCopyright.js"},
replaceVersion: {path: "./replaceVersion.js"},
replaceBuildtime: {path: "./replaceBuildtime.js"},
enrichManifest: {path: "./enrichManifest.js"},
enhanceManifest: {path: "./enhanceManifest.js"},
escapeNonAsciiCharacters: {path: "./escapeNonAsciiCharacters.js"},
executeJsdocSdkTransformation: {path: "./jsdoc/executeJsdocSdkTransformation.js"},
generateApiIndex: {path: "./jsdoc/generateApiIndex.js"},
Expand Down
4 changes: 2 additions & 2 deletions test/lib/package-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test("check number of exports", (t) => {
"processors/minifier",
"processors/libraryLessGenerator",
"processors/manifestCreator",
"processors/manifestEnricher",
"processors/manifestEnhancer",
"processors/nonAsciiEscaper",
"processors/stringReplacer",
"processors/themeBuilder",
Expand All @@ -49,7 +49,7 @@ test("check number of exports", (t) => {
"tasks/replaceVersion",
"tasks/replaceBuildtime",
"tasks/transformBootstrapHtml",
"tasks/enrichManifest",
"tasks/enhanceManifest",

// Internal modules (only to be used by @ui5/* packages)
{exportedSpecifier: "internal/taskRepository", mappedModule: "../../lib/tasks/taskRepository.js"},
Expand Down
Loading

0 comments on commit 2c2886e

Please sign in to comment.