[EC-236] Move dependencies to root package.json (#2720)

This commit is contained in:
Oscar Hinton 2022-06-02 15:18:29 +02:00 committed by GitHub
parent 3ee1636cb6
commit 12c4a3e7f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 32847 additions and 42980 deletions

View File

@ -114,17 +114,25 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/browser/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Install node-gyp
run: |
npm install -g node-gyp
node-gyp install $(node -v)
- name: Print environment
run: |
node --version
npm --version
- name: NPM setup & test
- name: NPM setup
run: npm ci
working-directory: ./
- name: Build & Test
run: |
npm ci
npm run dist
npm run test
@ -202,7 +210,7 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/browser/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Print environment
@ -264,10 +272,12 @@ jobs:
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
- name: NPM setup
run: npm ci
working-directory: ./
- name: Build Safari extension
run: |
npm ci
npm run dist:safari
run: npm run dist:safari
working-directory: apps/browser
- name: Zip Safari build artifact

View File

@ -40,6 +40,24 @@ jobs:
- name: Print lines of code
run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
electron-verify:
name: Verify Electron Version
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Verify
run: |
PACKAGE_VERSION=$(jq -r .devDependencies.electron package.json)
ELECTRON_BUILDER_VERSION=$(jq -r .electronVersion ./apps/desktop/electron-builder.json)
if [[ "$PACKAGE_VERSION" == "$ELECTRON_BUILDER_VERSION" ]]; then
echo "Versions matches"
else
echo "Version missmatch, package.json: $PACKAGE_VERSION, electron-builder.json: $ELECTRON_BUILDER_VERSION"
exit 1
fi
setup:
name: Setup
@ -102,7 +120,7 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/desktop/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Set Node options
@ -130,6 +148,7 @@ jobs:
- name: Install Node dependencies
run: npm ci
working-directory: ./
- name: Build application
run: npm run dist:lin
@ -195,7 +214,7 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/desktop/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Set Node options
@ -236,6 +255,7 @@ jobs:
- name: Install Node dependencies
run: npm ci
working-directory: ./
- name: Build & Sign (dev)
env:
@ -378,7 +398,7 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/desktop/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Set Node options
@ -480,6 +500,7 @@ jobs:
- name: Install Node dependencies
run: npm ci
working-directory: ./
- name: Build application (dev)
run: npm run build
@ -504,7 +525,7 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/desktop/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Set Node options
@ -604,8 +625,9 @@ jobs:
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER"
$package | ConvertTo-Json -Depth 32 | Set-Content -Path electron-builder.json
- name: NPM install
- name: Install Node dependencies
run: npm ci
working-directory: ./
- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
@ -694,7 +716,7 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/desktop/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Set Node options
@ -794,8 +816,9 @@ jobs:
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER"
$package | ConvertTo-Json -Depth 32 | Set-Content -Path electron-builder.json
- name: NPM install
- name: Install Node dependencies
run: npm ci
working-directory: ./
- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
@ -876,7 +899,7 @@ jobs:
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0
with:
cache: 'npm'
cache-dependency-path: 'apps/desktop/**/package-lock.json'
cache-dependency-path: '**/package-lock.json'
node-version: '16'
- name: Set Node options
@ -976,8 +999,9 @@ jobs:
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER"
$package | ConvertTo-Json -Depth 32 | Set-Content -Path electron-builder.json
- name: NPM install
- name: Install Node dependencies
run: npm ci
working-directory: ./
- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
@ -1074,6 +1098,7 @@ jobs:
runs-on: ubuntu-20.04
needs:
- cloc
- electron-verify
- setup
- linux
- windows
@ -1086,6 +1111,7 @@ jobs:
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }}
env:
CLOC_STATUS: ${{ needs.cloc.result }}
ELECTRON_VERIFY_STATUS: ${{ needs.electron-verify.result }}
SETUP_STATUS: ${{ needs.setup.result }}
LINUX_STATUS: ${{ needs.linux.result }}
WINDOWS_STATUS: ${{ needs.windows.result }}
@ -1096,6 +1122,8 @@ jobs:
run: |
if [ "$CLOC_STATUS" = "failure" ]; then
exit 1
if [ "$ELECTRON_VERIFY_STATUS" = "failure" ]; then
exit 1
elif [ "$SETUP_STATUS" = "failure" ]; then
exit 1
elif [ "$LINUX_STATUS" = "failure" ]; then

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,6 @@
"name": "@bitwarden/browser",
"version": "0.0.0",
"scripts": {
"sub:init": "git submodule update --init --recursive",
"sub:update": "git submodule update --remote",
"sub:pull": "git submodule foreach git pull origin master",
"preinstall": "npm run sub:init",
"build": "webpack",
"build:watch": "webpack --watch",
"build:prod": "cross-env NODE_ENV=production webpack",
@ -20,66 +16,5 @@
"test": "jest",
"test:watch": "jest --watch",
"test:watch:all": "jest --watchAll"
},
"devDependencies": {
"@angular/compiler-cli": "^12.2.13",
"@ngtools/webpack": "^12.2.13",
"@types/chrome": "^0.0.139",
"@types/firefox-webext-browser": "^82.0.0",
"@types/jest": "^27.5.0",
"@types/mousetrap": "^1.6.8",
"@types/node": "^16.11.12",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^10.0.0",
"cross-env": "^7.0.3",
"css-loader": "^6.5.1",
"del": "^6.0.0",
"gulp": "^4.0.2",
"gulp-filter": "^7.0.0",
"gulp-if": "^3.0.0",
"gulp-json-editor": "^2.5.5",
"gulp-replace": "^1.1.0",
"gulp-zip": "^5.1.0",
"html-loader": "^3.0.1",
"html-webpack-plugin": "^5.5.0",
"jest-preset-angular": "^10.1.0",
"mini-css-extract-plugin": "^2.4.5",
"prettier": "^2.5.1",
"process": "^0.11.10",
"sass": "^1.34.1",
"sass-loader": "^12.4.0",
"style-loader": "^3.3.1",
"tapable": "^1.1.3",
"ts-loader": "^9.2.5",
"typescript": "4.3.5",
"url": "^0.11.0",
"util": "^0.12.4",
"webpack": "^5.64.4",
"webpack-cli": "^4.9.1"
},
"dependencies": {
"@angular/animations": "^12.2.13",
"@angular/cdk": "^12.2.13",
"@angular/common": "^12.2.13",
"@angular/compiler": "^12.2.13",
"@angular/core": "^12.2.13",
"@angular/forms": "^12.2.13",
"@angular/platform-browser": "^12.2.13",
"@angular/platform-browser-dynamic": "^12.2.13",
"@angular/router": "^12.2.13",
"@bitwarden/jslib-angular": "file:jslib/angular",
"@bitwarden/jslib-common": "file:jslib/common",
"core-js": "^3.11.0",
"date-input-polyfill": "^2.14.0",
"mousetrap": "^1.6.5",
"ngx-toastr": "14.1.4",
"nord": "^0.2.1",
"sweetalert2": "^10.16.6",
"web-animations-js": "^2.3.2"
},
"engines": {
"node": "~16",
"npm": "~8"
}
}

