Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nestjs/nest-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 10.4.1
Choose a base ref
...
head repository: nestjs/nest-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 10.4.2
Choose a head ref
  • 12 commits
  • 6 files changed
  • 3 contributors

Commits on Jul 3, 2024

  1. Revert "fix(deps): update dependency typescript to v5.5.3"

    kamilmysliwiec authored Jul 3, 2024
    1
    Copy the full SHA
    4961cc4 View commit details
  2. Merge pull request #2624 from nestjs/revert-2622-renovate/typescript-5.x

    Revert "fix(deps): update dependency typescript to v5.5.3"
    kamilmysliwiec authored Jul 3, 2024
    Copy the full SHA
    28bbb72 View commit details
  3. Copy the full SHA
    285980e View commit details
  4. style: fix formatting

    micalevisk committed Jul 3, 2024
    Copy the full SHA
    b59436a View commit details
  5. refactor: remove redundand try-catch block

    micalevisk committed Jul 3, 2024
    Copy the full SHA
    f48ce24 View commit details
  6. chore(deps): update dependency @swc/core to v1.6.7

    renovate[bot] committed Jul 3, 2024
    Copy the full SHA
    d87405a View commit details
  7. Copy the full SHA
    d857d9b View commit details
  8. Copy the full SHA
    5dafd62 View commit details
  9. fix: npm-script clean not working due to missing dependency

    micalevisk committed Jul 3, 2024
    Copy the full SHA
    b5dba00 View commit details

Commits on Jul 5, 2024

  1. Merge pull request #2630 from micalevisk/fix-issue-2629

    feat: replace 'source-map-support' with nodejs native source mapping binding
    kamilmysliwiec authored Jul 5, 2024
    Copy the full SHA
    682e7dd View commit details
  2. Merge pull request #2627 from micalevisk/fix-issue-2421

    fix: propagate errors raised when loading the webpack configuration file
    kamilmysliwiec authored Jul 5, 2024
    Copy the full SHA
    952da4b View commit details
  3. chore(): release v10.4.2

    kamilmysliwiec committed Jul 5, 2024
    Copy the full SHA
    8824eb2 View commit details
Showing with 439 additions and 177 deletions.
  1. +4 −6 actions/build.action.ts
  2. +2 −12 actions/start.action.ts
  3. +5 −2 lib/compiler/assets-manager.ts
  4. +8 −0 lib/utils/is-module-available.ts
  5. +415 −152 package-lock.json
  6. +5 −5 package.json
10 changes: 4 additions & 6 deletions actions/build.action.ts
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ import {
} from '../lib/configuration/defaults';
import { FileSystemReader } from '../lib/readers';
import { ERROR_PREFIX } from '../lib/ui';
import { isModuleAvailable } from '../lib/utils/is-module-available';
import { AbstractAction } from './abstract.action';
import webpack = require('webpack');

@@ -261,13 +262,10 @@ export class BuildAction extends AbstractAction {
webpackRef: typeof webpack,
) => webpack.Configuration {
const pathToWebpackFile = join(process.cwd(), webpackPath);
try {
return require(pathToWebpackFile);
} catch (err) {
if (webpackPath !== defaultPath) {
throw err;
}
const isWebpackFileAvailable = isModuleAvailable(pathToWebpackFile);
if (!isWebpackFileAvailable && webpackPath === defaultPath) {
return ({}) => ({});
}
return require(pathToWebpackFile);
}
}
14 changes: 2 additions & 12 deletions actions/start.action.ts
Original file line number Diff line number Diff line change
@@ -175,21 +175,11 @@ export class StartAction extends BuildAction {
typeof debug === 'string' ? `--inspect=${debug}` : '--inspect';
processArgs.unshift(inspectFlag);
}
const sourceMapsRegisterPath = this.getSourceMapSupportPkg();
if (sourceMapsRegisterPath !== undefined) {
processArgs.unshift(`-r "${sourceMapsRegisterPath}"`);
}
processArgs.unshift('--enable-source-maps');

return spawn(binaryToRun, processArgs, {
stdio: 'inherit',
shell: true,
});
}

private getSourceMapSupportPkg() {
try {
return require.resolve('source-map-support/register');
} catch {
return undefined;
}
}
}
7 changes: 5 additions & 2 deletions lib/compiler/assets-manager.ts
Original file line number Diff line number Diff line change
@@ -60,10 +60,13 @@ export class AssetsManager {

const filesToCopy = assets.map<AssetEntry>((item) => {
let includePath = typeof item === 'string' ? item : item.include!;
let excludePath = typeof item !== 'string' && item.exclude ? item.exclude : undefined;
let excludePath =
typeof item !== 'string' && item.exclude ? item.exclude : undefined;

includePath = join(sourceRoot, includePath).replace(/\\/g, '/');
excludePath = excludePath ? join(sourceRoot, excludePath).replace(/\\/g, '/') : undefined;
excludePath = excludePath
? join(sourceRoot, excludePath).replace(/\\/g, '/')
: undefined;

return {
outDir: typeof item !== 'string' ? item.outDir || outDir : outDir,
8 changes: 8 additions & 0 deletions lib/utils/is-module-available.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function isModuleAvailable(path: string): boolean {
try {
require.resolve(path);
return true;
} catch {
return false;
}
}
Loading