@moonrepo/cli 0.4.0 → 0.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.
- package/CHANGELOG.md +49 -0
- package/README.md +62 -0
- package/package.json +6 -6
- package/postinstall.js +23 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
#### 🚀 Updates
|
|
6
|
+
|
|
7
|
+
- Added a new `@group` token that can be used be task `args` and `inputs`.
|
|
8
|
+
- Added a `moon query` command for querying information about moon, the environment, and more.
|
|
9
|
+
- To start, `moon query touched-files` can be used to query touched files. The same files
|
|
10
|
+
`moon ci` and `moon run` use.
|
|
11
|
+
- Also `moon query projects` can be used to query about projects in the project graph.
|
|
12
|
+
- Added `bash` as a supported value for the project `language` setting.
|
|
13
|
+
- Added `typescript.createMissingConfig` and `typescript.rootOptionsConfigFileName` settings to
|
|
14
|
+
`.moon/workspace.yml`.
|
|
15
|
+
- Updated TypeScript project reference syncing to automatically create missing `tsconfig.json`s.
|
|
16
|
+
- Updated `moon setup` and `moon teardown` to display spinners while running.
|
|
17
|
+
|
|
18
|
+
#### 🐞 Fixes
|
|
19
|
+
|
|
20
|
+
- Fixed an issue with a globally installed moon not being executable in PowerShell.
|
|
21
|
+
- Fixed an issue with empty files being passed to `git hash-object`.
|
|
22
|
+
- Fixed an issue where a `git merge-base` could not be resolved when base and head are provided.
|
|
23
|
+
|
|
24
|
+
#### ⚙️ Internal
|
|
25
|
+
|
|
26
|
+
- Updated Rust to v1.62.
|
|
27
|
+
- Refactored our action runner to support additional languages in the future.
|
|
28
|
+
- Refactored Windows to execute package binaries with `node.exe` directly, instead of with
|
|
29
|
+
`cmd.exe` + the `.bin/*.cmd` file.
|
|
30
|
+
|
|
31
|
+
## 0.5.0
|
|
32
|
+
|
|
33
|
+
#### 🚀 Updates
|
|
34
|
+
|
|
35
|
+
- Added caching to our VCS layer which should greatly reduce the amount of `git` commands being
|
|
36
|
+
executed.
|
|
37
|
+
- Updated `moon init` to detect `vcs.manager` and `vcs.defaultBranch` from the environment.
|
|
38
|
+
|
|
39
|
+
#### ⚙️ Internal
|
|
40
|
+
|
|
41
|
+
- We now detect the current Windows terminal using the `COMSPEC` environment variable, instead of
|
|
42
|
+
defaulting to `cmd.exe`.
|
|
43
|
+
- Improved our configuration layer so that error messages include more metadata.
|
|
44
|
+
- Added `#[track_caller]` to more easily diagnose panics.
|
|
45
|
+
|
|
46
|
+
### 0.4.1
|
|
47
|
+
|
|
48
|
+
#### 🐞 Fixes
|
|
49
|
+
|
|
50
|
+
- Fixed logs unintentionally logging non-moon messages.
|
|
51
|
+
|
|
3
52
|
## 0.4.0
|
|
4
53
|
|
|
5
54
|
#### 🚀 Updates
|
package/README.md
CHANGED
|
@@ -34,3 +34,65 @@ moon run app:lint
|
|
|
34
34
|
# Run `lint` in all projects
|
|
35
35
|
moon run :lint
|
|
36
36
|
```
|
|
37
|
+
|
|
38
|
+
## Why use moon?
|
|
39
|
+
|
|
40
|
+
Working in the JavaScript ecosystem can be very involved, especially when it comes to managing a
|
|
41
|
+
repository effectively. Which package manager to use? Which Node.js version to use? How to import
|
|
42
|
+
node modules? How to build packages? So on and so forth. moon aims to streamline this entire process
|
|
43
|
+
and provide a first-class developer experience.
|
|
44
|
+
|
|
45
|
+
- **Increased productivity** - With [Rust](https://www.rust-lang.org/) as our foundation, we can
|
|
46
|
+
ensure robust speeds, high performance, and low memory usage. Instead of long builds blocking you,
|
|
47
|
+
focus on your work.
|
|
48
|
+
- **Exceptional developer experience** - As veterans of the JavaScript ecosystem, we're well aware
|
|
49
|
+
of the pain points and frustrations. Our goal is to mitigate and overcome these obstacles.
|
|
50
|
+
- **Incremental adoption** - At its core, moon has been designed to be adopted incrementally and is
|
|
51
|
+
_not_ an "all at once adoption". Migrate project-by-project, or task-by-task, it's up to you!
|
|
52
|
+
- **Reduced scripts confusion** - `package.json` scripts can become unwieldy, very quickly. No more
|
|
53
|
+
duplicating the same script into every package, or reverse-engineering which root scripts to use.
|
|
54
|
+
With moon, all you need to know is the project ID, and a task ID.
|
|
55
|
+
- **Ensure correct versions** - Whether it's Node.js or npm, ensure the same version of each tool is
|
|
56
|
+
the same across _every_ developer's environment. No more wasted hours of debugging.
|
|
57
|
+
- **Automation built-in** - When applicable, moon will automatically install `node_modules`, or sync
|
|
58
|
+
package dependencies, or even sync TypeScript project references.
|
|
59
|
+
- And of course, the amazing list of features below!
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
> Not all features are currently supported, view the documentation for an accurate list!
|
|
64
|
+
|
|
65
|
+
#### Management
|
|
66
|
+
|
|
67
|
+
- **Smart hashing** - Collects inputs from multiple sources to ensure builds are deterministic and
|
|
68
|
+
reproducible.
|
|
69
|
+
- **Remote caching** - Persists builds, hashes, and caches between teammates and CI/CD environments.
|
|
70
|
+
- **Integrated toolchain** - Automatically downloads and installs explicit versions of Node.js and
|
|
71
|
+
other tools for consistency.
|
|
72
|
+
- **Multi-platform** - Runs on common development platforms: Linux, macOS, and Windows.
|
|
73
|
+
|
|
74
|
+
#### Organization
|
|
75
|
+
|
|
76
|
+
- **Project graph** - Generates a project graph for dependency and dependent relationships.
|
|
77
|
+
- **Project boundaries** - Enforces boundaries to eliminate cycles and reduce indirection.
|
|
78
|
+
- **Dependency workspaces** - Works alongside package manager workspaces so that projects have
|
|
79
|
+
distinct dependency trees.
|
|
80
|
+
- **Ownership metadata** - Declare an owner, maintainers, support channels, and more, for LDAP or
|
|
81
|
+
another integration.
|
|
82
|
+
|
|
83
|
+
#### Orchestration
|
|
84
|
+
|
|
85
|
+
- **Dependency graph** - Generates a dependency graph to increase performance and reduce workloads.
|
|
86
|
+
- **Action runner** - Executes actions in parallel and in order using a thread pool and our
|
|
87
|
+
dependency graph.
|
|
88
|
+
- **Action distribution** - Distributes actions across multiple machines to increase throughput.
|
|
89
|
+
- **Incremental builds** - With our smart hashing, only rebuild projects that have been touched
|
|
90
|
+
since the last build.
|
|
91
|
+
|
|
92
|
+
#### Notification
|
|
93
|
+
|
|
94
|
+
- **Flakiness detection** - Reduce flaky builds with automatic retries and passthrough settings.
|
|
95
|
+
- **Webhook events** - Receive a webhook for every event in the pipeline. Useful for metrics
|
|
96
|
+
gathering.
|
|
97
|
+
- **Terminal notifications** - Receives notifications in your chosen terminal when builds are
|
|
98
|
+
successful... or are not.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonrepo/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "moon command line and core system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moon",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"detect-libc": "^2.0.1"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@moonrepo/core-linux-x64-gnu": "^0.
|
|
33
|
-
"@moonrepo/core-linux-x64-musl": "^0.
|
|
34
|
-
"@moonrepo/core-macos-arm64": "^0.
|
|
35
|
-
"@moonrepo/core-macos-x64": "^0.
|
|
36
|
-
"@moonrepo/core-windows-x64-msvc": "^0.
|
|
32
|
+
"@moonrepo/core-linux-x64-gnu": "^0.6.0",
|
|
33
|
+
"@moonrepo/core-linux-x64-musl": "^0.6.0",
|
|
34
|
+
"@moonrepo/core-macos-arm64": "^0.6.0",
|
|
35
|
+
"@moonrepo/core-macos-x64": "^0.6.0",
|
|
36
|
+
"@moonrepo/core-windows-x64-msvc": "^0.6.0"
|
|
37
37
|
}
|
|
38
38
|
}
|
package/postinstall.js
CHANGED
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const isMoonLocal =
|
|
8
|
+
fs.existsSync(path.join(__dirname, '../../.moon')) &&
|
|
9
|
+
fs.existsSync(path.join(__dirname, '../../crates'));
|
|
10
|
+
|
|
11
|
+
const isLinux = process.platform === 'linux';
|
|
12
|
+
const isMacos = process.platform === 'darwin';
|
|
13
|
+
const isWindows = process.platform === 'win32';
|
|
14
|
+
|
|
15
|
+
const platform = isWindows ? 'windows' : isMacos ? 'macos' : process.platform;
|
|
13
16
|
const parts = [platform, process.arch];
|
|
14
17
|
|
|
15
|
-
if (
|
|
18
|
+
if (isLinux) {
|
|
16
19
|
const { familySync } = require('detect-libc');
|
|
17
20
|
|
|
18
21
|
if (familySync() === 'musl') {
|
|
@@ -22,11 +25,11 @@ if (process.platform === 'linux') {
|
|
|
22
25
|
} else {
|
|
23
26
|
parts.push('gnu');
|
|
24
27
|
}
|
|
25
|
-
} else if (
|
|
28
|
+
} else if (isWindows) {
|
|
26
29
|
parts.push('msvc');
|
|
27
30
|
}
|
|
28
31
|
|
|
29
|
-
const binary =
|
|
32
|
+
const binary = isWindows ? 'moon.exe' : 'moon';
|
|
30
33
|
const triple = parts.join('-');
|
|
31
34
|
|
|
32
35
|
const pkgPath = path.dirname(require.resolve(`@moonrepo/core-${triple}/package.json`));
|
|
@@ -43,6 +46,15 @@ try {
|
|
|
43
46
|
throw new Error();
|
|
44
47
|
}
|
|
45
48
|
} catch {
|
|
46
|
-
console.error(
|
|
47
|
-
|
|
49
|
+
console.error(`Failed to find "${binary}" binary.`);
|
|
50
|
+
|
|
51
|
+
if (!isMoonLocal) {
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isWindows && !isMoonLocal) {
|
|
57
|
+
try {
|
|
58
|
+
fs.unlinkSync(path.join(__dirname, 'moon'));
|
|
59
|
+
} catch (error) {}
|
|
48
60
|
}
|