Skip to content

Commit

Permalink
Remove cpu and os fields from package.json (#561)
Browse files Browse the repository at this point in the history
When the `cpu` or `os` fields are configured npm will not install the
package if the host CPU architecture or Operating System does not match
any of the configured values.

This previously meant the `nodejs-ext` package would not install and be
removed from the file system, which it also did if the extension
installation failed later on in the process. (It doesn't do that
anymore.) Since we merged the `nodejs-ext` package in the `nodejs`
package, these fields will cause serious problems with the integration.

If the nodejs package would fail to install the whole integration would
break. The app and other packages would try to call parts of the package
that is not present.

Remove the `os` and `cpu` fields to not restrict installation to any of
the configured CPU architectures or Operating Systems. Our extension
installer script figures out for which it can install the extension, and
write a report on failure. The `nodejs` package should always install
without issue.
  • Loading branch information
tombruijn authored Jan 20, 2022
1 parent b01ee86 commit 733ee15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: "patch"
type: "change"
---

Remove the `os` and `cpu` fields from the `package.json`. This will prevent installations from failing on unlisted CPU architectures and Operating Systems. Our extension installer script will do this check instead. The package should not fail to install when it encounters an unsupported CPU architecture or Operating System.
10 changes: 0 additions & 10 deletions packages/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@
"pretest:failure": "npm run clean",
"test:failure": "_TEST_APPSIGNAL_EXTENSION_FAILURE=true _APPSIGNAL_EXTENSION_INSTALL=true npm run install; _TEST_APPSIGNAL_EXTENSION_FAILURE=true jest --filter=./test/filter.js"
},
"os": [
"linux",
"darwin",
"freebsd"
],
"cpu": [
"x64",
"x86",
"arm"
],
"engines": {
"node": ">= 12"
},
Expand Down

0 comments on commit 733ee15

Please sign in to comment.