@mnci/nx-python-pip 0.1.10 → 0.1.12

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.
@@ -4,6 +4,14 @@
4
4
  * @remarks
5
5
  * Python identifiers cannot contain hyphens, so `my-svc` becomes `my_svc`.
6
6
  *
7
+ * Dots are mapped the same way, and that is not cosmetic: a dot is Python's
8
+ * **package separator**, so leaving `my.svc` alone would name a submodule `svc`
9
+ * of a package `my` that does not exist — producing a wrong
10
+ * `[tool.hatch.build.targets.wheel] packages` entry and an unimportable wheel.
11
+ * Unlike the Dart side, where pub rejects the name outright and fails loudly,
12
+ * this one would fail quietly, which is why it is handled here rather than left
13
+ * to the caller.
14
+ *
7
15
  * @param name - The Nx project name.
8
16
  * @returns The module directory's basename (e.g. `my_svc`).
9
17
  * @throws Never - pure string mapping.
@@ -1 +1 @@
1
- {"version":3,"file":"pythonProject.d.ts","sourceRoot":"","sources":["../../src/internal/pythonProject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAkBjF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAOhE"}
1
+ {"version":3,"file":"pythonProject.d.ts","sourceRoot":"","sources":["../../src/internal/pythonProject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAkBjF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAOhE"}
@@ -10,13 +10,21 @@ exports.pythonSampleTest = pythonSampleTest;
10
10
  * @remarks
11
11
  * Python identifiers cannot contain hyphens, so `my-svc` becomes `my_svc`.
12
12
  *
13
+ * Dots are mapped the same way, and that is not cosmetic: a dot is Python's
14
+ * **package separator**, so leaving `my.svc` alone would name a submodule `svc`
15
+ * of a package `my` that does not exist — producing a wrong
16
+ * `[tool.hatch.build.targets.wheel] packages` entry and an unimportable wheel.
17
+ * Unlike the Dart side, where pub rejects the name outright and fails loudly,
18
+ * this one would fail quietly, which is why it is handled here rather than left
19
+ * to the caller.
20
+ *
13
21
  * @param name - The Nx project name.
14
22
  * @returns The module directory's basename (e.g. `my_svc`).
15
23
  * @throws Never - pure string mapping.
16
24
  * @typeParam None - this function has no generic type parameters.
17
25
  */
18
26
  function pythonModuleDirectory(name) {
19
- return name.replaceAll('-', '_');
27
+ return name.replaceAll(/[-.]/g, '_');
20
28
  }
21
29
  /**
22
30
  * The `pyproject.toml` written for a buildable Python project (app or lib).
@@ -1 +1 @@
1
- {"version":3,"file":"pythonProject.js","sourceRoot":"","sources":["../../src/internal/pythonProject.ts"],"names":[],"mappings":";;AAWA,sDAEC;AAmBD,kDAkBC;AAcD,gDAIC;AAcD,4CAOC;AAzFD;;;;;;;;;;GAUG;AACH,SAAgB,qBAAqB,CAAC,IAAY;IAChD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAClC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,mBAAmB,CAAC,IAAY,EAAE,eAAuB;IACvE,OAAO;UACC,IAAI;;;;;;;;;;;eAWC,eAAe;;;;CAI7B,CAAA;AACD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,kBAAkB,CAAC,eAAuB;IACxD,OAAO;yBACgB,eAAe;CACvC,CAAA;AACD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,gBAAgB,CAAC,eAAuB;IACtD,OAAO,QAAQ,eAAe;;;;oCAII,eAAe;CAClD,CAAA;AACD,CAAC"}
1
+ {"version":3,"file":"pythonProject.js","sourceRoot":"","sources":["../../src/internal/pythonProject.ts"],"names":[],"mappings":";;AAmBA,sDAEC;AAmBD,kDAkBC;AAcD,gDAIC;AAcD,4CAOC;AAjGD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,qBAAqB,CAAC,IAAY;IAChD,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,mBAAmB,CAAC,IAAY,EAAE,eAAuB;IACvE,OAAO;UACC,IAAI;;;;;;;;;;;eAWC,eAAe;;;;CAI7B,CAAA;AACD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,kBAAkB,CAAC,eAAuB;IACxD,OAAO;yBACgB,eAAe;CACvC,CAAA;AACD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,gBAAgB,CAAC,eAAuB;IACtD,OAAO,QAAQ,eAAe;;;;oCAII,eAAe;CAClD,CAAA;AACD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnci/nx-python-pip",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "An Nx plugin for pip-native Python projects (Ruff + pytest + the standard PyPA build/twine tools) — no uv, no Poetry, no lock file.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -54,7 +54,7 @@
54
54
  "@nx/devkit": "23.1.0",
55
55
  "@types/jest": "^30.0.0",
56
56
  "@types/node": "^26.0.1",
57
- "eslint": "^10.8.0",
57
+ "eslint": "^9.39.0",
58
58
  "jest": "^30.4.2",
59
59
  "nx": "23.1.0",
60
60
  "ts-jest": "^29.4.11",