Skip to content

Commit

Permalink
Merge pull request #119 from srleecode/7.1.2
Browse files Browse the repository at this point in the history
chore: updated to 17.1.2
  • Loading branch information
srleecode authored Nov 19, 2023
2 parents a2926c5 + 7276ce0 commit 3c8cbed
Show file tree
Hide file tree
Showing 45 changed files with 5,780 additions and 5,336 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout [master]
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'master'
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 'latest'
- run: npm ci
- run: npx nx-cloud start-ci-run
- run: npm run build
Expand All @@ -36,17 +36,17 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request_target.head.ref }}
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'master'
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 'latest'
- run: npm ci
- run: npx nx-cloud start-ci-run
- run: npm run build
Expand All @@ -62,10 +62,10 @@ jobs:
matrix:
agent: [1, 2, 3]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 'latest'
- run: npm ci
- name: Start Nx Agent ${{ matrix.agent }}
run: npx nx-cloud start-agent
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"singleQuote": true
}
}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ Grouping folders:
- domainGroupingFolder
- creates a domain grouping folder
- sets up the eslint rules for that domain
- moveGroupingFolder
- moves a grouping folder to another location. It also moves all of the libraries under the grouping folder
- removeGroupingFolder
- removes a grouping folder. It also removes all of the libraries under the grouping folder

Expand Down
35 changes: 0 additions & 35 deletions e2e.js

This file was deleted.

25 changes: 25 additions & 0 deletions e2e.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { execSync } from 'child_process';
import { rimrafSync } from 'rimraf';

const getNormalisedPath = (path) =>
path.replace(/\\/g, '/').replace(/\/\//g, '/');

const e2eProjects = [
'e2e-domain-cypress-domain-test',
'e2e-domain-front-end-angular',
'e2e-domain-grouping-folder',
'e2e-domain-mock-file',
];

const cleanUp = () =>
rimrafSync(getNormalisedPath(`${process.cwd()}/tmp/nx-e2e/proj`));

for (const project of e2eProjects) {
console.log('Cleaning temp project');
cleanUp();
execSync(`npx nx e2e ${project} --skip-nx-cache`, {
stdio: 'inherit',
});
}
console.log('Cleaning temp project');
cleanUp();
1 change: 0 additions & 1 deletion e2e/domain/front-end/angular/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
preset: '../../../../jest.preset.js',
testSequencer: './test-sequencer.js',
setupFilesAfterEnv: ['./jest.setup.ts'],
maxWorkers: 1,
};
5 changes: 3 additions & 2 deletions e2e/domain/front-end/angular/src/component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ describe('component', () => {

it('should create feature component library', async () => {
await runNxCommandAsync(
`generate @srleecode/domain:ngComponent --groupingFolder ${groupingFolder} --type feature --name test-example`
);
`generate @srleecode/domain:ngComponent --groupingFolder ${groupingFolder} --type feature --name test-example`,
{ silenceError: true }
).then((rsp) => console.log(rsp));
checkFilesExist(
`${groupingFolder}/presentation/src/lib/feature/test-example/test-example.component.ts`
);
Expand Down
13 changes: 0 additions & 13 deletions e2e/domain/front-end/angular/src/data-access-layer.spec.ts

This file was deleted.

24 changes: 0 additions & 24 deletions e2e/domain/front-end/angular/test-sequencer.js

This file was deleted.

1 change: 0 additions & 1 deletion e2e/domain/grouping-folder/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
preset: '../../../jest.preset.js',
testSequencer: './test-sequencer.js',
setupFilesAfterEnv: ['./jest.setup.ts'],
maxWorkers: 1,
};
53 changes: 0 additions & 53 deletions e2e/domain/grouping-folder/src/move.spec.ts

This file was deleted.

32 changes: 9 additions & 23 deletions e2e/domain/grouping-folder/src/remove.spec.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
import { fileExists, readJson, runNxCommandAsync } from '@nx/plugin/testing';
import {
checkFilesExist,
fileExists,
readJson,
runNxCommandAsync,
} from '@nx/plugin/testing';

describe('remove', () => {
const groupingFolder = 'libs/ng-test-app/new-domain';
beforeAll(async () => {

it('should remove domain grouping folder and project references', async () => {
await runNxCommandAsync(
`generate @srleecode/domain:removeGroupingFolder --groupingFolder ${groupingFolder}`,
{ silenceError: true }
{ silenceError: true },
).then((rsp) => console.log(rsp));
}, 240000);

it('should remove domain grouping folder', async () => {
expect(fileExists(`${groupingFolder}/util/src/index.ts`)).toBe(false);
});

it('should remove project references', async () => {
const eslint = readJson('.eslintrc.json');
const depConstraints =
eslint.overrides[0].rules['@nx/enforce-module-boundaries'][1]
.depConstraints;
expect(JSON.stringify(depConstraints)).not.toMatch(
'scope:ng-test-app-new-domain'
);
const tsConfig = readJson('tsconfig.base.json');
const tsConfigPaths = Object.keys(tsConfig.compilerOptions.paths);
expect(tsConfigPaths).not.toContainEqual(
'@proj/ng-test-app/new-domain/util'
);
expect(tsConfigPaths).not.toContainEqual(
'@proj/ng-test-app/new-domain/util/testing'
);
});
});
21 changes: 0 additions & 21 deletions e2e/domain/grouping-folder/test-sequencer.js

This file was deleted.

1 change: 0 additions & 1 deletion e2e/domain/mock-file/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
preset: '../../../jest.preset.js',
testSequencer: './test-sequencer.js',
setupFilesAfterEnv: ['./jest.setup.ts'],
maxWorkers: 1,
};
18 changes: 0 additions & 18 deletions e2e/domain/mock-file/test-sequencer.js

This file was deleted.

Loading

0 comments on commit 3c8cbed

Please sign in to comment.