Skip to content

Commit

Permalink
Merge pull request #216 from benpsnyder/task/update-nx-13.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachJW34 authored Mar 26, 2022
2 parents 6bcf7d3 + d8c46e3 commit 9d7a7cb
Show file tree
Hide file tree
Showing 250 changed files with 12,437 additions and 11,338 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orbs:
jobs:
all:
docker:
- image: cypress/base:14.17.3
- image: cypress/base:16.14.0
steps:
- checkout
- node/install-packages:
Expand All @@ -17,7 +17,7 @@ jobs:
no_output_timeout: 40m
affected:
docker:
- image: cypress/base:14.17.3
- image: cypress/base:16.14.0
steps:
- checkout
- node/install-packages:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/out-tsc

# dependencies
/node_modules
node_modules

# IDEs and editors
/.idea
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint-staged
16 changes: 16 additions & 0 deletions apps/docusaurus-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"projectType": "application",
"root": "apps/docusaurus-e2e",
"sourceRoot": "apps/docusaurus-e2e/src",
"targets": {
"e2e": {
"executor": "@nrwl/nx-plugin:e2e",
"options": {
"target": "docusaurus:build",
"jestConfig": "apps/docusaurus-e2e/jest.config.js"
}
}
},
"tags": [],
"implicitDependencies": ["docusaurus"]
}
16 changes: 16 additions & 0 deletions apps/nuxt-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"projectType": "application",
"root": "apps/nuxt-e2e",
"sourceRoot": "apps/nuxt-e2e/src",
"targets": {
"e2e": {
"executor": "@nrwl/nx-plugin:e2e",
"options": {
"target": "nuxt:build",
"jestConfig": "apps/nuxt-e2e/jest.config.js"
}
}
},
"tags": [],
"implicitDependencies": ["nuxt"]
}
12 changes: 4 additions & 8 deletions apps/nuxt-e2e/tests/nuxt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('nuxt e2e', () => {
Snapshots: 0 total
`);

const e2eResult = await runNxCommandAsync(`e2e ${appName}-e2e --headless`);
const e2eResult = await runNxCommandAsync(`e2e ${appName}-e2e`);
expect(e2eResult.stdout).toContain('All specs passed!');

await runNxCommandAsync(`build ${appName}`);
Expand All @@ -52,9 +52,7 @@ describe('nuxt e2e', () => {
)
).not.toThrow();

const prodE2eResult = await runNxCommandAsync(
`e2e ${appName}-e2e --prod --headless`
);
const prodE2eResult = await runNxCommandAsync(`e2e ${appName}-e2e --prod`);
expect(prodE2eResult.stdout).toContain('All specs passed!');
}, 300000);

Expand Down Expand Up @@ -84,8 +82,7 @@ describe('nuxt e2e', () => {
`dist/apps/${appName}/dist/.nojekyll`,
`dist/apps/${appName}/dist/200.html`,
`dist/apps/${appName}/dist/favicon.ico`,
`dist/apps/${appName}/dist/index.html`,
`dist/apps/${appName}/dist/README.md`
`dist/apps/${appName}/dist/index.html`
)
).not.toThrow();
}, 300000);
Expand Down Expand Up @@ -134,8 +131,7 @@ describe('nuxt e2e', () => {
`dist/apps/subdir/${appName}/dist/.nojekyll`,
`dist/apps/subdir/${appName}/dist/200.html`,
`dist/apps/subdir/${appName}/dist/favicon.ico`,
`dist/apps/subdir/${appName}/dist/index.html`,
`dist/apps/subdir/${appName}/dist/README.md`
`dist/apps/subdir/${appName}/dist/index.html`
)
).not.toThrow();
}, 300000);
Expand Down
16 changes: 16 additions & 0 deletions apps/vite-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"projectType": "application",
"root": "apps/vite-e2e",
"sourceRoot": "apps/vite-e2e/src",
"targets": {
"e2e": {
"executor": "@nrwl/nx-plugin:e2e",
"options": {
"target": "vite:build",
"jestConfig": "apps/vite-e2e/jest.config.js"
}
}
},
"tags": [],
"implicitDependencies": ["vite"]
}
12 changes: 5 additions & 7 deletions apps/vite-e2e/tests/vite.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,18 @@ describe('vite e2e', () => {
`);

disableHashing(appName);
const buildResult = await runNxCommandAsync(`build ${appName}`);
await runNxCommandAsync(`build ${appName}`);
checkFilesExist(
`dist/apps/${appName}/index.html`,
`dist/apps/${appName}/assets/index.css`,
`dist/apps/${appName}/assets/index.js`,
`dist/apps/${appName}/assets/vendor.js`
`dist/apps/${appName}/assets/vendor.js`,
`dist/apps/${appName}/assets/logo.png`
);
// Cannot disable hashing for assets
// see: https://github.com/vitejs/vite/issues/2944
expect(buildResult.stdout).toContain(`dist/apps/${appName}/assets/logo`);

const e2eResult = await runNxCommandAsync(`e2e ${appName}-e2e --headless`);
const e2eResult = await runNxCommandAsync(`e2e ${appName}-e2e`);
expect(e2eResult.stdout).toContain('All specs passed!');
}, 100000);
}, 200000);
});