View File

@ -1,3 +1,6 @@
$icomoon-font-path: "../../../jslib/angular/src/scss/bwicons/fonts/";
$card-icons-base: "../../../jslib/angular/src/images/cards/";
@import "../../../jslib/angular/src/scss/webfonts.css";
@import "../../../jslib/angular/src/scss/bwicons/styles/style.scss";
@import "variables.scss";

View File

@ -176,7 +176,7 @@ const config = {
resolve: {
extensions: [".ts", ".js"],
symlinks: false,
modules: [path.resolve("node_modules")],
modules: [path.resolve("../../node_modules")],
alias: {
sweetalert2: require.resolve("sweetalert2/dist/sweetalert2.js"),
"#sweetalert2": require.resolve("sweetalert2/src/sweetalert2.scss"),

View File

@ -8,6 +8,7 @@
"afterSign": "scripts/after-sign.js",
"asarUnpack": ["**/*.node"],
"files": ["**/*", "!**/node_modules/@bitwarden/desktop-native/**/*"],
"electronVersion": "16.2.7",
"publish": {
"provider": "generic",
"url": "https://artifacts.bitwarden.com/desktop"

File diff suppressed because it is too large Load Diff

View File

@ -17,10 +17,6 @@
"license": "GPL-3.0",
"scripts": {
"start": "cross-env ELECTRON_IS_DEV=0 ELECTRON_NO_UPDATER=1 electron ./build",
"sub:init": "git submodule update --init --recursive",
"sub:update": "git submodule update --remote",
"sub:pull": "git submodule foreach git pull origin master",
"sub:commit": "npm run sub:pull && git commit -am \"update submodule\"",
"preinstall": "npm run sub:init",
"postinstall": "electron-rebuild",
"build": "concurrently -n Main,Rend -c yellow,cyan \"npm run build:main\" \"npm run build:renderer\"",
@ -54,64 +50,5 @@
"publish:win": "npm run build && npm run clean:dist && electron-builder --win --x64 --arm64 --ia32 -p always -c.win.certificateSubjectName=\"8bit Solutions LLC\"",
"publish:win:dev": "npm run build && npm run clean:dist && electron-builder --win --x64 --arm64 --ia32 -p always",
"upload:mas": "xcrun altool --upload-app --type osx --file \"$(find ./dist/mas-universal/Bitwarden*.pkg)\" --username $APPLE_ID_USERNAME --password $APPLE_ID_PASSWORD"
},
"devDependencies": {
"@angular/compiler-cli": "^12.2.13",
"@ngtools/webpack": "^12.2.13",
"@types/node": "^16.11.12",
"@types/node-ipc": "^9.1.4",
"clean-webpack-plugin": "^4.0.0",
"concurrently": "^6.0.2",
"copy-webpack-plugin": "^10.0.0",
"cross-env": "^7.0.3",
"css-loader": "^6.5.1",
"electron-builder": "22.11.7",
"electron-notarize": "^1.1.1",
"electron-rebuild": "^3.2.5",
"electron-reload": "^1.5.0",
"html-loader": "^3.0.1",
"html-webpack-plugin": "^5.5.0",
"husky": "^7.0.4",
"lint-staged": "^12.1.3",
"mini-css-extract-plugin": "^2.4.5",
"node-loader": "^2.0.0",
"rimraf": "^3.0.2",
"sass": "^1.32.11",
"sass-loader": "^12.4.0",
"tapable": "^1.1.3",
"ts-loader": "^9.2.5",
"tsconfig-paths-webpack-plugin": "^3.5.1",
"typescript": "4.3.5",
"webpack": "^5.64.4",
"webpack-cli": "^4.9.1",
"webpack-merge": "^5.8.0"
},
"dependencies": {
"@angular/animations": "^12.2.13",
"@angular/cdk": "^12.2.13",
"@angular/common": "^12.2.13",
"@angular/compiler": "^12.2.13",
"@angular/core": "^12.2.13",
"@angular/forms": "^12.2.13",
"@angular/platform-browser": "^12.2.13",
"@angular/platform-browser-dynamic": "^12.2.13",
"@angular/router": "^12.2.13",
"@bitwarden/jslib-angular": "file:jslib/angular",
"@bitwarden/jslib-common": "file:jslib/common",
"@bitwarden/jslib-electron": "file:jslib/electron",
"@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4",
"forcefocus": "^1.1.0",
"keytar": "^7.9.0",
"ngx-toastr": "14.1.4",
"node-ipc": "^9.1.4",
"nord": "^0.2.1",
"regedit": "^3.0.3",
"rxjs": "^7.4.0",
"sweetalert2": "^10.16.6",
"zone.js": "0.11.4"
},
"engines": {
"node": "~16",
"npm": "~8"
}
}

View File

@ -1,3 +1,6 @@
$icomoon-font-path: "../../jslib/angular/src/scss/bwicons/fonts/";
$card-icons-base: "../../jslib/angular/src/images/cards/";
@import "../../jslib/angular/src/scss/webfonts.css";
@import "../../jslib/angular/src/scss/bwicons/styles/style.scss";
@import "~@angular/cdk/overlay-prebuilt.css";

View File

@ -32,7 +32,7 @@ const common = {
jslib: path.join(__dirname, "jslib/src"),
},
symlinks: false,
modules: [path.resolve("node_modules")],
modules: [path.resolve("../../node_modules")],
},
output: {
filename: "[name].js",

33064
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,24 +13,119 @@
},
"homepage": "https://bitwarden.com",
"scripts": {
"sub:init": "git submodule update --init --recursive",
"preinstall": "npm run sub:init",
"lint": "eslint . && prettier --check .",
"lint:fix": "eslint . --fix",
"prettier": "prettier --write .",
"prepare": "husky install"
},
"devDependencies": {
"@angular/compiler-cli": "^12.2.13",
"@ngtools/webpack": "^12.2.13",
"@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4",
"@types/chrome": "^0.0.139",
"@types/duo_web_sdk": "^2.7.1",
"@types/firefox-webext-browser": "^82.0.0",
"@types/jest": "^27.5.0",
"@types/lunr": "^2.3.4",
"@types/mousetrap": "^1.6.8",
"@types/node": "^16.11.12",
"@types/node-forge": "^1.0.2",
"@types/node-ipc": "^9.2.0",
"@types/papaparse": "^5.3.2",
"@types/tldjs": "^2.3.1",
"@types/zxcvbn": "^4.4.1",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
"concurrently": "^7.2.1",
"copy-webpack-plugin": "^10.0.0",
"cross-env": "^7.0.3",
"css-loader": "^6.5.1",
"del": "^6.0.0",
"electron": "16.2.7",
"electron-builder": "^22.11.7",
"electron-log": "^4.4.7",
"electron-notarize": "^1.2.1",
"electron-rebuild": "^3.2.7",
"electron-reload": "^2.0.0-alpha.1",
"electron-store": "^8.0.1",
"electron-updater": "^5.0.1",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^2.7.1",
"eslint-plugin-import": "^2.26.0",
"forcefocus": "^1.1.0",
"gulp": "^4.0.2",
"gulp-filter": "^7.0.0",
"gulp-if": "^3.0.0",
"gulp-json-editor": "^2.5.5",
"gulp-replace": "^1.1.0",
"gulp-zip": "^5.1.0",
"html-loader": "^3.0.1",
"html-webpack-plugin": "^5.5.0",
"husky": "^7.0.4",
"jasmine-core": "^3.7.1",
"jasmine-spec-reporter": "^7.0.0",
"jest-preset-angular": "^10.1.0",
"keytar": "^7.9.0",
"lint-staged": "^12.4.1",
"prettier": "^2.6.2"
"mini-css-extract-plugin": "^2.4.5",
"node-ipc": "^9.2.1",
"prettier": "^2.6.2",
"process": "^0.11.10",
"regedit": "^3.0.3",
"rimraf": "^3.0.2",
"sass": "^1.34.1",
"sass-loader": "^12.4.0",
"style-loader": "^3.3.1",
"tapable": "^1.1.3",
"ts-loader": "^9.2.5",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"typescript": "4.3.5",
"url": "^0.11.0",
"util": "^0.12.4",
"webpack": "^5.64.4",
"webpack-cli": "^4.9.1"
},
"dependencies": {
"@angular/animations": "^12.2.13",
"@angular/cdk": "^12.2.13",
"@angular/common": "^12.2.13",
"@angular/compiler": "^12.2.13",
"@angular/core": "^12.2.13",
"@angular/forms": "^12.2.13",
"@angular/platform-browser": "^12.2.13",
"@angular/platform-browser-dynamic": "^12.2.13",
"@angular/router": "^12.2.13",
"@microsoft/signalr": "^5.0.17",
"@microsoft/signalr-protocol-msgpack": "^5.0.17",
"big-integer": "^1.6.51",
"browser-hrtime": "^1.1.8",
"core-js": "^3.11.0",
"date-input-polyfill": "^2.14.0",
"duo_web_sdk": "github:duosecurity/duo_web_sdk",
"lunr": "^2.3.9",
"mousetrap": "^1.6.5",
"ngx-toastr": "14.1.4",
"node-forge": "^1.3.1",
"nord": "^0.2.1",
"papaparse": "^5.3.2",
"rxjs": "^7.5.5",
"sweetalert2": "^10.16.6",
"tldjs": "^2.3.1",
"web-animations-js": "^2.3.2",
"zone.js": "^0.11.4",
"zxcvbn": "^4.4.2"
},
"lint-staged": {
"./!(**/jslib)**": "prettier --ignore-unknown --write",
"*.ts": "eslint --fix"
},
"engines": {
"node": "~16",
"npm": "~8"
}
}