dependencies: Use one package.json structure.

The two package.json structure is no longer needed.
https://www.electron.build/tutorials/two-package-structure

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-03-02 20:45:50 -08:00
parent 067cbf32a1
commit e9536f247b
10 changed files with 1255 additions and 1710 deletions

4
.gitignore vendored
View File

@@ -1,5 +1,5 @@
# Dependency directories
node_modules/
# Dependency directory
/node_modules/
# npm cache directory
.npm

View File

@@ -21,13 +21,11 @@ node_js:
before_install:
- ./scripts/travis-xvfb.sh
- npm install -g gulp
- (cd app && npm ci --ignore-scripts)
- npm ci
cache:
directories:
- node_modules
- app/node_modules
script:
- npm run travis

1325
app/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,52 +0,0 @@
{
"name": "zulip",
"productName": "Zulip",
"version": "4.1.0-beta",
"desktopName": "zulip.desktop",
"description": "Zulip Desktop App",
"license": "Apache-2.0",
"copyright": "Kandra Labs, Inc.",
"author": {
"name": "Kandra Labs, Inc.",
"email": "support@zulipchat.com"
},
"repository": {
"type": "git",
"url": "https://github.com/zulip/zulip-desktop.git"
},
"bugs": {
"url": "https://github.com/zulip/zulip-desktop/issues"
},
"main": "main/index.js",
"keywords": [
"Zulip",
"Group Chat app",
"electron-app",
"electron",
"Desktop app",
"InstantMessaging"
],
"dependencies": {
"@electron-elements/send-feedback": "^1.0.8",
"@sentry/electron": "^1.2.1",
"adm-zip": "^0.4.14",
"auto-launch": "^5.0.5",
"backoff": "^2.5.0",
"crypto-random-string": "^3.1.0",
"dotenv": "^8.2.0",
"electron-is-dev": "^1.1.0",
"electron-log": "^4.0.7",
"electron-spellchecker": "^2.2.1",
"electron-updater": "^4.2.2",
"electron-window-state": "^5.0.3",
"escape-html": "^1.0.3",
"i18n": "^0.8.5",
"node-json-db": "^1.0.3",
"request": "^2.88.2",
"semver": "^7.1.3",
"wurl": "^2.5.4"
},
"optionalDependencies": {
"node-mac-notifier": "^1.1.0"
}
}

1543
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,7 @@
"**/*.node"
],
"files": [
"**/*",
"app/**/*",
"!**/node_modules/cld/deps/cld"
],
"copyright": "©2019 Kandra Labs, Inc.",
@@ -151,6 +151,29 @@
"Desktop app",
"InstantMessaging"
],
"dependencies": {
"@electron-elements/send-feedback": "^1.0.8",
"@sentry/electron": "^1.2.1",
"adm-zip": "^0.4.14",
"auto-launch": "^5.0.5",
"backoff": "^2.5.0",
"crypto-random-string": "^3.1.0",
"dotenv": "^8.2.0",
"electron-is-dev": "^1.1.0",
"electron-log": "^4.0.7",
"electron-spellchecker": "^2.2.1",
"electron-updater": "^4.2.2",
"electron-window-state": "^5.0.3",
"escape-html": "^1.0.3",
"i18n": "^0.8.5",
"node-json-db": "^1.0.3",
"request": "^2.88.2",
"semver": "^7.1.3",
"wurl": "^2.5.4"
},
"optionalDependencies": {
"node-mac-notifier": "^1.1.0"
},
"devDependencies": {
"@types/adm-zip": "^0.4.32",
"@typescript-eslint/eslint-plugin": "^2.22.0",

View File

@@ -2,9 +2,8 @@
set -e
set -x
echo "Removing node_modules and app/node_modules"
echo "Removing node_modules"
rm -rf node_modules
rm -rf app/node_modules
echo "node_modules removed reinstalling npm packages"
npm i

View File

@@ -1,8 +1,7 @@
@echo off
echo "Removing node_modules and app/node_modules"
echo "Removing node_modules"
rmdir /s /q node_modules
rmdir /s /q app/node_modules
echo "node_modules removed reinstalling npm packages"
npm i

View File

@@ -5,7 +5,7 @@
* Electron is more or less Chrome, you can get developer tools using `CMD+ALT+I`
### Error : ChecksumMismatchError
- Try deleteing `node_modules` && `app/node_modules` directories. Re-install dependencies using `npm install`
- Try deleting the `node_modules` directory and reinstalling dependencies using `npm install`
### Error : Module version mismatch. Expected 50, got 51
- Make sure you have installed [node-gyp](https://github.com/nodejs/node-gyp#installation) dependencies properly

View File

@@ -17,13 +17,5 @@
"noUnusedLocals": true,
"noUnusedParameters": false,
"noImplicitReturns": true
},
"include":[
"app/**/*",
"typings.d.ts"
],
"exclude":[
"node_modules",
"app/node_modules"
]
}
}