Commit Graph

319 Commits

Author SHA1 Message Date
Kevin Burnett
e893a30a24
Apply suggestions from code review
Co-authored-by: Augusto Moura <augusto.moura@toptal.com>
2022-03-12 17:48:33 -05:00
burnettk
073424cda0 only touch list-all and stop hitting http endpoint, per code review suggestion 2022-03-11 12:48:17 -05:00
burnettk
eb110f87bd if a version is not available in node-build, make sure it is not in list-all 2022-03-11 09:26:31 -05:00
Augusto Moura
364c078340
Merge pull request #291 from augustobmoura/feat/comments-on-default-packages
feat: add comments to default npm packages
2022-02-21 10:17:09 -03:00
Augusto Moura
95b22c98d0
Merge pull request #290 from jfly/issue-289-fix
Don't set `NODE_BUILD_BUILD_PATH`
2022-02-21 10:06:54 -03:00
Jeremy Fleischman
dbc07b70a9
Don't set NODE_BUILD_BUILD_PATH
If not set, [node-build defaults to a timestamped subdirectory of
`TMPDIR`](https://github.com/nodenv/node-build#custom-build-configuration),
which is exactly what we need.

This fixes https://github.com/asdf-vm/asdf-nodejs/issues/289

With this change, I see repeated builds fail in the exact same way (see
https://github.com/asdf-vm/asdf-nodejs/issues/289 for a detailed
explanation of what used to happen):

    $ PATH="$PWD:$PATH" ASDF_NODEJS_FORCE_COMPILE=1 asdf install nodejs 14.18.1
    Trying to update node-build... ok

    WARNING: node-v14.18.1 is in LTS Maintenance mode and nearing its end of life.
    It only receives *critical* security updates, *critical* bug fixes and documentation updates.

    Installing node-v14.18.1...

    BUILD FAILED (Arch rolling using node-build 4.9.69)

    Inspect or clean up the working tree at /tmp/node-build.20220216023317.178521.tZF5cV
    Results logged to /tmp/node-build.20220216023317.178521.log

    Last 10 log lines:
    /tmp/node-build.20220216023317.178521.tZF5cV ~/tmp/demoing
    /tmp/node-build.20220216023317.178521.tZF5cV/node-v14.18.1 /tmp/node-build.20220216023317.178521.tZF5cV ~/tmp/demoing
    Node.js configure: Found Python 3.9.6...
    WARNING: C compiler (CC=gcc, 0.0.0) too old, need gcc 4.2 or clang 3.2
    WARNING: Could not recognize `gas`:
    ERROR: Did not find a new enough assembler, install one or build with
           --openssl-no-asm.
           Please refer to BUILDING.md

    $ PATH="$PWD:$PATH" ASDF_NODEJS_FORCE_COMPILE=1 asdf install nodejs 14.18.1
    Trying to update node-build... ok

    WARNING: node-v14.18.1 is in LTS Maintenance mode and nearing its end of life.
    It only receives *critical* security updates, *critical* bug fixes and documentation updates.

    Installing node-v14.18.1...

    BUILD FAILED (Arch rolling using node-build 4.9.69)

    Inspect or clean up the working tree at /tmp/node-build.20220216023335.178790.u0kcPV
    Results logged to /tmp/node-build.20220216023335.178790.log

    Last 10 log lines:
    /tmp/node-build.20220216023335.178790.u0kcPV ~/tmp/demoing
    /tmp/node-build.20220216023335.178790.u0kcPV/node-v14.18.1 /tmp/node-build.20220216023335.178790.u0kcPV ~/tmp/demoing
    Node.js configure: Found Python 3.9.6...
    WARNING: C compiler (CC=gcc, 0.0.0) too old, need gcc 4.2 or clang 3.2
    WARNING: Could not recognize `gas`:
    ERROR: Did not find a new enough assembler, install one or build with
           --openssl-no-asm.
           Please refer to BUILDING.md
2022-02-16 02:36:31 -08:00
Augusto Moura
ad4c3a7b54
Merge pull request #288 from augustobmoura/feat/manual-gh-actions
Add workflow_dispatch trigger to manually running the test GH action
2022-02-13 23:25:01 -03:00
Augusto Moura
0645ab4182
chore: add workflow_dispatch trigger to testing action 2022-02-13 23:23:48 -03:00
Augusto Moura
7f5a86ce00
feat: add comments to default npm packages 2022-02-09 22:29:34 -03:00
Augusto Moura
50656e514c
Merge pull request #286 from augustobmoura/feat/add-gh-actions-badge
Add GH Actions badge instead of Travis CI
2022-02-09 21:36:34 -03:00
Augusto Moura
7c96d62ef8
feat: add GH Actions badge instead of Travis CI 2022-02-09 21:35:41 -03:00
Augusto Moura
a86d274479
Merge pull request #285 from augustobmoura/fix/fix-gh-actions
Fix GH action for basic testing
2022-02-09 21:21:05 -03:00
Augusto Moura
4b329e7d36
fix: fix gh action for basic testing 2022-02-09 21:20:19 -03:00
Augusto Moura
223cb30f9a
Merge pull request #196 from smorimoto/github-actions
Switch from TravisCI to GitHub Actions
2022-02-09 21:15:39 -03:00
Augusto Moura
d7170680f7
Merge pull request #284 from augustobmoura/feature/force-rebuild-option
Add option for forcing compilation when installing
2022-02-09 20:56:12 -03:00
Augusto Moura
2f7ed7520c
feat: add force rebuild variable 2022-02-09 20:12:37 -03:00
Augusto Moura
ed34355316
Merge pull request #278 from augustobmoura/fix/add-link-cmds-npm-shim
Add auto reshim for npm link
2021-12-24 00:55:29 -03:00
Augusto Moura
b842e07571
Merge pull request #279 from augustobmoura/fix/data-dir-resolve
Change fallbacks to ASDF_DATA_DIR to not include ASDF_DIR
2021-12-24 00:45:06 -03:00
Augusto Moura
11532b61d9
fix: change fallbacks to ASDF_DATA_DIR to not include ASDF_DIR 2021-12-24 00:40:45 -03:00
Augusto Moura
05a7fc6269
feat: add auto reshim for npm link 2021-12-24 00:31:16 -03:00
Augusto Moura
0237452eb2
Merge pull request #274 from augustobmoura/fix/remove-bc-dependency
Remove dependency on bc in favor of a pure bash implementation
2021-12-20 17:13:20 -03:00
Augusto Moura
f08937dfa3
fix: remove dependency on bc in favor of a pure bash alternative 2021-12-20 17:09:07 -03:00
Augusto Moura
6430bd8e82
Merge pull request #272 from augustobmoura/feature/nodenv-build-system
Use node-build as main installation/building drive
2021-12-20 12:58:26 -03:00
Augusto Moura
b58ae2359f
fix: add fallback for unbound variables in bash3 2021-12-16 21:10:58 -03:00
Augusto Moura
e0d3804a55
docs: better explanation of manually updating node-build 2021-12-15 14:17:39 -03:00
Augusto Moura
363c0d1d9f
fix: add fallback for empty arrays in bash3 2021-12-15 14:07:51 -03:00
Augusto Moura
dcc73aea0e
fix: fix typos & revert import of utils.sh 2021-12-13 22:50:58 -03:00
Augusto Moura
3e44540e9a
docs: better wording for the README 2021-12-07 00:15:06 -03:00
Augusto Moura
58859abcd5
chore: better messages 2021-12-07 00:03:28 -03:00
Augusto Moura
e2e0db2aad
chore: add better error messages 2021-11-29 15:00:39 -03:00
Augusto Moura
07fe573c33
docs: add section for running the wrapped node-build command
also some minor text adjustments
2021-11-29 12:53:18 -03:00
Augusto Moura
1dd98c407c
typo: change defitions to definitions 2021-11-29 12:49:58 -03:00
Augusto Moura
1a70296fdc
fix: add correct default for concurrency 2021-11-29 12:48:30 -03:00
Augusto Moura
94bd796e02
docs: add information on nodebuild commands 2021-11-29 12:48:06 -03:00
Augusto Moura
67c382b8a2
docs: update README com new information about installation 2021-11-24 00:20:25 -03:00
Augusto Moura
ee8daa2b75
feat: remove previous integrity check logic 2021-11-23 23:35:25 -03:00
Augusto Moura
c4e335f872
feat: modify install to use node-build behind the scenes 2021-11-23 23:08:14 -03:00
Augusto Moura
800e244e78
feat: add commands for managing an internal node-build installation 2021-11-23 21:23:30 -03:00
Augusto Moura
54113a909b
feat: add parsing for lts/* aliases on legacy files (#194)
* feat: add parsing for lts/* aliases on legacy files
* refactor: better sed replace pattern
* fix: add correct replacement for lts/*
2021-11-11 10:13:39 -05:00
Pascal Martel
1bc55cb601
Fallback on source code build when no binary available (#207) 2021-10-29 21:40:13 -04:00
Augusto Moura
794b653b2a
Merge pull request #265 from M1kep/fix-cache-early-exit-v2
Fix print_index_tab to ensure cache is written
2021-10-11 14:24:34 -03:00
Michael Poutre
ce7652263a
Fix print_index_tab to ensure cache is written
Prior to this change the `tee` call was susceptible to its output being closed causing the pipeline to exit with `SIGPIPE`. This change replaces `tee` with two parts. 

1. Write directly to `"$index_file"`
2. `cat` the contents of `"$index_file"` to `stdout`. 

This way, if the receiving side of the pipe exits, `cat` will exit without impacting the index cache

Reimplements #264
2021-10-08 15:11:40 -07:00
Michael Poutre
18f2a58981
Revert "Fix resolve_version_query to not kill tee in filter_version_candidates (#264)"
This reverts commit a32e6c9751.
2021-10-08 14:56:17 -07:00
Michael Poutre
a32e6c9751
Fix resolve_version_query to not kill tee in filter_version_candidates (#264)
Prior to this change the awk 'prog' contained an exit command. When tee attempted to write to the stdout at this point, it received a SIGPIPE signal and exited with an error code of 141. I can't seem to find a way to have tee ignore this signal, but I don't believe the overhead of awk doing a small comparison will have a large/any performance impact especially relative to the processing in filter_version_candidates

Fixes #263
2021-10-07 08:15:13 -04:00
Augusto Moura
c873ec9d13
Merge pull request #262 from augustobmoura/feat/shim-fallback-bin-search
Add fallback method of finding the npm bin on the shim
2021-10-02 22:48:48 -03:00
Augusto Moura
782a2f87c4
fix: fix plugin_name with wrong value 2021-10-02 22:44:34 -03:00
Augusto Moura
000c048edd
fix: remove unused quote_path fucntion 2021-10-02 22:41:53 -03:00
Augusto Moura
ba13ea3e67
fix: fix print call instead of printf 2021-10-02 21:31:22 -03:00
Augusto Moura
a9c3e49531
feat: add fallback method of finding the npm bin 2021-10-02 20:52:47 -03:00
Guilherme Almeida
95a2091f7b
Fixes bug where plugin path is incorrect (#249) (#251)
* fix: 🐛 bug where plugin path is incorrect (#249)
* fix: supports spaces in the path

Co-authored-by: Augusto Moura <me@augustomoura.com>
2021-07-22 14:45:35 -04:00