@nx/docker 22.1.0-rc.3 → 22.1.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/docker",
3
3
  "description": "The Nx Plugin for Docker to aid in containerizing projects.",
4
- "version": "22.1.0-rc.3",
4
+ "version": "22.1.0-rc.5",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -51,12 +51,12 @@
51
51
  "executors": "./executors.json",
52
52
  "generators": "./generators.json",
53
53
  "dependencies": {
54
- "@nx/devkit": "22.1.0-rc.3",
54
+ "@nx/devkit": "22.1.0-rc.5",
55
55
  "enquirer": "~2.3.6",
56
56
  "tslib": "^2.3.0"
57
57
  },
58
58
  "devDependencies": {
59
- "nx": "22.1.0-rc.3"
59
+ "nx": "22.1.0-rc.5"
60
60
  },
61
61
  "types": "./src/index.d.ts"
62
62
  }
@@ -5,6 +5,17 @@ export interface DockerTargetOptions {
5
5
  env?: Record<string, string>;
6
6
  envFile?: string;
7
7
  cwd?: string;
8
+ /**
9
+ * Skip adding the default `--tag` argument to the Docker build command.
10
+ * When set to `true`, you must provide your own tag via the `args` property.
11
+ *
12
+ * **Important:** Setting this to `true` opts out of Nx Release support for this project.
13
+ * The automatic versioning and publishing features of `nx release` will not work
14
+ * with Docker projects that have `skipDefaultTag` enabled.
15
+ *
16
+ * @default false
17
+ */
18
+ skipDefaultTag?: boolean;
8
19
  configurations?: Record<string, Omit<DockerTargetOptions, 'configurations' | 'name'>>;
9
20
  }
10
21
  export interface DockerPluginOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/docker/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAQnB,MAAM,YAAY,CAAC;AAUpB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM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AS,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;CAC1C;AAsBD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAmC5D,CAAC;AAmDF,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,MAAM,CAOR"}
@@ -99,8 +99,13 @@ function buildTargetOptions(interpolatedTarget, projectRoot, imageRef, isRunTarg
99
99
  }
100
100
  }
101
101
  else {
102
- // Build target always includes --tag default
103
- options.args = [`--tag ${imageRef}`, ...(interpolatedTarget.args ?? [])];
102
+ // Build target includes --tag default unless skipDefaultTag is true
103
+ if (interpolatedTarget.skipDefaultTag) {
104
+ options.args = interpolatedTarget.args ?? [];
105
+ }
106
+ else {
107
+ options.args = [`--tag ${imageRef}`, ...(interpolatedTarget.args ?? [])];
108
+ }
104
109
  }
105
110
  if (interpolatedTarget.env) {
106
111
  options.env = interpolatedTarget.env;
@@ -117,7 +122,12 @@ function buildTargetConfigurations(interpolatedTarget, projectRoot, imageRef, is
117
122
  const configurations = {};
118
123
  for (const [configName, configOptions] of Object.entries(interpolatedTarget.configurations)) {
119
124
  // Each configuration gets the full treatment with defaults
120
- configurations[configName] = buildTargetOptions({ ...configOptions, name: interpolatedTarget.name }, projectRoot, imageRef, isRunTarget);
125
+ // Inherit skipDefaultTag from parent if not explicitly set in config
126
+ configurations[configName] = buildTargetOptions({
127
+ ...configOptions,
128
+ name: interpolatedTarget.name,
129
+ skipDefaultTag: configOptions.skipDefaultTag ?? interpolatedTarget.skipDefaultTag,
130
+ }, projectRoot, imageRef, isRunTarget);
121
131
  }
122
132
  return configurations;
123
133
  }
package/README.md DELETED
@@ -1,70 +0,0 @@
1
- <p style="text-align: center;">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Repos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
- </picture>
6
- </p>
7
-
8
- <div style="text-align: center;">
9
-
10
- [![CircleCI](https://circleci.com/gh/nrwl/nx.svg?style=svg)](https://circleci.com/gh/nrwl/nx)
11
- [![License](https://img.shields.io/npm/l/@nx/workspace.svg?style=flat-square)]()
12
- [![NPM Version](https://badge.fury.io/js/nx.svg)](https://www.npmjs.com/package/nx)
13
- [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
14
- [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
15
- [![Join the chat at https://gitter.im/nrwl-nx/community](https://badges.gitter.im/nrwl-nx/community.svg)](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
16
- [![Join us on the Official Nx Discord Server](https://img.shields.io/discord/1143497901675401286?label=discord)](https://go.nx.dev/community)
17
-
18
- </div>
19
-
20
-
21
- <hr>
22
-
23
- # Nx: Smart Repos · Fast Builds
24
-
25
- Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
26
-
27
- This package is a [Docker plugin for Nx](https://nx.dev/technologies/build-tools/docker/introduction).
28
-
29
- **Experimental**: Support for Docker is currently experimental. Breaking changes may occur and not adhere to semver versioning.
30
-
31
- ## Getting Started
32
-
33
- ### Creating an Nx Workspace
34
-
35
- **Using `npx`**
36
-
37
- ```bash
38
- npx create-nx-workspace
39
- ```
40
-
41
- **Using `npm init`**
42
-
43
- ```bash
44
- npm init nx-workspace
45
- ```
46
-
47
- **Using `yarn create`**
48
-
49
- ```bash
50
- yarn create nx-workspace
51
- ```
52
-
53
- ### Adding Nx to an Existing Repository
54
-
55
- Run:
56
-
57
- ```bash
58
- npx nx@latest init
59
- ```
60
-
61
- ## Documentation & Resources
62
-
63
- - [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
64
- - [Intro to Nx](https://nx.dev/getting-started/intro)
65
- - [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
66
- - [Blog Posts About Nx](https://nx.dev/blog)
67
-
68
- <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
69
- width="100%" alt="Nx - Smart Repos · Fast Builds"></a></p>
70
-