Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ jobs:
--nx-bail \
--configuration=ci \
--output-style=stream \
--no-dte \
--no-agents \
--no-cloud \
--skip-nx-cache \
--projects=plugins/* \
Expand Down
17 changes: 0 additions & 17 deletions .commitlintrc.js → commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
const {
utils: { getProjects },
} = require('@commitlint/config-nx-scopes');

/** @type {import('cz-git').UserConfig} */
module.exports = {
rules: {
// @see: https://commitlint.js.org/#/reference-rules
'scope-enum': async (ctx) => [
2,
'always',
[
...getProjects(
ctx,
({ name }) => !name.includes('e2e') && !name.includes('sb'),
),
],
],
},
prompt: {
enableMultipleScopes: true,
scopeEnumSeparator: ',',
Expand Down
20 changes: 2 additions & 18 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "origin/main",
"defaultProject": "verdaccio",
"nxCloudAccessToken": "ZTBkM2I2MjYtNTc4Mi00YjUxLTkzNDAtZWFlYjg1OGY0Y2UxfHJlYWQtd3JpdGU=",
"nxCloudAccessToken": "NzU1N2M1YWQtZmZlYy00MjlmLTk3ZTAtNzFmMWFiMTc0ZTk2fHJlYWQ=",
"workspaceLayout": {
"appsDir": "bin",
"libsDir": "packages"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["lint", "^build"],
Expand Down Expand Up @@ -217,14 +210,5 @@
"analyzeSourceFiles": true
}
},
"plugins": [
{
"plugin": "nx-cmake",
"options": {
"language": "C",
"cmakeConfigDir": ".cmake",
"workspaceName": "workspace"
}
}
]
"plugins": ["nx-cmake"]
}
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,24 @@
},
"private": true,
"devDependencies": {
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.1",
"@commitlint/config-nx-scopes": "^18.6.1",
"@commitlint/types": "^18.6.1",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@commitlint/types": "^19.0.3",
"@nx/eslint": "18.1.2",
"@nx/eslint-plugin": "18.1.2",
"@nx/jest": "18.1.2",
"@nx/js": "18.1.2",
"@nx/plugin": "18.1.2",
"@swc-node/register": "1.9.0",
"@swc/cli": "~0.3.10",
"@swc/core": "1.4.6",
"@swc/core": "1.4.8",
"@types/jest": "^29.5.12",
"@types/node": "20.11.25",
"@typescript-eslint/eslint-plugin": "7.1.1",
"@typescript-eslint/parser": "7.1.1",
"@types/node": "20.11.30",
"@typescript-eslint/eslint-plugin": "7.3.1",
"@typescript-eslint/parser": "7.3.1",
"@verdaccio/types": "^10.8.0",
"commitizen": "^4.3.0",
"commitlint": "^19.0.3",
"commitlint": "^19.2.1",
"cz-git": "^1.9.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
Expand All @@ -52,13 +51,13 @@
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"ts-node": "10.9.2",
"typescript": "5.4.2",
"verdaccio": "^5.29.2"
"typescript": "5.4.3",
"verdaccio": "^5.30.2"
},
"dependencies": {
"@nx/devkit": "18.1.2",
"@swc/helpers": "0.5.6",
"create-nx-workspace": "18.0.8",
"@swc/helpers": "0.5.7",
"create-nx-workspace": "18.1.2",
"tslib": "^2.6.2"
}
}
2 changes: 1 addition & 1 deletion plugins/create-nx-cmake/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"create-nx-cmake": "./bin/index.js"
},
"dependencies": {
"create-nx-workspace": "18.0.8",
"create-nx-workspace": "18.1.2",
"tslib": "^2.6.2"
},
"author": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { checkNxVersion } from './checkNxVersion';

describe('checkNxVersion', () => {
it('should return true when version is greater than or equal to required version', () => {
expect(checkNxVersion('16.9.0')).toBe(true);
expect(checkNxVersion('17.0.0')).toBe(true);
expect(checkNxVersion('16.9.0')).toBe(false);
expect(checkNxVersion('17.0.0')).toBe(false);
expect(checkNxVersion('18.0.0')).toBe(true);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { getRequiredVersionOfNx } from './getRequiredVersionOfNx';
describe('getRequiredVersionOfNx', () => {
it('should get required of Nx', () => {
const version = getRequiredVersionOfNx();
expect(version).toBe('16.9.0');
expect(version).toBe('18.0.0');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('assertIsTargetName', () => {
});

it('should throw an error for an invalid target name', () => {
expect(() => assertIsTargetName('invalidTargetName')).toThrowError(
'invalidTargetName is not a valid target',
expect(() => assertIsTargetName('invalidTargetName')).toThrow(
Error('invalidTargetName is not a valid target'),
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

describe('CMAKE_TARGET_NAME', () => {
it('should have the correct value', () => {
expect(CMAKE_TARGET_NAME).toBe('cmake');
expect(CMAKE_TARGET_NAME).toBe('nx-cmake:cmake');
});
});

Expand All @@ -15,7 +15,7 @@ describe('getCmakeTargetDefault', () => {

beforeEach(() => {
expectedConfiguration = {
dependsOn: ['^cmake'],
dependsOn: ['^nx-cmake:cmake'],
inputs: ['cmake'],
};
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const CMAKE_TARGET_NAME = 'cmake';
import { PLUGIN_NAME } from '../../name';

export const CMAKE_TARGET_NAME = `${PLUGIN_NAME}:cmake`;

export type CmakeTargetName = typeof CMAKE_TARGET_NAME;

Expand All @@ -9,7 +11,7 @@ export type CmakeTargetConfiguration = {

export const getCmakeTargetDefault = (): CmakeTargetConfiguration => {
const cmakeTargetDefault: CmakeTargetConfiguration = {
dependsOn: ['^cmake'],
dependsOn: ['^nx-cmake:cmake'],
inputs: ['cmake'],
};
return cmakeTargetDefault;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

describe('COMPILE_TARGET_NAME', () => {
it('should have the correct value', () => {
expect(COMPILE_TARGET_NAME).toBe('compile');
expect(COMPILE_TARGET_NAME).toBe('nx-cmake:compile');
});
});

Expand All @@ -15,7 +15,11 @@ describe('getCompileTargetDefault', () => {

beforeEach(() => {
expectedConfiguration = {
dependsOn: ['^cmake', '^compile', 'cmake'],
dependsOn: [
'^nx-cmake:cmake',
'^nx-cmake:compile',
'nx-cmake:cmake',
],
inputs: ['default'],
};
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PLUGIN_NAME } from '../../name';
import { CmakeTargetName } from '../getCmakeTargetDefault/getCmakeTargetDefault';

export const COMPILE_TARGET_NAME = 'compile';
export const COMPILE_TARGET_NAME = `${PLUGIN_NAME}:compile`;

export type CompileTargetName = typeof COMPILE_TARGET_NAME;

Expand All @@ -15,7 +16,7 @@ export type CompileTargetConfiguration = {

export const getCompileTargetDefault = (): CompileTargetConfiguration => {
const compileTargetDefault: CompileTargetConfiguration = {
dependsOn: ['^cmake', '^compile', 'cmake'],
dependsOn: ['^nx-cmake:cmake', '^nx-cmake:compile', 'nx-cmake:cmake'],
inputs: ['default'],
};
return compileTargetDefault;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

describe('DEBUG_TARGET_NAME', () => {
it('should have the correct value', () => {
expect(DEBUG_TARGET_NAME).toBe('debug');
expect(DEBUG_TARGET_NAME).toBe('nx-cmake:debug');
});
});

Expand All @@ -15,7 +15,7 @@ describe('getDebugTargetDefault', () => {

beforeEach(() => {
expectedConfiguration = {
dependsOn: ['compile'],
dependsOn: ['nx-cmake:compile'],
inputs: ['default'],
};
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PLUGIN_NAME } from '../../name';
import { CompileTargetName } from '../getCompileTargetDefault/getCompileTargetDefault';

export const DEBUG_TARGET_NAME = 'debug';
export const DEBUG_TARGET_NAME = `${PLUGIN_NAME}:debug`;

export type DebugTargetName = typeof DEBUG_TARGET_NAME;

Expand All @@ -11,7 +12,7 @@ export type DebugTargetConfiguration = {

export const getDebugTargetDefault = (): DebugTargetConfiguration => {
const debugTargetDefault: DebugTargetConfiguration = {
dependsOn: ['compile'],
dependsOn: ['nx-cmake:compile'],
inputs: ['default'],
};
return debugTargetDefault;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

describe('EXECUTE_TARGET_NAME', () => {
it('should have the correct value', () => {
expect(EXECUTE_TARGET_NAME).toBe('execute');
expect(EXECUTE_TARGET_NAME).toBe('nx-cmake:execute');
});
});

Expand All @@ -15,7 +15,7 @@ describe('getExecuteTargetDefault', () => {

beforeEach(() => {
expectedConfiguration = {
dependsOn: ['compile'],
dependsOn: ['nx-cmake:compile'],
inputs: ['default'],
};
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PLUGIN_NAME } from '../../name';
import { CompileTargetName } from '../getCompileTargetDefault/getCompileTargetDefault';

export const EXECUTE_TARGET_NAME = 'execute';
export const EXECUTE_TARGET_NAME = `${PLUGIN_NAME}:execute`;

export type ExecuteTargetName = typeof EXECUTE_TARGET_NAME;

Expand All @@ -11,7 +12,7 @@ export type ExecuteTargetConfiguration = {

export const getExecuteTargetDefault = (): ExecuteTargetConfiguration => {
const executeTargetDefault: ExecuteTargetConfiguration = {
dependsOn: ['compile'],
dependsOn: ['nx-cmake:compile'],
inputs: ['default'],
};
return executeTargetDefault;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

describe('FMT_TARGET_NAME', () => {
it('should have the correct value', () => {
expect(FMT_TARGET_NAME).toBe('fmt');
expect(FMT_TARGET_NAME).toBe('nx-cmake:fmt');
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const FMT_TARGET_NAME = 'fmt';
import { PLUGIN_NAME } from '../../name';

export const FMT_TARGET_NAME = `${PLUGIN_NAME}:fmt`;

export type FmtTargetName = typeof FMT_TARGET_NAME;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

describe('LINT_TARGET_NAME', () => {
it('should have the correct value', () => {
expect(LINT_TARGET_NAME).toBe('lint');
expect(LINT_TARGET_NAME).toBe('nx-cmake:lint');
});
});

Expand All @@ -15,7 +15,7 @@ describe('getLintTargetDefault', () => {

beforeEach(() => {
expectedConfiguration = {
dependsOn: ['cmake'],
dependsOn: ['nx-cmake:cmake'],
inputs: ['clangTidy'],
};
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PLUGIN_NAME } from '../../name';
import { CmakeTargetName } from '../getCmakeTargetDefault/getCmakeTargetDefault';

export const LINT_TARGET_NAME = 'lint';
export const LINT_TARGET_NAME = `${PLUGIN_NAME}:lint`;

export type LintTargetName = typeof LINT_TARGET_NAME;

Expand All @@ -11,7 +12,7 @@ export type LintTargetConfiguration = {

export const getLintTargetDefault = (): LintTargetConfiguration => {
const lintTargetDefault: LintTargetConfiguration = {
dependsOn: ['cmake'],
dependsOn: ['nx-cmake:cmake'],
inputs: ['clangTidy'],
};
return lintTargetDefault;
Expand Down
Loading