Skip to content

Commit

Permalink
fix: more cleanup of obsolete deps
Browse files Browse the repository at this point in the history
  • Loading branch information
petermuessig committed Jul 31, 2023
1 parent 65287fa commit 8d08048
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 47 deletions.
5 changes: 0 additions & 5 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@ update_configs:
- package_manager: "javascript"
directory: "./"
update_schedule: "live"
ignored_updates:
- match:
dependency_name: "@ui5/fs"
- match:
dependency_name: "@ui5/logger"
1 change: 0 additions & 1 deletion packages/ui5-middleware-webjars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"lint": "eslint lib"
},
"dependencies": {
"@ui5/server": "^3.1.3",
"jszip": "^3.10.1"
}
}
3 changes: 0 additions & 3 deletions packages/ui5-task-cachebuster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
"verbose": true,
"timeout": "5m"
},
"dependencies": {
"@ui5/fs": "^3.0.4"
},
"devDependencies": {
"@ui5/cli": "^3.3.4",
"ava": "^5.3.1"
Expand Down
3 changes: 0 additions & 3 deletions packages/ui5-task-flatten-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@
},
"scripts": {
"lint": "eslint lib"
},
"dependencies": {
"@ui5/logger": "^3.0.0"
}
}
10 changes: 6 additions & 4 deletions packages/ui5-task-pwa-enabler/lib/pwaEnabler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const HTMLParser = require("node-html-parser");

let ws = undefined;
let rootDir = undefined;
let createResource = undefined;

const swStrategies = {
offlinePage: "Offline-Page",
Expand Down Expand Up @@ -49,11 +50,13 @@ let default_manifest = {
* @param {string} parameters.options.projectName Project name
* @param {string} [parameters.options.projectNamespace] Project namespace if available
* @param {object} [parameters.options.configuration] Task configuration if given in ui5.yaml
* @param {object} parameters.taskUtil the task utilities
* @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
*/
module.exports = async function ({ workspace, dependencies, options: { projectName, projectNamespace, configuration } }) {
module.exports = async function ({ workspace, dependencies, options: { projectName, projectNamespace, configuration }, taskUtil }) {
ws = workspace;
rootDir = "/resources/" + projectNamespace;
createResource = taskUtil.resourceFactory.createResource;
if (!configuration) {
throw "Configuration is missing";
}
Expand Down Expand Up @@ -100,11 +103,10 @@ async function addServiceworkerRegistration() {
* @returns {Promise} which resolves once the data has been written
*/
async function writeFile({ path, content }) {
const { default: Resource } = await import("@ui5/fs/Resource");
if (typeof content === "string") {
return ws.write(new Resource({ path: path, string: content }));
return ws.write(createResource({ path: path, string: content }));
} else {
return ws.write(new Resource({ path: path, buffer: content }));
return ws.write(createResource({ path: path, buffer: content }));
}
}

Expand Down
1 change: 0 additions & 1 deletion packages/ui5-task-pwa-enabler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"lint": "eslint lib"
},
"dependencies": {
"@ui5/fs": "^3.0.4",
"mustache": "^4.2.0",
"node-html-parser": "^6.1.5"
}
Expand Down
3 changes: 1 addition & 2 deletions packages/ui5-task-zipper/lib/zipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ module.exports = async function ({ log, workspace, dependencies, options, taskUt
const zipName = `${defaultName || options.projectNamespace.replace(/\//g, "")}.zip`;

// determine the dependencies resource collection to be included
const { default: ReaderCollection } = await import("@ui5/fs/ReaderCollection");
const deps =
includeDependencies === true
? dependencies
: new ReaderCollection({
: taskUtil.resourceFactory.createReaderCollection({
readers: !includeDependencies
? []
: dependencies._readers.filter((reader) => {
Expand Down
1 change: 0 additions & 1 deletion packages/ui5-task-zipper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"timeout": "5m"
},
"dependencies": {
"@ui5/fs": "^3.0.4",
"yazl": "^2.5.1"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/ui5-tooling-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/pluginutils": "^5.0.2",
"@ui5/fs": "^3.0.4",
"espree": "^9.6.1",
"estraverse": "^5.3.0",
"fast-xml-parser": "^4.2.6",
Expand Down
3 changes: 2 additions & 1 deletion packages/ui5-tooling-transpile/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ module.exports = function (log) {
// current work directory is the rootpath of the project resource
// it is a root resource which should be considered to be resolved
if (path.relative(cwd, resource.getProject().getRootPath()) === "") {
resourcePath = resource.getSourceMetadata().fsPath || resourcePath;
// npm dependencies don't have sourceMetadata applied to resource!
resourcePath = resource.getSourceMetadata()?.fsPath || resourcePath;
}
} else {
// for older versions resolving the file system path is a bit more
Expand Down
1 change: 0 additions & 1 deletion packages/ui5-tooling-transpile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5",
"@ui5/fs": "^3.0.4",
"babel-plugin-transform-async-to-promises": "^0.8.18",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-preset-transform-ui5": "^7.2.4",
Expand Down
25 changes: 1 addition & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d08048

Please sign in to comment.