8000 More removal of npm by sbs20 · Pull Request #664 · sbs20/scanservjs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

More removal of npm #664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ This may be useful
# Node version
echo "node: $(node -v)"

# NPM version
echo "npm: $(npm -v)"

# Docker version
echo "docker: $(docker -v)"

Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ FROM debian:bookworm-slim AS scanservjs-base
RUN apt-get update \
&& apt-get install -yq \
nodejs \
npm \
adduser \
imagemagick \
ipp-usb \
Expand Down
19 changes: 0 additions & 19 deletions app-server/src/classes/system.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const os = require('os');
const Process = require('./process');
const FileInfo = require('./file-info');

const ContainerTypes = {
Expand All @@ -9,18 +8,6 @@ const ContainerTypes = {
SYSTEMD_NSPAWN: 'systemd-nspawn'
};

/**
* @returns {Promise<string>} The detected npm version
*/
async function getNpmVersion() {
try {
const buffer = await Process.spawn('npm -v');
return buffer.toString().trim();
} catch (error) {
return 'Failed to determine';
}
}

/**
* @returns {'docker' | 'podman' | 'systemd-nspawn' | null>} The used container technology, or null if no container was detected.
*/
Expand All @@ -44,7 +31,6 @@ function getContainerType() {
module.exports = new class System {

constructor() {
this.npmVersion = null;
this.containerType = null;
}

Expand All @@ -56,10 +42,6 @@ module.exports = new class System {
this.containerType = getContainerType();
}

if (this.npmVersion === null) {
this.npmVersion = await getNpmVersion();
}

const info = {
os: {
arch: os.arch(),
Expand All @@ -69,7 +51,6 @@ module.exports = new class System {
type: os.type()
},
node: process.version,
npm: this.npmVersion,
containerType: this.containerType,
};

Expand Down
3 changes: 0 additions & 3 deletions app-server/src/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ definitions:
node:
type: string
example: "v12.22.12"
npm:
type: string
example: "8.3.0"
docker:
type: boolean

Expand Down
1 change: 0 additions & 1 deletion app-server/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
* @typedef {Object} SystemInfo
* @property {OsInfo} os
* @property {string} node
* @property {string} npm
* @property {boolean} docker
*/

Expand Down
6 changes: 0 additions & 6 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ npm run lint && npm run test && npm run build
npm run util:missing-translations
```

## Updating node dependencies

* `npm audit fix` or `npm update`. This won't remove old packages; to do so,
delete node_modules and reinstall
* `cd packages/client/ && npx browserslist@latest --update-db`

## References

* [i18n](https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-vue-app-with-vue-i18n)
Expand Down
0