Skip to content

Commit

Permalink
Merge branch 'master' into docs/deprecate-workspace-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacplmann authored Oct 23, 2023
2 parents 251d282 + ac038e3 commit 973b433
Show file tree
Hide file tree
Showing 25 changed files with 2,413 additions and 981 deletions.
26 changes: 26 additions & 0 deletions docs/changelog/17_0_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Nx 17

## Features

{% cards cols="2" %}
{% card title="Official @nx/vue plugin" type="document" url="/nx-api/vue" /%}
{% card title="Module Federation Improvements" type="document" url="/concepts/module-federation/module-federation-and-nx" /%}
{% card title="Show Task Inputs in the Task Graph Visualizer" type="external" url="https://github.com/nrwl/nx/pull/19597" /%}
{% card title="Move properties from tasksRunnerOptions up to the root of nx.json" type="external" url="https://github.com/nrwl/nx/pull/19243" /%}
{% card title="Each task has its own cache property" type="document" url="/reference/project-configuration#cache" /%}
{% /cards %}

## Breaking Changes

Use [the `nx migrate` command](/core-features/automate-updating-dependencies) to automatically account for these breaking changes.

{% cards cols="2" %}
{% card title="Rename @nx/linter to @nx/eslint" type="document" url="/recipes/other/rescope#rename" /%}
{% card title="All generators use directory flag relative to the CWD" type="external" url="https://github.com/nrwl/nx/pull/19608" /%}
{% card title="Removed workspace generator command" type="external" url="https://github.com/nrwl/nx/pull/19541" /%}
{% card title="Removed workspace-lint command" type="external" url="https://github.com/nrwl/nx/pull/16212" /%}
{% card title="Removed defaultCollection property" type="external" url="https://github.com/nrwl/nx/pull/19708" /%}
{% card title="Removed npmScope property" type="external" url="https://github.com/nrwl/nx/pull/19708" /%}
{% card title="Removed ability for Angular CLI to use our generators and executors" type="external" url="https://github.com/nrwl/nx/pull/19557" /%}
{% card title="Removed exported code from @nrwl/workspace that has been moved elsewhere" type="external" url="https://github.com/nrwl/nx/pull/19588" /%}
{% /cards %}
22 changes: 5 additions & 17 deletions docs/generated/cli/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,6 @@ nx release changelog [version]

#### Options

##### createRelease

Type: `string`

Choices: [github]

Create a release for the given version on a supported source control service provider, such as Github.

##### file

Type: `string`

Default: `CHANGELOG.md`

The name of the file to write the changelog to. It can also be set to `false` to disable file generation. Defaults to CHANGELOG.md.

##### from

Type: `string`
Expand All @@ -139,7 +123,11 @@ Show help

##### interactive

Type: `boolean`
Type: `string`

Choices: [all, workspace, projects]

Interactively modify changelog markdown contents in your code editor before applying the changes. You can set it to be interactive for all changelogs, or only the workspace level, or only the project level

##### tagVersionPrefix

