Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devDependency replace globby #390

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c17e6ef
[INTERNAL] Enable CI for branches next, main
RandomByte Nov 23, 2021
6dc1723
[INTERNAL] Bump @ui5/logger from 2.0.1 to 3.0.0-next.0
RandomByte Nov 29, 2021
6e028a1
In-range update of npm dependencies
RandomByte Dec 14, 2021
0a9c20a
[INTERNAL] Bump @ui5/logger from 3.0.0-next.0 to 3.0.0-alpha.0
RandomByte Dec 14, 2021
6e21036
Release 3.0.0-alpha.0
RandomByte Dec 14, 2021
5cdd926
[INTERNAL] Bump @ui5/logger from 3.0.0-alpha.0 to 3.0.1-alpha.0
RandomByte Dec 14, 2021
f46e6d1
[FEATURE] Introduce Readers "Filter" and "Transformer" (#331)
RandomByte Jan 13, 2022
42d8080
Release 3.0.0-alpha.1
RandomByte Jan 13, 2022
755d3c0
In-range update of npm dependencies
RandomByte Jan 17, 2022
7243631
In-range update of npm dependencies
RandomByte Jan 19, 2022
40a9ad1
[INTERNAL] Align JSdoc generation with npm 8 workspace setup
RandomByte Dec 16, 2021
02f66da
In-range update of npm dependencies
RandomByte Jan 21, 2022
94029de
[BREAKING] Require Node.js >= 16.13.2 / npm >= 8
matz3 Jan 24, 2022
08bca39
[INTERNAL] Upgrade ESlint / Use ES2021
matz3 Jan 24, 2022
473811d
In-range update of npm dependencies
RandomByte Jan 25, 2022
167c64e
[INTERNAL] Bump @ui5/logger from 3.0.1-alpha.0 to 3.0.1-alpha.1
matz3 Jan 25, 2022
3c71e07
Release 3.0.0-alpha.2
matz3 Jan 25, 2022
d69bbeb
[INTERNAL] AbstractReader: Fix #transformer JSDoc
RandomByte Jan 26, 2022
1e0120d
[INTERNAL] npm release: Add missing CHANGELOG file
matz3 Jan 28, 2022
c31bfe8
In-range update of npm dependencies
RandomByte Feb 23, 2022
142bb62
[INTERNAL] git-chglog: Fix mutli-release-branch setup
RandomByte Feb 24, 2022
6c3b64d
In-range update of npm dependencies
RandomByte Mar 9, 2022
ae8ac4d
[INTERNAL] Azure: Re-run coverage test only
matz3 Mar 30, 2022
354f694
In-range update of npm dependencies
RandomByte Apr 4, 2022
9ac6a39
[FIX] FileSystem Adapter: Use native fs.copy / Skip writing when reso…
matz3 Apr 21, 2022
9fe0e06
In-range update of npm dependencies
RandomByte Apr 21, 2022
7ced04a
Release 3.0.0-alpha.3
flovogt Apr 26, 2022
eb75440
[INTERNAL] resourceFactory: Add #createReader and #reateReaderCollec…
RandomByte Dec 4, 2020
adba34a
[INTERNAL] Add ResourceFacade, expose Resource project instance
RandomByte Jun 13, 2022
a0e5cf3
[FEATURE] Add Link-reader and WriterCollection
RandomByte Jun 13, 2022
74594cf
[INTERNAL] Make trace logging silly and only collect data if log leve…
RandomByte Jun 13, 2022
6d1f411
[BREAKING] AbstractAdapter: Virtual base path must end with slash
RandomByte Jun 13, 2022
a4d15f6
[BREAKING] resourceFactory: Remove #createCollectionsForTree
RandomByte Jun 13, 2022
0aa9b45
[INTERNAL] WriterCollection: Escape string properly before passing it…
RandomByte Jun 13, 2022
4e4c9f3
[INTERNAL] Cleanup tests
RandomByte Jun 13, 2022
4977c0a
[INTERNAL] Fix JSDoc, increase coverage
RandomByte Jun 13, 2022
5a693fe
[INTERNAL] Lower coverage thresholds
RandomByte Jun 13, 2022
d2bd8f8
Release 3.0.0-alpha.4
RandomByte Jun 13, 2022
afbe5d2
In-range update of npm dependencies
RandomByte Jun 13, 2022
805f89d
[INTERNAL] GH Workflows: Update GH Actions
RandomByte Jun 14, 2022
1e093bd
[INTERNAL] Azure CI: Replace Node.js v17 with v18
RandomByte Jun 14, 2022
bc1aa8f
[INTERNAL] Revert "[INTERNAL] Lower coverage thresholds"
RandomByte Jun 21, 2022
2ed0ca3
[INTERNAL] Add tests for Link, ResourceFacade, resourceFactory
RandomByte Jul 4, 2022
89d6634
[INTERNAL] package.json: Further lift coverage thresholds
RandomByte Jul 6, 2022
52b8e31
Release 3.0.0-alpha.5
RandomByte Jul 12, 2022
f3a87bf
[INTERNAL] Replace globby with fast-glob
flovogt Jul 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .chglog/release-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ template: RELEASE.tpl.md
info:
repository_url: https://github.com/SAP/ui5-fs
options:
tag_filter_pattern: '^v[^012]' # For release notes ignore versions below v3 to that we always compare the _last v3+_ tag with the current release
commits:
filters:
Type:
Expand Down
11 changes: 6 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
module.exports = {
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 8
"es2021": true
},
"extends": ["eslint:recommended", "google"],
"plugins": [
Expand Down Expand Up @@ -46,7 +43,11 @@ module.exports = {
"comma-dangle": "off",
"no-tabs": "off",
"valid-jsdoc": 0,
"jsdoc/check-examples": 2,
// jsdoc/check-examples is temporarily set to "warn" as the rule causes issues in our CI
// See: https://github.com/gajus/eslint-plugin-jsdoc/issues/508
// Starting with ESLint v8, it needs to be disabled as it currently can't be supported
// See: https://github.com/eslint/eslint/issues/14745
"jsdoc/check-examples": 0,
"jsdoc/check-param-names": 2,
"jsdoc/check-tag-names": 2,
"jsdoc/check-types": 2,
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches:
- master
- main
- next
pull_request:
branches: [ master ]
branches:
- master
- main
- next

# Execute at least once per week to get new findings without active development taking place
schedule:
Expand All @@ -17,11 +23,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: 'javascript'
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -33,4 +39,4 @@ jobs:
# 📚 https://git.io/JvXDl

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
18 changes: 12 additions & 6 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@ name: GitHub CI

on:
push:
branches: [ master ]
branches:
- master
- main
- next
pull_request:
branches: [ master ]
branches:
- master
- main
- next

jobs:
test:
name: General checks, tests and coverage reporting
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js LTS 14.x
uses: actions/setup-node@v2.4.1
- name: Use Node.js LTS 16.x
uses: actions/setup-node@v3.3.0
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
run: npm ci
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/reuse-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ name: REUSE

on:
push:
branches: [ master ]
branches:
- master
- main
- next
pull_request:
branches: [ master ]
branches:
- master
- main
- next

jobs:
compliance-check:
name: Compliance Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Execute REUSE Compliance Check
uses: fsfe/reuse-action@v1.1
49 changes: 47 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,49 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

A list of unreleased changes can be found [here](https://github.com/SAP/ui5-fs/compare/v2.0.6...HEAD).
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-fs/compare/v3.0.0-alpha.5...HEAD).

<a name="v3.0.0-alpha.5"></a>
## [v3.0.0-alpha.5] - 2022-07-06

<a name="v3.0.0-alpha.4"></a>
## [v3.0.0-alpha.4] - 2022-06-13
### Breaking Changes
- **AbstractAdapter:** Virtual base path must end with slash [`6d1f411`](https://github.com/SAP/ui5-fs/commit/6d1f4117a2b8bb1226540fafeec8341e4966177d)
- **resourceFactory:** Remove #createCollectionsForTree [`a4d15f6`](https://github.com/SAP/ui5-fs/commit/a4d15f61ae0416051658280bfd2f8635c7ddf44e)

### Features
- Add Link-reader and WriterCollection [`a0e5cf3`](https://github.com/SAP/ui5-fs/commit/a0e5cf3ef86a4b0cdc817d08963ed6574740f1bc)


<a name="v3.0.0-alpha.3"></a>
## [v3.0.0-alpha.3] - 2022-04-26
### Bug Fixes
- **FileSystem Adapter:** Use native fs.copy / Skip writing when resource is unchanged ([#370](https://github.com/SAP/ui5-fs/issues/370)) [`9ac6a39`](https://github.com/SAP/ui5-fs/commit/9ac6a39f3cb72e02c2a1298b07c4676a0ee92377)


<a name="v3.0.0-alpha.2"></a>
## [v3.0.0-alpha.2] - 2022-01-25
### Breaking Changes
- Require Node.js >= 16.13.2 / npm >= 8 [`94029de`](https://github.com/SAP/ui5-fs/commit/94029deea4e85211fb8d84f7b213f1fd0c418240)

### BREAKING CHANGE

Support for older Node.js and npm releases has been dropped.
Only Node.js v16.13.2 and npm v8 or higher are supported.


<a name="v3.0.0-alpha.1"></a>
## [v3.0.0-alpha.1] - 2022-01-13
### Features
- Introduce Readers "Filter" and "Transformer" ([#331](https://github.com/SAP/ui5-fs/issues/331)) [`f46e6d1`](https://github.com/SAP/ui5-fs/commit/f46e6d1b9aed5858f2d72b10b18635de6ed1f1e0)


<a name="v3.0.0-alpha.0"></a>
## [v3.0.0-alpha.0] - 2021-12-14

<a name="v2.0.6"></a>
## [v2.0.6] - 2020-12-17
## [v2.0.6] - 2020-12-18
### Bug Fixes
- **fsInterface on Windows:** Correctly handle project paths containing non-ASCII characters [`6bb44be`](https://github.com/SAP/ui5-fs/commit/6bb44be7c13f6b5c66855d3343694f42f9bdfe0e)

Expand Down Expand Up @@ -128,6 +167,12 @@ Adapters "AbstractAdapter", "FileSystem" and "Memory" used to be accessible via
- **AbstractAdapter:** Fix normalization of globstar [`6d484e8`](https://github.com/SAP/ui5-fs/commit/6d484e847b62aa0829641f25a76dcc89b0840d44)


[v3.0.0-alpha.5]: https://github.com/SAP/ui5-fs/compare/v3.0.0-alpha.4...v3.0.0-alpha.5
[v3.0.0-alpha.4]: https://github.com/SAP/ui5-fs/compare/v3.0.0-alpha.3...v3.0.0-alpha.4
[v3.0.0-alpha.3]: https://github.com/SAP/ui5-fs/compare/v3.0.0-alpha.2...v3.0.0-alpha.3
[v3.0.0-alpha.2]: https://github.com/SAP/ui5-fs/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
[v3.0.0-alpha.1]: https://github.com/SAP/ui5-fs/compare/v3.0.0-alpha.0...v3.0.0-alpha.1
[v3.0.0-alpha.0]: https://github.com/SAP/ui5-fs/compare/v2.0.6...v3.0.0-alpha.0
[v2.0.6]: https://github.com/SAP/ui5-fs/compare/v2.0.5...v2.0.6
[v2.0.5]: https://github.com/SAP/ui5-fs/compare/v2.0.4...v2.0.5
[v2.0.4]: https://github.com/SAP/ui5-fs/compare/v2.0.3...v2.0.4
Expand Down
22 changes: 8 additions & 14 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,18 @@ trigger:

strategy:
matrix:
linux_node_10:
linux_node_lts_16:
imageName: 'ubuntu-20.04'
node_version: 10.x
linux_node_lts_12:
imageName: 'ubuntu-20.04'
node_version: 12.x
linux_node_lts_14:
imageName: 'ubuntu-20.04'
node_version: 14.x
node_version: 16.x
linux_node_latest:
imageName: 'ubuntu-20.04'
node_version: 16.x
node_version: 18.x
mac_node_latest:
imageName: 'macOS-10.15'
node_version: 16.x
imageName: 'macOS-11'
node_version: 18.x
windows_node_latest:
imageName: 'windows-2019'
node_version: 16.x
imageName: 'windows-2022'
node_version: 18.x

pool:
vmImage: $(imageName)
Expand Down Expand Up @@ -59,6 +53,6 @@ steps:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'

- script: npm run test
- script: npm run coverage
displayName: Run Test Natively in Case of Failures
condition: failed()
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ module.exports = {
*/
Memory: "./lib/adapters/Memory"
},
/**
* @public
* @alias module:@ui5/fs.readers
* @namespace
*/
readers: {
/**
* @type {typeof import('./lib/readers/Filter')}
*/
Filter: "./lib/readers/Filter",
/**
* @type {typeof import('./lib/readers/Transformer')}
*/
Transformer: "./lib/readers/Transformer",
},
/**
* @type {typeof import('./lib/AbstractReader')}
*/
Expand Down
1 change: 0 additions & 1 deletion jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"./jsdoc-plugin"
],
"opts": {
"template": "node_modules/docdash/",
"encoding": "utf8",
"destination": "jsdocs/",
"recurse": true,
Expand Down
60 changes: 57 additions & 3 deletions lib/AbstractReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,60 @@ class AbstractReader {
});
}


/**
* Create a [Filter-Reader]{@link module:@ui5/fs.readers.Filter} from the current reader
*
* @public
* @param {module:@ui5/fs.readers.Filter~callback} callback
* Filter function. Will be called for every resource passed through this reader.
* @returns {module:@ui5/fs.reader.Filter} Filter instance
*/
filter(callback) {
const Filter = require("./readers/Filter");
return new Filter({
reader: this,
callback
});
}

/**
* Create a [Transformer-Reader]{@link module:@ui5/fs.readers.Transformer} from the current reader
*
* @private
* @param {module:@ui5/fs.readers.Transformer~callback} callback
* Callback to check and eventually transform any resource passed through the reader
* @returns {module:@ui5/fs.reader.Transformer} Transformer instance
*/
transform(callback) {
const Transformer = require("./readers/Transformer");
return new Transformer({
reader: this,
callback
});
}
/**
* Create an abstraction of this reader instance 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 {module:@ui5/fs.reader.AbstractReader} Reader instance
*/
flatten(namespace) {
const Link = require("./readers/Link");
return new Link({
reader: this,
pathMapping: {
linkPath: `/`,
targetPath: `/resources/${namespace}/`
}
});
}

/**
* Locates resources by one or more glob patterns.
*
Expand All @@ -82,7 +136,7 @@ class AbstractReader {
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
_byGlob(virPattern, options, trace) {
throw new Error("Not implemented");
throw new Error("Function '_byGlob' is not implemented");
}

/**
Expand All @@ -96,7 +150,7 @@ class AbstractReader {
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
_runGlob(pattern, options, trace) {
throw new Error("Not implemented");
throw new Error("Function '_runGlob' is not implemented");
}

/**
Expand All @@ -110,7 +164,7 @@ class AbstractReader {
* @returns {Promise<module:@ui5/fs.Resource>} Promise resolving to a single resource
*/
_byPath(virPath, options, trace) {
throw new Error("Not implemented");
throw new Error("Function '_byPath' is not implemented");
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/ReaderCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class ReaderCollection extends AbstractReader {
* The constructor.
*
* @param {object} parameters Parameters
* @param {module:@ui5/fs.AbstractReader[]} parameters.readers List of resource readers (all tried in parallel)
* @param {string} parameters.name The collection name
* @param {module:@ui5/fs.AbstractReader[]} parameters.readers List of resource readers (all tried in parallel)
*/
constructor({readers, name}) {
constructor({name, readers}) {
super();
this._name = name;
this._readers = readers;
Expand Down
Loading