Commit Graph

56 Commits

Author SHA1 Message Date
Zoltan Kochan
b17096a36f fix(dlx): don't fail when executed in a dir with no write access (#3668) 2021-08-13 13:52:10 +03:00
Zoltan Kochan
376c304859 feat: dlx (#3652) 2021-08-10 23:31:49 +03:00
Joël Galeran
bd442ecb53 fix: add "run" to NO_SCRIPT error example (#3660)
close #3656
2021-08-10 17:41:38 +03:00
Zoltan Kochan
9476d5ac5b fix(exec): pnpm exec should work outside of Node.js projects (#3597) 2021-07-14 02:26:51 +03:00
Zoltan Kochan
4add11a96d fix(exec): run in the right directory (#3514) 2021-06-08 23:42:03 +03:00
Zoltan Kochan
06f1275032 feat(exec): no need to use -- (#3492) 2021-06-01 23:38:23 +03:00
Zoltan Kochan
a1a03d1457 fix: import only the needed functions from ramda 2021-05-29 01:33:09 +03:00
Zoltan Kochan
a77a2005e5 fix(exec): exit with the right exit code 2021-05-28 03:17:53 +03:00
Zoltan Kochan
3cabbd4d4a fix(exec): update help 2021-05-28 01:09:46 +03:00
Zoltan Kochan
209c142358 feat: run arbitrary commands via pnpm CLI (#3478)
ref #3191
2021-05-27 23:56:48 +03:00
Zoltan Kochan
c1f137412c fix: pnpm exec should use the right Node.js version (#3477) 2021-05-27 02:00:26 +03:00
Zoltan Kochan
ff9714d783 fix: don't list commands twice in workspace root (#3423) 2021-05-07 11:46:03 +03:00
Zoltan Kochan
ba5231ccf2 feat: enable-pre-post-scripts (#3348) 2021-04-14 11:53:22 +03:00
Zoltan Kochan
34338d2d05 feat!: don't execute pre/post scripts automatically (#3285)
close #2891
2021-03-27 14:58:38 +02:00
Zoltan Kochan
903314f4d6 style: fix 2021-03-17 23:27:28 +02:00
Zoltan Kochan
f2c8e95e30 fix(deps): update dependency eslint-config-standard-with-typescript to v20
close #3236
2021-03-13 03:33:30 +02:00
Zoltan Kochan
048c948719 fix: rename .pnp.js to .pnp.cjs (#3148)
ref #2902
2021-02-17 00:37:17 +02:00
Zoltan Kochan
d6d091f249 style: use es2015 imports (#3143) 2021-02-15 05:06:10 +02:00
Jonathan Morley
326822f77e feat: add --reverse flag (#3119)
close #2985
2021-02-04 23:28:31 +02:00
Zoltan Kochan
9427ab3925 fix: --no-bail
close #3036
PR #3040
2020-12-23 00:05:23 +02:00
Zoltan Kochan
50b360ec1e feat: script-shell
close #2942
PR #2943
2020-10-21 01:16:59 +03:00
Zoltan Kochan
f591fdeeb9 feat: support Plug'n'Play
ref #2902
PR #2908
2020-10-11 13:12:02 +03:00
Zoltan Kochan
23cf3c88b1 feat: shell emulator
close #2621
PR #2881
2020-09-23 13:32:48 +03:00
Zoltan Kochan
092f8dd83a feat: --workspace-root
`--workspace-root`, `-w`: a new option that allows to focus on
the root workspace project.

E.g., the following command runs the `lint` script of the root
`package.json` from anywhere in the monorepo:

```
pnpm -w lint
```

PR #2866
2020-09-17 11:07:05 +03:00
Zoltan Kochan
3f47415cbd refactor: remove redundant space from error hint 2020-09-15 16:52:47 +03:00
Zoltan Kochan
d11442a578 feat(run): print info about root workspace scripts
ref #2853
PR #2859
2020-09-15 11:24:06 +03:00
Zoltan Kochan
de61940a57 fix: pnpm test|start|stop should allow the same options as pnpm run test|start|stop
PR #2814
2020-09-01 15:44:39 +03:00
Zoltan Kochan
88e1eaa908 style: use no delimiters in type declarations 2020-08-26 01:42:36 +03:00
Zoltan Kochan
5322cf9b39 style: use nullish coalescing 2020-08-26 01:15:47 +03:00
Zoltan Kochan
1c8a02e996 style: use eslint instead of tslint
PR #2796
close #2300
2020-08-24 02:01:25 +03:00
Zoltan Kochan
76aaead321 fix: run --silent
close #2660
PR #2665
2020-07-05 01:40:42 +03:00
Zoltan Kochan
220896511a refactor: remove common-tags from dependencies 2020-06-21 16:39:49 +03:00
Zoltan Kochan
db17f6f7b6 refactor: move Project and ProjectsGraph to @pnpm/types 2020-06-21 14:54:49 +03:00
Zoltan Kochan
cc1b43886f fix(deps): update p-limit to v3.0.1 2020-06-06 19:36:42 +03:00
Zoltan Kochan
0e8daafe41 feat: --parallel
The `run` and `exec` commands may use the `--parallel` option.

`--parallel` completely disregards concurrency and topological sorting,
running a given script immediately in all matching packages
with prefixed streaming output. This is the preferred flag
for long-running processes such as watch run over many packages.

For example: `pnpm run --parallel watch`

close #2528
PR #2599
2020-06-01 11:22:44 +03:00
Zoltan Kochan
ffddf34a89 feat: --stream
Add new global option called `--stream`.

When used, the output from child processes is streamed to the console immediately, prefixed with the originating package directory. This allows output from different packages to be interleaved.

close #2147
close #1609
PR #2595
2020-05-31 13:46:32 +03:00
Zoltan Kochan
8094b2a628 fix(run): infinite recursion
A recursive run should not rerun the same package script which started the lifecycle event.

For instance, let's say one of the workspace projects has the following script:

```json
"scripts": {
  "build": "pnpm run -r build"
}
```

Running `pnpm run build` in this project should not start an infinite recursion.
`pnpm run -r build` in this case should run `build` in all the workspace projects except the one that started the build.

Related issue: #2528
2020-05-30 22:02:27 +03:00
Zoltan Kochan
906465529a style: reformat multiline unions 2020-05-14 14:30:09 +03:00
Zoltan Kochan
c75a921e36 style: no trailing commas in functions 2020-05-12 19:00:16 +03:00
Zoltan Kochan
e3990787a1 refactor: NodeModules options renamed to Modules 2020-05-09 02:33:54 +00:00
Zoltan Kochan
52c030fa57 refactor: types 2020-05-08 02:09:40 +00:00
Jonathan Morley
7300eba86e feat: have if-present apply to recursive runs
PR #2520
2020-05-01 23:39:41 +03:00
Zoltan Kochan
6afba68819 fix(exec): exec should fail with better error
"pnpm exec" currently works only when executed recursively,
so it should fail with a meaningful error if "-r" is not
present.

close #2461
2020-04-12 12:35:22 +03:00
Zoltan Kochan
0462fbc501 refactor: remove realNodeModulesDir from utils 2020-04-03 02:29:14 +03:00
Zoltan Kochan
40e153e107 fix: pnpm run --filter <project>
`pnpm run --filter <project>` should list available scripts of the project
`pnpm run --filter <projects>` should fail

close #2357
PR #2422
2020-03-15 13:48:57 +02:00
Zoltan Kochan
906ede36c6 fix: the -r option is not supported by all cmds
ref #2396
2020-03-15 02:28:20 +02:00
Zoltan Kochan
715610d2c8 refactor: command plugins API 2020-03-09 00:19:08 +02:00
Zoltan Kochan
e8ac70b648 feat: support autocompletion
PR #2281
close #2229
2020-01-27 21:34:18 +02:00
Yao Ding
d0c1e33915 feat: use env var to specify npm path
close #1790
PR #2275
2020-01-18 19:12:31 +02:00
Zoltan Kochan
049745bb10 fix: unknown options regression in script cmds 2020-01-09 22:27:51 +02:00