Skip to content

Commit

Permalink
Update deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Sep 25, 2023
1 parent ebcd03a commit dac8541
Show file tree
Hide file tree
Showing 6 changed files with 575 additions and 533 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
},
"devDependencies": {
"@moonrepo/cli": "workspace:*",
"@types/node": "^18.17.14",
"@types/node": "^18.17.19",
"babel-preset-moon": "^2.0.8",
"eslint": "^8.48.0",
"eslint": "^8.50.0",
"eslint-config-moon": "^2.0.9",
"execa": "^6.1.0",
"jest": "^29.6.4",
"jest": "^29.7.0",
"jest-preset-moon": "^2.0.4",
"packemon": "^3.2.1",
"prettier": "^3.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/visualizer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@preact/preset-vite": "^2.5.0",
"@types/cytoscape": "^3.19.11",
"@types/cytoscape-dagre": "^2.3.1",
"autoprefixer": "^10.4.15",
"autoprefixer": "^10.4.16",
"eslint-config-preact": "^1.3.0",
"postcss": "^8.4.29",
"postcss": "^8.4.30",
"tailwindcss": "^3.3.3",
"vite": "^4.4.9",
"vite-plugin-css-injected-by-js": "^3.3.0"
Expand Down
15 changes: 12 additions & 3 deletions website/docs/commands/run.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import VersionLabel from '@site/src/components/Docs/VersionLabel';

The `moon run` (or `moon r`) command will run one or many [targets](../concepts/target) and all of
its dependencies in topological order. Each run will incrementally cache each task, improving speed
and development times... over time.
and development times... over time. View the official [Run a task](../run-task) and
[Cheat sheet](../cheat-sheet#tasks) articles for more information!

```shell
# Run `lint` in project `app`
Expand All @@ -30,8 +31,16 @@ $ moon run format
$ moon run :build --query "language=javascript && projectType=library"
```

> View the official [Run a task](../run-task) and [Cheat sheet](../cheat-sheet#tasks) articles for
> more information!
:::info

How affected status is determined is highly dependent on whether the command is running locally, in
CI, and what options are provided. The following scenarios are possible:

- When `--affected` is provided, will explicitly use `--remote` to determine CI or local.
- When not provided, will use `git diff` in CI, or `git status` for local.
- To bypass affected logic entirely, use `--force`.

:::

### Arguments

Expand Down
23 changes: 20 additions & 3 deletions website/docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,33 @@ tasks:
platform: 'system'
```

Non system-tasks cannot run multiple commands, as a task in moon is a represented as a single
command, with inputs, outputs, and more, and is managed by the toolchain. However, we do suggest the
following alternatives:
Non system-tasks cannot run multiple commands for the following reasons:

- A task in moon is a represented as a single command, with its own arguments, inputs, outputs, and
more. This isolation is required for [task inheritance](./concepts/task-inheritance) to work
correctly. For example, if you had multiple commands in a task and were using inheritance, where
should arguments be appended?
- If using the [integrated toolchain](./concepts/toolchain), we cannot easily statically analyze the
command string to determine where the binary is located. For example, given the multi-command
`rm -rf ./dist && node ./build.js && tsc --build`, moon has no knowledge of where to find these
binaries without considerable effort at runtime.
- `rm` can be assumed to exist on the system, but what if it's actually an npm package? This also
isn't portable on Windows.
- `node` is straight forward enough. This is Node.js.
- `tsc` is what exactly? A node module? An npm global? A system command? moon has no idea, and
since we can't use Node.js's built-in module resolution, we need to locate it ourselves.
- The `platform` setting on each task easily solves these problems, but requires a single command
per task to avoid unnecessary complexity.

However, we do suggest the following alternatives:

- Create a task for each command, and link them as dependencies with
[`deps`](./config/project#deps). This allows for each command to be incrementally cached (when
enabled).
- Create a task for each command, and run them concurrently with [`moon run`](./commands/run).
- Wrap all commands in an external file, and execute that file instead. Refer to the
[piping question](#how-to-pipe-or-redirect-tasks) above for an example.
- Avoid using the toolchain and assume everything exists on `PATH`.

### How to run tasks in a shell?

Expand Down
12 changes: 6 additions & 6 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"write-translations": "docusaurus write-translations"
},
"dependencies": {
"@docusaurus/core": "^2.4.1",
"@docusaurus/plugin-client-redirects": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"@docusaurus/theme-common": "^2.4.1",
"@docusaurus/core": "^2.4.3",
"@docusaurus/plugin-client-redirects": "^2.4.3",
"@docusaurus/preset-classic": "^2.4.3",
"@docusaurus/theme-common": "^2.4.3",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-brands-svg-icons": "^6.4.2",
"@fortawesome/pro-duotone-svg-icons": "^6.4.2",
Expand All @@ -33,10 +33,10 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.4.1",
"@docusaurus/module-type-aliases": "^2.4.3",
"@moonrepo/runtime": "workspace:^",
"@moonrepo/types": "workspace:^",
"@tsconfig/docusaurus": "^2.0.0",
"@tsconfig/docusaurus": "^2.0.1",
"@types/cytoscape": "^3.19.11",
"@types/cytoscape-dagre": "^2.3.1",
"tailwindcss": "^3.3.3"
Expand Down
Loading

0 comments on commit dac8541

Please sign in to comment.