Skip to content

Commit b059bff

Browse files
ci: show report
2 parents 3bf44c7 + c974464 commit b059bff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+485
-469
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
run: yarn --frozen-lockfile
5656
if: matrix.node-version != '10.x'
5757
- name: Run tests with coverage
58-
run: npm run test:coverage -- --ci
59-
- if: ${{ matrix.os != 'windows-latest' }}
60-
uses: codecov/codecov-action@v5
58+
run: yarn test:coverage -- --ci
59+
- uses: codecov/codecov-action@v5
60+
with:
61+
flags: integration
62+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
/.nyc_output
44
*.log
55
.eslintcache
6+
7+
# IDE
68
.idea
79
.vscode
10+
811
.DS_Store
912
package-lock.json

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
package.json
22
test/**/*.*
33
!test/*.js
4+
5+
# Generated files
6+
types.d.ts

.prettierrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module.exports = {
33
useTabs: true,
44
tabWidth: 2,
55
trailingComma: "none",
6-
arrowParens: "avoid",
76
overrides: [
87
{
98
files: "*.json",
@@ -13,7 +12,7 @@ module.exports = {
1312
}
1413
},
1514
{
16-
files: "*.ts",
15+
files: "*.{cts,mts,ts}",
1716
options: {
1817
parser: "typescript"
1918
}

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,21 @@ const context = {};
7272
const lookupStartPath = "/Users/webpack/some/root/dir";
7373
const request = "./path/to-look-up.js";
7474
const resolveContext = {};
75-
myResolver.resolve(context, lookupStartPath, request, resolveContext, (
76-
err /*Error*/,
77-
filepath /*string*/
78-
) => {
79-
// Do something with the path
80-
});
75+
myResolver.resolve(
76+
context,
77+
lookupStartPath,
78+
request,
79+
resolveContext,
80+
(err /*Error*/, filepath /*string*/) => {
81+
// Do something with the path
82+
}
83+
);
8184
```
8285

8386
#### Resolver Options
8487

8588
| Field | Default | Description |
86-
|------------------|-----------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------- |
89+
| ---------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
8790
| alias | [] | A list of module alias configurations or an object which maps key to value |
8891
| aliasFields | [] | A list of alias fields in description files |
8992
| extensionAlias | {} | An object which maps extension to extension aliases |
@@ -94,7 +97,7 @@ myResolver.resolve(context, lookupStartPath, request, resolveContext, (
9497
| enforceExtension | false | Enforce that a extension from extensions must be used |
9598
| exportsFields | ["exports"] | A list of exports fields in description files |
9699
| extensions | [".js", ".json", ".node"] | A list of extensions which should be tried for files |
97-
| fallback | [] | Same as `alias`, but only used if default resolving fails |
100+
| fallback | [] | Same as `alias`, but only used if default resolving fails |
98101
| fileSystem | | The file system which should be used |
99102
| fullySpecified | false | Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests) |
100103
| mainFields | ["main"] | A list of main fields in description files |

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
moduleFileExtensions: ["js", "mjs", "cjs", "ts"]
2+
moduleFileExtensions: ["js", "mjs", "cjs", "ts"]
33
};

lib/AliasPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = class AliasPlugin {
3636
* @param {string} maybeAbsolutePath path
3737
* @returns {null|string} absolute path with slash ending
3838
*/
39-
const getAbsolutePathWithSlashEnding = maybeAbsolutePath => {
39+
const getAbsolutePathWithSlashEnding = (maybeAbsolutePath) => {
4040
const type = getType(maybeAbsolutePath);
4141
if (type === PathType.AbsolutePosix || type === PathType.AbsoluteWin) {
4242
return resolver.join(maybeAbsolutePath, "_").slice(0, -1);

lib/CachedInputFileSystem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const nextTick = require("process").nextTick;
2222
* @param {string} path path
2323
* @returns {string} dirname
2424
*/
25-
const dirname = path => {
25+
const dirname = (path) => {
2626
let idx = path.length - 1;
2727
while (idx >= 0) {
2828
const c = path.charCodeAt(idx);

lib/ModulesInHierarchicalDirectoriesPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ module.exports = class ModulesInHierarchicalDirectoriesPlugin {
3737
(request, resolveContext, callback) => {
3838
const fs = resolver.fileSystem;
3939
const addrs = getPaths(/** @type {string} */ (request.path))
40-
.paths.map(p => {
41-
return this.directories.map(d => resolver.join(p, d));
40+
.paths.map((p) => {
41+
return this.directories.map((d) => resolver.join(p, d));
4242
})
4343
.reduce((array, p) => {
4444
array.push.apply(array, p);

lib/Resolver.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ const {
347347
* @returns {string} in camel case
348348
*/
349349
function toCamelCase(str) {
350-
return str.replace(/-([a-z])/g, str => str.slice(1).toUpperCase());
350+
return str.replace(/-([a-z])/g, (str) => str.slice(1).toUpperCase());
351351
}
352352

353353
class Resolver {
@@ -519,15 +519,15 @@ class Resolver {
519519
/**
520520
* @param {ResolveRequest} obj object
521521
*/
522-
yield_ = obj => {
522+
yield_ = (obj) => {
523523
old(obj);
524524
yieldCalled = true;
525525
};
526526
/**
527527
* @param {ResolveRequest} result result
528528
* @returns {void}
529529
*/
530-
finishYield = result => {
530+
finishYield = (result) => {
531531
if (result) {
532532
/** @type {ResolveContextYield} */ (yield_)(result);
533533
}
@@ -541,7 +541,7 @@ class Resolver {
541541
* @param {ResolveRequest} result result
542542
* @returns {void}
543543
*/
544-
const finishResolved = result => {
544+
const finishResolved = (result) => {
545545
return callback(
546546
null,
547547
result.path === false
@@ -557,7 +557,7 @@ class Resolver {
557557
* @param {string[]} log logs
558558
* @returns {void}
559559
*/
560-
const finishWithoutResolve = log => {
560+
const finishWithoutResolve = (log) => {
561561
/**
562562
* @type {ErrorWithDetail}
563563
*/
@@ -577,7 +577,7 @@ class Resolver {
577577
obj,
578578
message,
579579
{
580-
log: msg => {
580+
log: (msg) => {
581581
parentLog(msg);
582582
log.push(msg);
583583
},
@@ -639,7 +639,7 @@ class Resolver {
639639
obj,
640640
message,
641641
{
642-
log: msg => log.push(msg),
642+
log: (msg) => log.push(msg),
643643
yield: yield_,
644644
stack: resolveContext.stack
645645
},

0 commit comments

Comments
 (0)