Commit Graph

13 Commits

Author SHA1 Message Date
steven nguyen
ee56b4ba7b separate getLocalNpmBinPath for install-apm.js 2022-02-28 14:44:12 +00:00
DeeDeeG
b042d2ded1 script: Let bootstrap install apm with npm ci
This commit enables faster, more-reproducible installs of `apm`,
when bootstrapping/building Atom in `ci` mode.
(with `--ci` or env var `CI` set).

This only affects bootstrapping/building Atom; This should
not make any difference to the built Atom app, or to `apm`'s behavior
as a command-line tool/as a component of Atom.

Details:

As of apm 2.6.2, apm respects a `NO_APM_DEDUPE` env var on Windows.
(It was already supported on Linux and macOS before then.)
When set, this env var disables the deduping
normally performed at the end of apm's postinstall script.

This deduping doesn't work properly when installing apm with `npm ci`,
for unknown reasons. (The deduping algorithm deletes many needed
dependencies, without reconstructing a valid tree.)

Now that `apm` supports `NO_APM_DEDUPE` on all platforms,
we can safely allow installing `apm` with `npm ci`
during the bootstrap script.

Now bootstrapping apm in `ci` mode is faster in two ways:
- `npm ci` is generally faster than `npm install` for clean installs.
  - Great for actual automated builds ("CI").
- The `npm dedupe` run is now skipped in `ci` mode.
  - The `npm dedupe` was of dubious value in any case
  - The `npm dedupe` command was also surprisingly slow

We also benefit from the stronger reproducibility of `npm ci`
compared to `npm install` (guaranteed, version-locked dependencies).
2021-05-19 10:47:41 -04:00
Winston Liu
86ad1c6604 Revert "Install apm using ci"
This reverts commit c7b55e5cea.
2019-06-13 22:26:52 -04:00
Winston Liu
c7b55e5cea Install apm using ci 2019-06-13 22:25:23 -04:00
Rafael Oleza
7f3f040628 Reformat all JS files using prettier 2019-05-31 18:33:56 +02:00
Ash Wilson
c7aaa880fb Always use install for apm 2018-08-08 12:36:15 -04:00
Ash Wilson
d0811b82ed Add a --ci option to script/build 2018-08-08 08:41:30 -04:00
Wliu
7bb08e39f3 👕 2017-01-24 23:41:30 -05:00
Antonio Scandurra
14611926ac Ensure script/bootstrap works after cleaning dependencies up 2016-08-29 13:40:17 +02:00
Antonio Scandurra
e3e85e4780 Put back mistakenly deleted requires 2016-08-16 12:46:37 +02:00
Antonio Scandurra
d7f7f3527e Extract a spawnSync helper that throws on command errors 2016-08-16 12:29:42 +02:00
Antonio Scandurra
d089c94f3b Remove trailing ... in log messages 2016-08-08 15:18:21 +02:00
Antonio Scandurra
cf85bd032d Reimplement script/bootstrap 2016-08-02 14:04:45 +02:00