You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@ui5/fs

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta.3 to 3.0.0-beta.4

6

CHANGELOG.md

@@ -5,4 +5,7 @@ # Changelog

A list of unreleased changes can be found [here](https://github.com/SAP/ui5-fs/compare/v3.0.0-beta.3...HEAD).
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-fs/compare/v3.0.0-beta.4...HEAD).
<a name="v3.0.0-beta.4"></a>
## [v3.0.0-beta.4] - 2022-11-30
<a name="v3.0.0-beta.3"></a>

@@ -201,2 +204,3 @@ ## [v3.0.0-beta.3] - 2022-11-11

[v3.0.0-beta.4]: https://github.com/SAP/ui5-fs/compare/v3.0.0-beta.3...v3.0.0-beta.4
[v3.0.0-beta.3]: https://github.com/SAP/ui5-fs/compare/v3.0.0-beta.2...v3.0.0-beta.3

@@ -203,0 +207,0 @@ [v3.0.0-beta.2]: https://github.com/SAP/ui5-fs/compare/v3.0.0-beta.1...v3.0.0-beta.2

40

lib/AbstractReader.js

@@ -86,42 +86,2 @@ import randomInt from "random-int";

/**
* Create a [Filter-Reader]{@link @ui5/fs/readers/Filter} from the current reader.
*
* @public
* @param {@ui5/fs/readers/Filter~callback} callback
* Filter function. Will be called for every resource passed through this reader.
* @returns {Promise<@ui5/fs/readers/Filter>} Promise resolving with filter instance
*/
async filter(callback) {
console.warn("DEPRECATED CALL TO AbstractReader#filter - THIS FUNCTION WILL BE REMOVED IN THE NEXT RELEASE");
const {default: Filter} = await import("./readers/Filter.js");
return new Filter({
reader: this,
callback
});
}
/**
* Create a [Link-Reader]{@link @ui5/fs/readers/Link} where all requests are prefixed with
* <code>/resources/<namespace></code>.
*
* This simulates "flat" resource access, which is for example common for projects of type
* "application".
*
* @public
* @param {string} namespace Project namespace
* @returns {Promise<@ui5/fs/readers/Link>} Promise resolving with reader instance
*/
async flatten(namespace) {
console.warn("DEPRECATED CALL TO AbstractReader#flatten - THIS FUNCTION WILL BE REMOVED IN THE NEXT RELEASE");
const {default: Link} = await import("./readers/Link.js");
return new Link({
reader: this,
pathMapping: {
linkPath: `/`,
targetPath: `/resources/${namespace}/`
}
});
}
/**
* Locates resources by one or more glob patterns.

@@ -128,0 +88,0 @@ *

@@ -8,4 +8,18 @@ import AbstractReader from "../AbstractReader.js";

/**
* A reader that allows removing paths segments from all resources passed through it.
* A reader that allows for rewriting paths segments of all resources passed through it.
*
* @example
* import Link from "@ui5/fs/readers/Link";
* const linkedReader = new Link({
* reader: sourceReader,
* pathMapping: {
* linkPath: `/app`,
* targetPath: `/resources/my-app-name/`
* }
* });
*
* // The following resolves with a @ui5/fs/ResourceFacade of the resource
* // located at "/resources/my-app-name/Component.js" in the sourceReader
* const resource = await linkedReader.byPath("/app/Component.js");
*
* @public

@@ -12,0 +26,0 @@ * @class

@@ -125,3 +125,4 @@ import path from "node:path";

/**
* Creates a <code>Resource</code>. Accepts the same parameters as the Resource constructor.
* Creates a [Resource]{@link @ui5/fs/Resource}.
* Accepts the same parameters as the [Resource]{@link @ui5/fs/Resource} constructor.
*

@@ -184,4 +185,18 @@ * @public

* Create a [Link-Reader]{@link @ui5/fs/readers/Filter} with the given reader.
* The provided path mapping allows
* The provided path mapping allows for rewriting paths segments of all resources passed through it.
*
* @example
* import {createLinkReader} from "@ui5/fs/resourceFactory";
* const linkedReader = createLinkReader({
* reader: sourceReader,
* pathMapping: {
* linkPath: `/app`,
* targetPath: `/resources/my-app-name/`
* }
* });
*
* // The following resolves with a @ui5/fs/ResourceFacade of the resource
* // located at "/resources/my-app-name/Component.js" in the sourceReader
* const resource = await linkedReader.byPath("/app/Component.js");
*
* @public

@@ -188,0 +203,0 @@ * @param {object} parameters

{
"name": "@ui5/fs",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"description": "UI5 Tooling - File System Abstraction",

@@ -137,3 +137,3 @@ "author": {

"@istanbuljs/esm-loader-hook": "^0.2.0",
"ava": "^5.0.1",
"ava": "^5.1.0",
"chai": "^4.3.7",

@@ -144,8 +144,8 @@ "chai-fs": "^2.0.0",

"depcheck": "^1.4.3",
"docdash": "^1.2.0",
"eslint": "^8.27.0",
"docdash": "^2.0.0",
"eslint": "^8.28.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-ava": "^13.2.0",
"eslint-plugin-jsdoc": "^37.9.7",
"esmock": "^2.0.7",
"esmock": "^2.0.9",
"jsdoc": "^3.6.11",

@@ -152,0 +152,0 @@ "nyc": "^15.1.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc