Skip to content

Commit

Permalink
fix(utils): should be able to find csproj files that start with dot (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored Dec 19, 2022
1 parent c08fe70 commit 253971c
Show file tree
Hide file tree
Showing 19 changed files with 963 additions and 307 deletions.
3 changes: 2 additions & 1 deletion e2e/nxdoc-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
}
},
"tags": [],
"implicitDependencies": ["nxdoc"]
"implicitDependencies": ["nxdoc"],
"name": "nxdoc-e2e"
}
49 changes: 30 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,30 @@
"yargs-parser": "^21.0.0"
},
"devDependencies": {
"@babel/preset-react": "^7.14.5",
"@commitlint/cli": "^16.2.1",
"@commitlint/config-conventional": "^17.1.0",
"@commitlint/types": "^16.2.1",
"@nrwl/cypress": "15.0.1",
"@nrwl/devkit": "15.0.1",
"@nrwl/eslint-plugin-nx": "15.0.1",
"@nrwl/jest": "15.0.1",
"@nrwl/js": "15.0.1",
"@nrwl/linter": "15.0.1",
"@nrwl/node": "15.0.1",
"@nrwl/nx-cloud": "15.0.0",
"@nrwl/nx-plugin": "15.0.1",
"@nrwl/react": "15.0.1",
"@nrwl/web": "15.0.1",
"@nrwl/workspace": "15.0.1",
"@nx-plus/docusaurus": "14.0.0",
"@nrwl/cypress": "15.3.3",
"@nrwl/devkit": "15.3.3",
"@nrwl/eslint-plugin-nx": "15.3.3",
"@nrwl/jest": "15.3.3",
"@nrwl/js": "15.3.3",
"@nrwl/linter": "15.3.3",
"@nrwl/node": "15.3.3",
"@nrwl/nx-cloud": "15.0.2",
"@nrwl/nx-plugin": "15.3.3",
"@nrwl/react": "15.3.3",
"@nrwl/web": "15.3.3",
"@nrwl/workspace": "15.3.3",
"@nx-plus/docusaurus": "15.0.0-rc.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"@svgr/webpack": "^6.1.2",
"@swc-node/register": "^1.4.2",
"@swc/cli": "~0.1.55",
"@swc/core": "^1.2.173",
Expand All @@ -71,24 +74,25 @@
"@types/inquirer": "^8.1.3",
"@types/is-ci": "^3.0.0",
"@types/jest": "28.1.8",
"@types/node": "18.7.18",
"@types/node": "18.11.9",
"@types/node-fetch": "^2.6.2",
"@types/react": "18.0.20",
"@types/react-dom": "18.0.6",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@types/rimraf": "^3.0.2",
"@types/semver": "^7.3.9",
"@types/tmp": "^0.2.3",
"@types/yargs-parser": "^20.2.1",
"@typescript-eslint/eslint-plugin": "5.40.0",
"@typescript-eslint/parser": "5.40.0",
"babel-jest": "28.1.3",
"css-loader": "^6.4.0",
"cypress": "^9.1.0",
"dotenv": "^16.0.1",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-react": "7.31.8",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"fs-extra": "^10.1.0",
"husky": "^8.0.1",
Expand All @@ -98,17 +102,24 @@
"kill-port": "^1.6.1",
"lint-staged": "^13.0.3",
"node-fetch": "2.6.6",
"nx": "15.0.1",
"nx": "15.3.3",
"openapi-types": "^11.0.1",
"prettier": "2.7.1",
"react-refresh": "^0.10.0",
"react-test-renderer": "18.2.0",
"run-p": "*",
"semantic-release": "^19.0.5",
"style-loader": "^3.3.0",
"stylus": "^0.55.0",
"stylus-loader": "^7.1.0",
"ts-jest": "28.0.8",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"typescript": "4.8.4",
"verdaccio": "^5.15.2"
"url-loader": "^4.1.1",
"verdaccio": "^5.15.2",
"webpack": "^5.75.0",
"webpack-merge": "^5.8.0"
},
"lint-staged": {
"**/*.{js,ts,md,json}": [
Expand Down
9 changes: 6 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
},
"dependencies": {},
"peerDependencies": {
"@nrwl/devkit": ">13.4.0-beta.1",
"@nrwl/workspace": ">13.4.0-beta.1",
"@nrwl/tao": ">13.4.0-beta.1"
"@nrwl/devkit": ">14.0.0-beta.1",
"@nrwl/workspace": ">14.0.0-beta.1",
"nx": ">14.0.0-beta.1"
},
"devDependencies": {
"@nrwl/cli": "*"
},
"homepage": "https://nx-dotnet.com/docs/core",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generators/app/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('nx-dotnet app generator', () => {
};

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
dotnetClient = new DotNetClient(mockDotnetFactory());
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('import-projects generator', () => {
let dotnetClient: DotNetClient;

beforeEach(() => {
tree = createTreeWithEmptyWorkspace();
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
dotnetClient = new DotNetClient(mockDotnetFactory());
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generators/init/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('init generator', () => {
let dotnetClient: DotNetClient;

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
dotnetClient = new DotNetClient(mockDotnetFactory());

const packageJson = { scripts: {} };
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generators/lib/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('nx-dotnet library generator', () => {
};

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
dotnetClient = new DotNetClient(mockDotnetFactory());
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('nuget-reference generator', () => {
let dotnetClient: DotNetClient;

beforeEach(() => {
tree = createTreeWithEmptyWorkspace();
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
tree.write(
'workspace.json',
JSON.stringify({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('nx-dotnet project reference', () => {
});

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });

// setup fake projects to test linking.
addProjectConfiguration(appTree, appId, {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generators/restore/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('restore generator', () => {
let appTree: Tree;

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
updateConfig(appTree, { nugetPackages: {} });

(prompt as jest.MockedFunction<typeof prompt>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('swagger-typescript generator', () => {
let tree: Tree;

beforeEach(() => {
tree = createTreeWithEmptyWorkspace();
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
libraryGenerator(tree, { name: 'generated-ts' });
tree.write('swagger.json', MOCK_SWAGGER_JSON);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generators/sync/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('sync generator', () => {
let appTree: Tree;

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
updateConfig(appTree, { nugetPackages: {} });

(prompt as jest.MockedFunction<typeof prompt>)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generators/test/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('nx-dotnet test generator', () => {
};

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
addProjectConfiguration(appTree, 'existing', {
root: 'apps/existing',
targets: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('nx-dotnet project generator', () => {
let options: NxDotnetProjectGeneratorSchema;

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
dotnetClient = new DotNetClient(mockDotnetFactory());

const packageJson = { scripts: {}, devDependencies: {} };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('nx-dotnet test project generator', () => {
let testProjectName: string;

beforeEach(async () => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
appTree.write('package.json', '{}');
await initGenerator(appTree, null, new DotNetClient(mockDotnetFactory()));
addProjectConfiguration(appTree, 'domain-existing-app', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('remove-output-option', () => {
let tree: Tree;

beforeEach(() => {
tree = createTreeWithEmptyWorkspace();
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
});

it('should not update projects where output != OutputPath', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tasks/check-module-boundaries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('load-module-boundaries', () => {
let appTree: Tree;

beforeEach(() => {
appTree = createTreeWithEmptyWorkspace();
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
});

afterEach(() => {
Expand Down
3 changes: 2 additions & 1 deletion packages/utils/src/lib/utility-functions/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { workspaceRoot } from '@nrwl/devkit';
import * as fg from 'fast-glob';
import { join } from 'path';

const globOptions = {
const globOptions: fg.Options = {
cwd: workspaceRoot,
ignore: ['**/bin/**', '**/obj/**'],
dot: true,
};

export function projPattern(path: string): string {
Expand Down
Loading

0 comments on commit 253971c

Please sign in to comment.