function disableHashing(app: string, directory: string = '') {
Expand Down
16 changes: 16 additions & 0 deletions apps/vue-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"projectType": "application",
"root": "apps/vue-e2e",
"sourceRoot": "apps/vue-e2e/src",
"targets": {
"e2e": {
"executor": "@nrwl/nx-plugin:e2e",
"options": {
"target": "vue:build",
"jestConfig": "apps/vue-e2e/jest.config.js"
}
}
},
"tags": [],
"implicitDependencies": ["vue"]
}
2 changes: 1 addition & 1 deletion apps/vue-e2e/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function testGeneratedApp(
}

if (options.e2e) {
const e2eResult = await runNxCommandAsync(`e2e ${appName}-e2e --headless`);
const e2eResult = await runNxCommandAsync(`e2e ${appName}-e2e`);
expect(e2eResult.stdout).toContain('All specs passed!');
}

Expand Down
38 changes: 19 additions & 19 deletions apps/vue-e2e/tests/vue-2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@nrwl/nx-plugin/testing';
import { runNxProdCommandAsync, testGeneratedApp } from './utils';

describe.skip('vue 2 e2e', () => {
describe('vue 2 e2e', () => {
describe('app', () => {
beforeAll(() => {
ensureNxProject('@nx-plus/vue', 'dist/libs/vue');
Expand Down Expand Up @@ -200,12 +200,12 @@ describe.skip('vue 2 e2e', () => {
expect(() =>
checkFilesExist(
`dist/libs/${lib}/demo.html`,
`dist/libs/${lib}/${lib}.common.js`,
`dist/libs/${lib}/${lib}.common.js.map`,
`dist/libs/${lib}/${lib}.umd.js`,
`dist/libs/${lib}/${lib}.umd.js.map`,
`dist/libs/${lib}/${lib}.umd.min.js`,
`dist/libs/${lib}/${lib}.umd.min.js.map`,
`dist/libs/${lib}/build.common.js`,
`dist/libs/${lib}/build.common.js.map`,
`dist/libs/${lib}/build.umd.js`,
`dist/libs/${lib}/build.umd.js.map`,
`dist/libs/${lib}/build.umd.min.js`,
`dist/libs/${lib}/build.umd.min.js.map`,
`dist/libs/${lib}/package.json`,
`dist/libs/${lib}/README.md`
)
Expand All @@ -228,16 +228,16 @@ describe.skip('vue 2 e2e', () => {
);
expect(() =>
checkFilesExist(
`dist/libs/${lib}/${lib}.common.js`,
`dist/libs/${lib}/${lib}.common.js.map`
`dist/libs/${lib}/build.common.js`,
`dist/libs/${lib}/build.common.js.map`
)
).not.toThrow();
expect(() =>
checkFilesExist(
`dist/libs/${lib}/${lib}.umd.js`,
`dist/libs/${lib}/${lib}.umd.js.map`,
`dist/libs/${lib}/${lib}.umd.min.js`,
`dist/libs/${lib}/${lib}.umd.min.js.map`
`dist/libs/${lib}/build.umd.js`,
`dist/libs/${lib}/build.umd.js.map`,
`dist/libs/${lib}/build.umd.min.js`,
`dist/libs/${lib}/build.umd.min.js.map`
)
).toThrow();
}, 300000);
Expand All @@ -255,12 +255,12 @@ describe.skip('vue 2 e2e', () => {
expect(() =>
checkFilesExist(
`dist/libs/subdir/${lib}/demo.html`,
`dist/libs/subdir/${lib}/subdir-${lib}.common.js`,
`dist/libs/subdir/${lib}/subdir-${lib}.common.js.map`,
`dist/libs/subdir/${lib}/subdir-${lib}.umd.js`,
`dist/libs/subdir/${lib}/subdir-${lib}.umd.js.map`,
`dist/libs/subdir/${lib}/subdir-${lib}.umd.min.js`,
`dist/libs/subdir/${lib}/subdir-${lib}.umd.min.js.map`,
`dist/libs/subdir/${lib}/build.common.js`,
`dist/libs/subdir/${lib}/build.common.js.map`,
`dist/libs/subdir/${lib}/build.umd.js`,
`dist/libs/subdir/${lib}/build.umd.js.map`,
`dist/libs/subdir/${lib}/build.umd.min.js`,
`dist/libs/subdir/${lib}/build.umd.min.js.map`,
`dist/libs/subdir/${lib}/package.json`
)
).not.toThrow();
Expand Down
24 changes: 12 additions & 12 deletions apps/vue-e2e/tests/vue-3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ describe('vue 3 e2e', () => {
expect(() =>
checkFilesExist(
`dist/libs/${lib}/demo.html`,
`dist/libs/${lib}/${lib}.common.js`,
`dist/libs/${lib}/${lib}.common.js.map`,
`dist/libs/${lib}/${lib}.umd.js`,
`dist/libs/${lib}/${lib}.umd.js.map`,
`dist/libs/${lib}/${lib}.umd.min.js`,
`dist/libs/${lib}/${lib}.umd.min.js.map`,
`dist/libs/${lib}/build.common.js`,
`dist/libs/${lib}/build.common.js.map`,
`dist/libs/${lib}/build.umd.js`,
`dist/libs/${lib}/build.umd.js.map`,
`dist/libs/${lib}/build.umd.min.js`,
`dist/libs/${lib}/build.umd.min.js.map`,
`dist/libs/${lib}/package.json`,
`dist/libs/${lib}/README.md`
)
Expand All @@ -188,16 +188,16 @@ describe('vue 3 e2e', () => {
);
expect(() =>
checkFilesExist(
`dist/libs/${lib}/${lib}.common.js`,
`dist/libs/${lib}/${lib}.common.js.map`
`dist/libs/${lib}/build.common.js`,
`dist/libs/${lib}/build.common.js.map`
)
).not.toThrow();
expect(() =>
checkFilesExist(
`dist/libs/${lib}/${lib}.umd.js`,
`dist/libs/${lib}/${lib}.umd.js.map`,
`dist/libs/${lib}/${lib}.umd.min.js`,
`dist/libs/${lib}/${lib}.umd.min.js.map`
`dist/libs/${lib}/build.umd.js`,
`dist/libs/${lib}/build.umd.js.map`,
`dist/libs/${lib}/build.umd.min.js`,
`dist/libs/${lib}/build.umd.min.js.map`
)
).toThrow();
}, 300000);
Expand Down
2 changes: 1 addition & 1 deletion libs/docusaurus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
If you have not already, [create an Nx workspace](https://github.com/nrwl/nx#creating-an-nx-workspace) with the following:

```
npx create-nx-workspace@^12.0.0
npx create-nx-workspace@^13.0.0
```

## Getting Started
Expand Down
15 changes: 0 additions & 15 deletions libs/docusaurus/builders.json

This file was deleted.

12 changes: 0 additions & 12 deletions libs/docusaurus/collection.json

This file was deleted.

27 changes: 27 additions & 0 deletions libs/docusaurus/executors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/schema",
"executors": {
"browser": {
"implementation": "./src/executors/browser/executor",
"schema": "./src/executors/browser/schema.json",
"description": "browser executor"
},
"dev-server": {
"implementation": "./src/executors/dev-server/executor",
"schema": "./src/executors/dev-server/schema.json",
"description": "serve executor"
}
},
"builders": {
"build": {
"implementation": "./src/executors/browser/compat",
"schema": "./src/executors/browser/schema.json",
"description": "browser builder"
},
"dev-server": {
"implementation": "./src/executors/dev-server/compat",
"schema": "./src/executors/dev-server/schema.json",
"description": "dev-server builder"
}
}
}
21 changes: 21 additions & 0 deletions libs/docusaurus/generators.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/schema",
"name": "docusaurus",
"version": "0.0.1",
"generators": {
"application": {
"factory": "./src/generators/application/generator#applicationGenerator",
"schema": "./src/generators/application/schema.json",
"description": "application generator",
"aliases": ["app"]
}
},
"schematics": {
"application": {
"factory": "./src/generators/application/generator#applicationSchematic",
"schema": "./src/generators/application/schema.json",
"description": "application schematic",
"aliases": ["app"]
}
}
}
Loading

0 comments on commit 9d7a7cb

Please sign in to comment.