Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
84e103e
chore: v12.0.0 release
kamilmysliwiec Mar 5, 2026
6373599
feat: minor updates
kamilmysliwiec Mar 7, 2026
1e35d4b
build: replace gulp with a simple script
kamilmysliwiec Mar 7, 2026
a904566
feat: ensure local vs global module format match
kamilmysliwiec Mar 8, 2026
d093b80
test: add tsconfig-paths tests
kamilmysliwiec Mar 8, 2026
eb5d409
chore: upgrade deps
kamilmysliwiec Mar 9, 2026
8c49548
ci: run e2e tests
kamilmysliwiec Mar 9, 2026
5454397
ci: fix tests
kamilmysliwiec Mar 9, 2026
58c64b6
Initial plan
Copilot Mar 11, 2026
799e8f8
Initial plan
Copilot Mar 11, 2026
a3aa6ee
Initial plan
Copilot Mar 11, 2026
06ac422
Initial plan
Copilot Mar 11, 2026
4c603ed
Initial plan
Copilot Mar 11, 2026
a7e6ff4
Initial plan
Copilot Mar 11, 2026
687406b
Initial plan
Copilot Mar 11, 2026
676a7ff
Initial plan
Copilot Mar 11, 2026
b0f6325
fix: replace require('fs') with ESM import in e2e build tests
Copilot Mar 11, 2026
d3044aa
fix: handle optional dependencies fields in package.json parsing
Copilot Mar 11, 2026
2d80ee7
fix: replace require('fs') with ESM import in build.command.e2e-spec.ts
Copilot Mar 11, 2026
671d402
fix: add cli override support for rspack config path
Copilot Mar 11, 2026
7745a9d
fix(test): fix mocks for sync file system methods
Copilot Mar 11, 2026
9549045
fix: remove unused execSync import from postinstall.cjs
Copilot Mar 11, 2026
116267c
fix: align comment in postinstall.cjs with actual prepare lifecycle hook
Copilot Mar 11, 2026
49b63e2
Merge pull request #3282 from nestjs/copilot/sub-pr-3280
kamilmysliwiec Mar 11, 2026
b0ae68c
Merge pull request #3283 from nestjs/copilot/sub-pr-3280-again
kamilmysliwiec Mar 11, 2026
a22584b
Merge pull request #3284 from nestjs/copilot/sub-pr-3280-another-one
kamilmysliwiec Mar 11, 2026
e9b35f8
Merge pull request #3285 from nestjs/copilot/sub-pr-3280-yet-again
kamilmysliwiec Mar 11, 2026
7541476
fix: remove unused stat import from tools/clean.js
Copilot Mar 11, 2026
8d89b2c
Merge pull request #3286 from nestjs/copilot/sub-pr-3280-one-more-time
kamilmysliwiec Mar 11, 2026
a35cae8
Merge pull request #3287 from nestjs/copilot/sub-pr-3280-please-work
kamilmysliwiec Mar 11, 2026
39a6986
Merge pull request #3288 from nestjs/copilot/sub-pr-3280-51abd158-61b…
kamilmysliwiec Mar 11, 2026
55fa12e
Merge pull request #3289 from nestjs/copilot/sub-pr-3280-f7e0d8c5-483…
kamilmysliwiec Mar 11, 2026
880d8b8
fix(swc): support silent mode for running log
vinubabu323 Mar 28, 2026
e7ec1be
chore: upgrade typescript
kamilmysliwiec Apr 1, 2026
9be5b77
chore: migrate to oxlint from eslint
kamilmysliwiec Apr 1, 2026
6370dc4
chore: remove optional from npmrc
kamilmysliwiec Apr 1, 2026
4d8b996
test: update e2e tests
kamilmysliwiec Apr 1, 2026
0ac11ed
Merge pull request #3295 from vinubabu323/fix/3164-swc-silent-log
kamilmysliwiec Apr 7, 2026
deb1a4e
chore: merge latest
kamilmysliwiec Apr 7, 2026
112dfce
chore: resolve conflicts
kamilmysliwiec Apr 7, 2026
df58deb
feat(cli): add no type check flag to override config (#2796)
maruthang Apr 7, 2026
e5a9afd
fix(swc): correct inverted ignored filter in watch-files-in-src-dir
yogeshwaran-c Apr 8, 2026
647473b
test: add unit tests for project-utils utility functions
yogeshwaran-c Apr 8, 2026
02d6a0f
fix(configuration): deep-merge generateOptions with defaults like com…
yogeshwaran-c Apr 8, 2026
4946518
fix(compiler): handle undefined result from tsconfig parsing
yogeshwaran-c Apr 8, 2026
b5e0c34
fix(start): spread env-file flags as separate spawn arguments
yogeshwaran-c Apr 8, 2026
70fb17a
test(utils): add test coverage for 6 untested utility modules
yogeshwaran-c Apr 8, 2026
2207589
fix(runners): buffer all stdout chunks and fix error message
yogeshwaran-c Apr 8, 2026
4296c1e
Merge pull request #3330 from yogeshwaran-c/test/add-project-utils-sp…
kamilmysliwiec Apr 8, 2026
6cee2a7
Merge pull request #3329 from yogeshwaran-c/fix/swc-watch-src-ignored…
kamilmysliwiec Apr 8, 2026
06fe85a
Merge pull request #3331 from yogeshwaran-c/fix/deep-merge-generate-o…
kamilmysliwiec Apr 8, 2026
1cc55d0
Merge pull request #3332 from yogeshwaran-c/fix/tsconfig-provider-par…
kamilmysliwiec Apr 8, 2026
6d97712
Merge pull request #3334 from yogeshwaran-c/test/utils-test-coverage
kamilmysliwiec Apr 8, 2026
8e5064f
fix(test): update tests for v12 api changes
maruthang Apr 9, 2026
0795666
Merge pull request #3333 from yogeshwaran-c/fix/start-env-file-spawn-…
kamilmysliwiec Apr 9, 2026
cbd98b6
Merge pull request #3320 from maruthang/feat/issue-2796-no-type-check
kamilmysliwiec Apr 9, 2026
428a5b4
fix(types): correct Asset type definition from string literal to stri…
yogeshwaran-c Apr 7, 2026
8991897
fix(generate): use selected project name for specFileSuffix lookup
yogeshwaran-c Apr 7, 2026
01d8569
fix(info): add missing space in os version display
yogeshwaran-c Apr 7, 2026
7e0f238
fix(compiler): run tsconfig paths plugin before user plugins in tsc c…
yogeshwaran-c Apr 7, 2026
54936e9
feat(swc): add emit declarations flag for type definition generation
maruthang Apr 9, 2026
d9ecea7
fix(deps): use tilde range for typescript version (#2847)
maruthang Apr 9, 2026
48e7530
fix(swc): fail build on type errors with type check (#2646)
maruthang Apr 7, 2026
88f3fc6
fix(test): convert type checker host tests to vitest
maruthang Apr 9, 2026
8f12034
feat(new): add skip tests flag to create projects without tests (#2575)
maruthang Apr 9, 2026
19b89d2
fix(build): use correct options variable name for emit declarations
maruthang Apr 9, 2026
8e1f9c7
fix(test): fix vitest compatibility in new action tests
maruthang Apr 9, 2026
930e402
test(copy-path-resolve): add unit tests for asset path resolution
yogeshwaran-c Apr 9, 2026
fe917a8
fix(remaining-flags): handle empty strings in camel case helper
yogeshwaran-c Apr 9, 2026
19e2d12
fix(compiler): normalize output filename path separators
yogeshwaran-c Apr 9, 2026
c0d83fb
test(append-extension): add unit tests for ts extension helper
yogeshwaran-c Apr 9, 2026
9d4686e
test(compiler): add unit tests for webpack config path resolution
yogeshwaran-c Apr 9, 2026
5251144
test(compiler): add unit tests for tsc config path resolution
yogeshwaran-c Apr 9, 2026
8ef5d7c
test(compiler): add unit tests for get builder helper
yogeshwaran-c Apr 9, 2026
fa6da31
fix(build): warn when library assets are silently ignored
yogeshwaran-c Apr 9, 2026
41cc09f
feat(build): add parallel project builds for monorepos
yogeshwaran-c Apr 10, 2026
fc1b139
Merge pull request #3371 from yogeshwaran-c/feat/parallel-build
kamilmysliwiec Apr 10, 2026
02be07f
Merge pull request #3362 from yogeshwaran-c/fix/warn-library-assets
kamilmysliwiec Apr 10, 2026
560feeb
Merge pull request #3361 from yogeshwaran-c/test/get-builder
kamilmysliwiec Apr 10, 2026
8f8d2cf
Merge pull request #3360 from yogeshwaran-c/test/get-tsc-config-path
kamilmysliwiec Apr 10, 2026
a70b970
Merge pull request #3359 from yogeshwaran-c/test/get-webpack-config-path
kamilmysliwiec Apr 10, 2026
d5fe2dc
Merge pull request #3358 from yogeshwaran-c/test/append-extension
kamilmysliwiec Apr 10, 2026
b4ccb8a
Merge pull request #3356 from yogeshwaran-c/test/copy-path-resolve-v12
kamilmysliwiec Apr 10, 2026
bdb514d
Merge pull request #3355 from yogeshwaran-c/fix/remaining-flags-camel…
kamilmysliwiec Apr 10, 2026
431c29c
Merge pull request #3341 from maruthang/feat/issue-2575-skip-tests-flag
kamilmysliwiec Apr 10, 2026
1707366
Merge pull request #3335 from yogeshwaran-c/fix/abstract-runner-stdou…
kamilmysliwiec Apr 10, 2026
db65c2a
Merge pull request #3357 from yogeshwaran-c/fix/bundler-defaults-path…
kamilmysliwiec Apr 10, 2026
256fbe2
fix(assets-manager): skip watcher when asset glob matches no files
yogeshwaran-c Apr 11, 2026
0831803
fix(add): ensure get tag name always returns a string
yogeshwaran-c Apr 11, 2026
f380b70
test: add missing unit tests across compiler, runners, schematics, utils
yogeshwaran-c Apr 13, 2026
6f64ed9
Merge pull request #3388 from yogeshwaran-c/test/add-missing-test-cov…
kamilmysliwiec Apr 13, 2026
a79965a
test(package-json): import vitest globals for v12 compatibility
maruthang Apr 14, 2026
a528b78
test(info): use vi instead of jest for vitest compatibility
maruthang Apr 14, 2026
5acf730
Merge pull request #3374 from yogeshwaran-c/fix/assets-manager-empty-…
kamilmysliwiec Apr 15, 2026
2aef6f7
Merge pull request #3319 from maruthang/fix/issue-2646-swc-type-check…
kamilmysliwiec Apr 15, 2026
233d5d7
Merge pull request #3376 from yogeshwaran-c/fix/add-action-tag-name-t…
kamilmysliwiec Apr 15, 2026
505f2ea
Merge pull request #3339 from maruthang/fix/issue-2847-typescript-dedup
kamilmysliwiec Apr 15, 2026
504fb51
feat(assets): restart app on asset change in watch mode (#2626)
maruthang Apr 9, 2026
1d2969e
fix(test): convert jest references to vitest in assets-manager tests
maruthang Apr 9, 2026
f09806e
feat(assets): debounce watch-mode restart callback
maruthang Apr 15, 2026
94450fb
test(e2e): add coverage for --emit-declarations flag with SWC builder
maruthang Apr 15, 2026
3c92a10
test(e2e): use dev CLI (not published) for --emit-declarations test
maruthang Apr 15, 2026
6cd945d
test(e2e): enable declaration in tsconfig for --emit-declarations test
maruthang Apr 15, 2026
bea9659
test(e2e): recursively look for .d.ts output and log diagnostics on f…
maruthang Apr 15, 2026
e22ff88
Merge pull request #3340 from maruthang/feat/issue-2626-restart-on-as…
kamilmysliwiec Apr 15, 2026
2b84371
Merge pull request #3342 from maruthang/feat/issue-2610-dts-with-swc
kamilmysliwiec Apr 16, 2026
5a1ac64
feat(assets): add option to include library assets in application builds
maruthang Apr 9, 2026
3c60192
test(assets): add e2e tests for library asset inclusion
maruthang Apr 9, 2026
3f83e4e
fix(assets): cast library assets to correct type for type safety
maruthang Apr 9, 2026
89ed707
fix(test): remove unconsumed mock values in assets-manager tests
maruthang Apr 9, 2026
f99b294
fix(e2e): disable webpack in library-assets test to avoid missing pee…
maruthang Apr 15, 2026
df8a0fc
fix(e2e): use non-hyphenated sub-app name in library-assets test
maruthang Apr 15, 2026
66afefd
test(e2e): convert scaffolded monorepo to CJS and use dev CLI
maruthang Apr 15, 2026
6e52e13
test(e2e): fix expected main.js path for tsc monorepo output
maruthang Apr 15, 2026
80be564
fix(test): add includeLibraryAssets mock to closeWatchers/onSuccess t…
maruthang Apr 16, 2026
1da39fb
feat(generate): pass format option to schematics
yogeshwaran-c Apr 9, 2026
c75d521
test(generate): add e2e coverage for --format flag
yogeshwaran-c Apr 16, 2026
3257fbf
Merge pull request #3363 from yogeshwaran-c/feat/format-after-generate
kamilmysliwiec Apr 16, 2026
dc82598
feat(cli): add rspack config path option to build and start commands
yogeshwaran-c Apr 17, 2026
bb872ee
fix(new): prefer process.stdout.columns over tput for terminal width
yogeshwaran-c Apr 17, 2026
3c6265b
feat(generate): accept type and crud options on the resource schematic
yogeshwaran-c Apr 17, 2026
8c97b63
Merge pull request #3402 from yogeshwaran-c/feat/generate-type-crud-v12
kamilmysliwiec Apr 17, 2026
9ad81ee
chore: merge master branch
kamilmysliwiec Apr 17, 2026
865b3f3
test: increase timeout for tsconfig paths
kamilmysliwiec Apr 17, 2026
250e8ba
Merge pull request #3400 from yogeshwaran-c/fix/retrieve-cols-windows
kamilmysliwiec Apr 17, 2026
d884f05
Merge pull request #3399 from yogeshwaran-c/feat/rspack-path-cli-option
kamilmysliwiec Apr 17, 2026
ab26cb1
Merge branch 'v12.0.0' into fix/issue-1845-assets-in-libraries
kamilmysliwiec Apr 17, 2026
b207a00
Merge pull request #3343 from maruthang/fix/issue-1845-assets-in-libr…
kamilmysliwiec Apr 17, 2026
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
18 changes: 17 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aliases:
- &run-unit-tests
run:
name: Test
command: npm run test -- --runInBand --no-cache
command: npm run test

jobs:
build:
Expand Down Expand Up @@ -51,6 +51,19 @@ jobs:
command: npm run clean
- *run-unit-tests

e2e_tests:
working_directory: ~/nest
docker:
- image: cimg/node:24.13.0
steps:
- checkout
- *restore-cache
- *install-deps
- *build-packages
- run:
name: E2E tests
command: npm run test:e2e

workflows:
version: 2
build-and-test:
Expand All @@ -59,3 +72,6 @@ workflows:
- unit_tests:
requires:
- build
- e2e_tests:
requires:
- build
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

9 changes: 9 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ignorePatterns": ["**/*.js", "**/*.d.ts", "node_modules/", "dist/", "test/"],
"rules": {
"no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
]
}
}
8 changes: 1 addition & 7 deletions actions/abstract.action.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import { Input } from '../commands';

export abstract class AbstractAction {
public abstract handle(
inputs?: Input[],
options?: Input[],
extraFlags?: string[],
): Promise<void>;
public abstract handle(context?: any): Promise<void>;
}
89 changes: 34 additions & 55 deletions actions/add.action.ts
Original file line number Diff line number Diff line change
@@ -1,70 +1,60 @@
import { red } from 'ansis';
import { Input } from '../commands';
import { getValueOrDefault } from '../lib/compiler/helpers/get-value-or-default';
import { AddCommandContext } from '../commands/index.js';
import { getValueOrDefault } from '../lib/compiler/helpers/get-value-or-default.js';
import {
AbstractPackageManager,
PackageManagerFactory,
} from '../lib/package-managers';
} from '../lib/package-managers/index.js';
import {
AbstractCollection,
CollectionFactory,
SchematicOption,
} from '../lib/schematics';
import { MESSAGES } from '../lib/ui';
import { loadConfiguration } from '../lib/utils/load-configuration';
} from '../lib/schematics/index.js';
import { MESSAGES } from '../lib/ui/index.js';
import { loadConfiguration } from '../lib/utils/load-configuration.js';
import {
askForProjectName,
hasValidOptionFlag,
moveDefaultProjectToStart,
shouldAskForProject,
} from '../lib/utils/project-utils';
import { AbstractAction } from './abstract.action';
} from '../lib/utils/project-utils.js';
import { AbstractAction } from './abstract.action.js';

