ic-mops 2.5.0 → 2.6.0

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/api/network.ts +1 -1
  3. package/bun.lock +1082 -78
  4. package/bundle/cli.tgz +0 -0
  5. package/cli.ts +1 -1
  6. package/commands/add.ts +4 -1
  7. package/commands/build.ts +7 -12
  8. package/commands/check.ts +20 -2
  9. package/commands/docs-coverage.ts +26 -21
  10. package/commands/install/install-dep.ts +5 -3
  11. package/commands/lint.ts +107 -10
  12. package/commands/publish.ts +24 -11
  13. package/commands/remove.ts +5 -2
  14. package/commands/self.ts +1 -1
  15. package/commands/sources.ts +3 -2
  16. package/commands/sync.ts +13 -16
  17. package/commands/test/test.ts +3 -3
  18. package/commands/update.ts +13 -7
  19. package/commands/watch/error-checker.ts +3 -8
  20. package/commands/watch/warning-checker.ts +3 -8
  21. package/dist/api/network.js +1 -1
  22. package/dist/cli.js +1 -1
  23. package/dist/commands/add.js +4 -1
  24. package/dist/commands/build.js +5 -10
  25. package/dist/commands/check.js +14 -2
  26. package/dist/commands/docs-coverage.js +22 -22
  27. package/dist/commands/install/install-dep.js +3 -3
  28. package/dist/commands/lint.d.ts +3 -0
  29. package/dist/commands/lint.js +75 -10
  30. package/dist/commands/publish.js +19 -11
  31. package/dist/commands/remove.js +5 -2
  32. package/dist/commands/self.js +1 -1
  33. package/dist/commands/sources.js +3 -2
  34. package/dist/commands/sync.js +9 -14
  35. package/dist/commands/test/test.js +3 -3
  36. package/dist/commands/update.js +9 -4
  37. package/dist/commands/watch/error-checker.js +3 -8
  38. package/dist/commands/watch/warning-checker.js +3 -8
  39. package/dist/helpers/find-changelog-entry.js +1 -1
  40. package/dist/integrity.js +9 -3
  41. package/dist/mops.js +3 -0
  42. package/dist/package.json +3 -5
  43. package/dist/release-cli.js +2 -2
  44. package/dist/resolve-packages.js +4 -4
  45. package/dist/tests/build.test.js +1 -1
  46. package/dist/tests/check.test.js +24 -0
  47. package/dist/tests/helpers.js +8 -1
  48. package/dist/tests/lint.test.js +28 -2
  49. package/dist/types.d.ts +2 -0
  50. package/dist/vessel.d.ts +1 -1
  51. package/dist/vessel.js +3 -2
  52. package/helpers/find-changelog-entry.ts +3 -1
  53. package/integrity.ts +12 -3
  54. package/mops.ts +7 -0
  55. package/package.json +3 -5
  56. package/release-cli.ts +2 -2
  57. package/resolve-packages.ts +6 -4
  58. package/tests/build.test.ts +1 -1
  59. package/tests/check/with-lint-fail/NoBoolSwitch.mo +8 -0
  60. package/tests/check/with-lint-fail/lints/no-bool-switch.toml +9 -0
  61. package/tests/check/with-lint-fail/mops.toml +9 -0
  62. package/tests/check/with-lint-pass/Ok.mo +5 -0
  63. package/tests/check/with-lint-pass/lints/no-bool-switch.toml +9 -0
  64. package/tests/check/with-lint-pass/mops.toml +9 -0
  65. package/tests/check.test.ts +28 -0
  66. package/tests/helpers.ts +9 -1
  67. package/tests/lint-config-rules/extra-rules/no-bool-switch.toml +9 -0
  68. package/tests/lint-config-rules/mops.toml +5 -0
  69. package/tests/lint-config-rules/src/NoBoolSwitch.mo +8 -0
  70. package/tests/lint-extends/mops.toml +8 -0
  71. package/tests/lint-extends/my-pkg/mops.toml +3 -0
  72. package/tests/lint-extends/my-pkg/rules/no-bool-switch.toml +9 -0
  73. package/tests/lint-extends/src/NoBoolSwitch.mo +8 -0
  74. package/tests/lint-extends-all/mops.toml +8 -0
  75. package/tests/lint-extends-all/src/NoBoolSwitch.mo +8 -0
  76. package/tests/lint-extends-ignored/mops.toml +8 -0
  77. package/tests/lint-extends-ignored/src/NoBoolSwitch.mo +8 -0
  78. package/tests/lint.test.ts +32 -2
  79. package/types.ts +2 -0
  80. package/vessel.ts +5 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  ## Next
4
4
 
5
+ ## 2.6.0
6
+
7
+ - Packages can ship lintoko rules for consumers in a `rules/` directory (distinct from `lint/`/`lints/` which check the package itself); `rules/*.toml` files are included automatically when running `mops publish`
8
+ - Add `[lint] extends` in `mops.toml` to pull in `rules/` from installed dependencies: `extends = ["pkg"]` for named packages or `extends = true` for all
9
+ - Add `[lint] rules` in `mops.toml` to override the default `lint/`/`lints/` rule directories with custom paths
10
+ - `mops check` now runs `mops lint` after a successful type-check when `lintoko` is pinned in `[toolchain]`; lint is scoped to explicitly passed files when given, otherwise covers all `.mo` files; `--fix` propagates to both steps
11
+ - Raise package file limit from 300 to 1000; `mops publish` now fails fast with a clear error if the limit is exceeded
12
+ - Fix `mops docs coverage` crashing with out-of-memory on packages with many source files (replaced JSDOM with a lightweight adoc parser)
13
+
14
+ ## 2.5.1
15
+ - Fix `mops test` and `mops watch` breaking when dependency paths contain spaces
16
+ - Fix `mops sync` incorrectly reporting version-pinned dependencies as missing/unused
17
+ - Fix `mops update --lock ignore` not respecting the lock option during intermediate installs
18
+ - Fix `mops update` crashing with unhandled error when GitHub API is unavailable
19
+ - Fix `mops add` writing dependency to config even when GitHub download fails
20
+ - Fix GitHub dependency install crashing the entire process instead of reporting the error
21
+ - Fix version comparison treating short version strings (e.g. `1.0`) as equal to longer ones (e.g. `1.0.5`)
22
+ - Fix `mops remove` not cleaning up transitive dependencies of GitHub packages
23
+ - Fix corrupted `mops.lock` file causing an unhandled crash instead of a helpful error message
24
+ - Fix `mops sources` resolving package config from wrong directory in some contexts
25
+ - Harden lock file integrity check against package ID prefix collisions
26
+ - `mops build` now reports invalid canister names instead of silently ignoring them
27
+ - Document `baseDir`, `readme`, and `dfx` fields in `[package]` config
28
+
5
29
  ## 2.5.0
6
30
  - Add support for `MOPS_REGISTRY_HOST` and `MOPS_REGISTRY_CANISTER_ID` environment variables for custom registry endpoints
7
31
  - Fix `mops build` crashing with `__wbindgen_malloc` error in bundled CLI distribution
package/api/network.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export function getNetwork() {
2
- return globalThis.MOPS_NETWORK || "ic";
2
+ return process.env["MOPS_NETWORK"] || globalThis.MOPS_NETWORK || "ic";
3
3
  }
4
4
 
5
5
  export function getEndpoint(network: string) {