TobyAndToby / generate-license-file-webpack-plugin

Compare 458919c ... +1 ... 862c08e

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -16,22 +16,14 @@
Loading
16 16
): AssetProcessingAsyncTap => {
17 17
  const pluginName = LicenseFilePlugin.name;
18 18
19 -
  const {
20 -
    outputFileName,
21 -
    outputFolder,
22 -
    isDev,
23 -
    lineEnding,
24 -
    projectFolder: configuredProjectFolder
25 -
  } = options;
19 +
  const { outputFileName, outputFolder, isDev, lineEnding, pathToPackageJson } = options;
26 20
27 21
  const RawSource = compiler.webpack.sources.RawSource;
28 22
29 23
  return (_, resolve) => {
30 -
    const projectFolder = configuredProjectFolder ?? compiler.context;
31 -
32 24
    const implementation = !!isDev ? devImplementation : getLicenseFileText;
33 25
34 -
    implementation(projectFolder, lineEnding)
26 +
    implementation(pathToPackageJson, lineEnding)
35 27
      .then(text => {
36 28
        const outputPath = join(outputFolder, outputFileName);
37 29
        compilation.emitAsset(outputPath, new RawSource(text));

@@ -3,6 +3,9 @@
Loading
3 3
import { defaultOptions } from "./defaultOptions";
4 4
import { Options } from "./options";
5 5
6 +
/**
7 +
 * Webpack plugin to generate a text file asset containing all of the licenses for your production third-party dependencies.
8 +
 */
6 9
export class LicenseFilePlugin {
7 10
  private pluginName = LicenseFilePlugin.name;
8 11

@@ -3,7 +3,7 @@
Loading
3 3
export const defaultOptions: Options = {
4 4
  outputFileName: "third-party-licenses.txt",
5 5
  outputFolder: "./",
6 -
  projectFolder: "./",
6 +
  pathToPackageJson: "./package.json",
7 7
  isDev: false,
8 8
  lineEnding: undefined
9 9
};

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src 100.00%
Project Totals (5 files) 100.00%
Loading