Expand Down
4 changes: 2 additions & 2 deletions docs/generated/devkit/FileChange.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Description of a file change in the Nx virtual file system/
- [content](../../devkit/documents/FileChange#content): Buffer
- [options](../../devkit/documents/FileChange#options): TreeWriteOptions
- [path](../../devkit/documents/FileChange#path): string
- [type](../../devkit/documents/FileChange#type): "CREATE" | "DELETE" | "UPDATE"
- [type](../../devkit/documents/FileChange#type): "DELETE" | "CREATE" | "UPDATE"

## Properties

Expand Down Expand Up @@ -39,6 +39,6 @@ Path relative to the workspace root

### type

**type**: `"CREATE"` \| `"DELETE"` \| `"UPDATE"`
**type**: `"DELETE"` \| `"CREATE"` \| `"UPDATE"`

Type of change: 'CREATE' | 'DELETE' | 'UPDATE'
22 changes: 5 additions & 17 deletions docs/generated/packages/nx/documents/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,6 @@ nx release changelog [version]

#### Options

##### createRelease

Type: `string`

Choices: [github]

Create a release for the given version on a supported source control service provider, such as Github.

##### file

Type: `string`

Default: `CHANGELOG.md`

The name of the file to write the changelog to. It can also be set to `false` to disable file generation. Defaults to CHANGELOG.md.

##### from

Type: `string`
Expand All @@ -139,7 +123,11 @@ Show help

##### interactive

Type: `boolean`
Type: `string`

Choices: [all, workspace, projects]

Interactively modify changelog markdown contents in your code editor before applying the changes. You can set it to be interactive for all changelogs, or only the workspace level, or only the project level

##### tagVersionPrefix

Expand Down
99 changes: 96 additions & 3 deletions e2e/release/src/release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ expect.addSnapshotSerializer({
.replaceAll(/\d*B package\.json/g, 'XXXB package.json')
.replaceAll(/size:\s*\d*\s?B/g, 'size: XXXB')
.replaceAll(/\d*\.\d*\s?kB/g, 'XXX.XXX kb')
.replaceAll(/[a-fA-F0-9]{7}/g, '{COMMIT_SHA}')
// We trim each line to reduce the chances of snapshot flakiness
.split('\n')
.map((r) => r.trim())
Expand Down Expand Up @@ -122,10 +123,10 @@ describe('nx release', () => {
const changelogOutput = runCLI(`release changelog 999.9.9`);
expect(changelogOutput).toMatchInlineSnapshot(`
> NX Generating a CHANGELOG.md entry for v999.9.9
> NX Generating an entry in CHANGELOG.md for v999.9.9
+ ## v999.9.9
+ ## 999.9.9
+
+
+ ### 🚀 Features
Expand All @@ -140,7 +141,7 @@ describe('nx release', () => {
`);

expect(readFile('CHANGELOG.md')).toMatchInlineSnapshot(`
## v999.9.9
## 999.9.9
### 🚀 Features
Expand Down Expand Up @@ -544,6 +545,98 @@ describe('nx release', () => {
.trim()
).toEqual('1000.0.0-next.0');

// Update custom nx release config to demonstrate project level changelogs
updateJson<NxJsonConfiguration>('nx.json', (nxJson) => {
nxJson.release = {
groups: {
default: {
// @proj/source will be added as a project by the verdaccio setup, but we aren't versioning or publishing it, so we exclude it here
projects: ['*', '!@proj/source'],
changelog: {
// This should be merged with and take priority over the projectChangelogs config at the root of the config
createRelease: 'github',
},
},
},
changelog: {
projectChangelogs: {
renderOptions: {
createRelease: false, // will be overridden by the group
// Customize the changelog renderer to not print the Thank You section this time (not overridden by the group)
includeAuthors: false,
},
},
},
};
return nxJson;
});

// We need a valid git origin for the command to work when createRelease is set
await runCommandAsync(
`git remote add origin https://github.com/nrwl/fake-repo.git`
);

// Perform a dry-run this time to show that it works but also prevent making any requests to github within the test
const changelogDryRunOutput = runCLI(
`release changelog 1000.0.0-next.0 --dry-run`
);
expect(changelogDryRunOutput).toMatchInlineSnapshot(`
> NX Previewing an entry in CHANGELOG.md for v1000.0.0-next.0
+ ## 1000.0.0-next.0
+
+
+ ### 🚀 Features
+
+ - an awesome new feature
+
+ ### ❤️ Thank You
+
+ - Test
+
## 999.9.9
> NX Previewing a Github release and an entry in {project-name}/CHANGELOG.md for {project-name}@v1000.0.0-next.0
+ ## 1000.0.0-next.0
+
+
+ ### 🚀 Features
+
+ - an awesome new feature ([{COMMIT_SHA}](https://github.com/nrwl/fake-repo/commit/{COMMIT_SHA}))
> NX Previewing a Github release and an entry in {project-name}/CHANGELOG.md for {project-name}@v1000.0.0-next.0
+ ## 1000.0.0-next.0
+
+
+ ### 🚀 Features
+
+ - an awesome new feature ([{COMMIT_SHA}](https://github.com/nrwl/fake-repo/commit/{COMMIT_SHA}))
> NX Previewing a Github release and an entry in {project-name}/CHANGELOG.md for {project-name}@v1000.0.0-next.0
+ ## 1000.0.0-next.0
+
+
+ ### 🚀 Features
+
+ - an awesome new feature ([{COMMIT_SHA}](https://github.com/nrwl/fake-repo/commit/{COMMIT_SHA}))
`);

// port and process cleanup
await killProcessAndPorts(process.pid, verdaccioPort);
}, 500000);
Expand Down
Loading

0 comments on commit 973b433

Please sign in to comment.