const schematicName = 'nest-add';

export class AddAction extends AbstractAction {
public async handle(inputs: Input[], options: Input[], extraFlags: string[]) {
const libraryName = this.getLibraryName(inputs);
public async handle(context: AddCommandContext) {
const libraryName = context.library;
const packageName = this.getPackageName(libraryName);
const collectionName = this.getCollectionName(libraryName, packageName);
const tagName = this.getTagName(packageName);
const skipInstall = hasValidOptionFlag('skip-install', options);
const packageInstallSuccess =
skipInstall || (await this.installPackage(collectionName, tagName));
context.skipInstall ||
(await this.installPackage(collectionName, tagName));
if (packageInstallSuccess) {
const sourceRootOption: Input = await this.getSourceRoot(
inputs.concat(options),
);
options.push(sourceRootOption);

await this.addLibrary(collectionName, options, extraFlags);
const sourceRoot = await this.getSourceRoot(context.project);
await this.addLibrary(collectionName, sourceRoot, context.extraFlags);
} else {
console.error(
red(
MESSAGES.LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE(libraryName),
),
red(MESSAGES.LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE(libraryName)),
);
throw new Error(
MESSAGES.LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE(libraryName),
);
}
}

private async getSourceRoot(inputs: Input[]): Promise<Input> {
private async getSourceRoot(project?: string): Promise<string> {
const configuration = await loadConfiguration();
const configurationProjects = configuration.projects;

const appName = inputs.find((option) => option.name === 'project')!
.value as string;

let sourceRoot = appName
? getValueOrDefault(configuration, 'sourceRoot', appName)
let sourceRoot = project
? getValueOrDefault(configuration, 'sourceRoot', project)
: configuration.sourceRoot;

const shouldAsk = shouldAskForProject(
schematicName,
configurationProjects,
appName,
project ?? '',
);
if (shouldAsk) {
const defaultLabel = ' [ Default ]';
Expand All @@ -90,12 +80,12 @@ export class AddAction extends AbstractAction {
MESSAGES.LIBRARY_PROJECT_SELECTION_QUESTION,
projects,
)) as string;
const project = selectedProject.replace(defaultLabel, '');
if (project !== configuration.sourceRoot) {
sourceRoot = configurationProjects[project].sourceRoot;
const projectName = selectedProject.replace(defaultLabel, '');
if (projectName !== configuration.sourceRoot) {
sourceRoot = configurationProjects[projectName].sourceRoot;
}
}
return { name: 'sourceRoot', value: sourceRoot };
return sourceRoot;
}

private async installPackage(
Expand All @@ -108,7 +98,7 @@ export class AddAction extends AbstractAction {
try {
installResult = await manager.addProduction([collectionName], tagName);
} catch (error) {
if (error && error.message) {
if (error instanceof Error) {
console.error(red(error.message));
}
}
Expand All @@ -117,17 +107,12 @@ export class AddAction extends AbstractAction {

private async addLibrary(
collectionName: string,
options: Input[],
sourceRoot: string,
extraFlags: string[],
) {
console.info(MESSAGES.LIBRARY_INSTALLATION_STARTS);
const schematicOptions: SchematicOption[] = [];
schematicOptions.push(
new SchematicOption(
'sourceRoot',
options.find((option) => option.name === 'sourceRoot')!.value as string,
),
);
schematicOptions.push(new SchematicOption('sourceRoot', sourceRoot));
const extraFlagsString = extraFlags ? extraFlags.join(' ') : undefined;

try {
Expand All @@ -139,24 +124,13 @@ export class AddAction extends AbstractAction {
extraFlagsString,
);
} catch (error) {
if (error && error.message) {
if (error instanceof Error) {
console.error(red(error.message));
return Promise.reject();
}
throw error;
}
}

private getLibraryName(inputs: Input[]): string {
const libraryInput: Input = inputs.find(
(input) => input.name === 'library',
) as Input;

if (!libraryInput) {
throw new Error('No library found in command input');
}
return libraryInput.value as string;
}

private getPackageName(library: string): string {
return library.startsWith('@')
? library.split('/', 2).join('/')
Expand All @@ -173,8 +147,13 @@ export class AddAction extends AbstractAction {
}

private getTagName(packageName: string): string {
return packageName.startsWith('@')
// For scoped packages like "@scope/pkg@1.0.0", split('@', 3) yields
// ["", "scope/pkg", "1.0.0"]. For "@scope/pkg" with no version,
// the tag slot is undefined. Fall back to an empty string so the
// return type stays string and installPackage can substitute "latest".
const tag = packageName.startsWith('@')
? packageName.split('@', 3)[2]
: packageName.split('@', 2)[1];
return tag ?? '';
}
}
Loading