Skip to content

Commit

Permalink
Merge branch 'main' into auth/pm-15605/add-opt-out-new-device-protection
Browse files Browse the repository at this point in the history
  • Loading branch information
ike-kottlowski committed Jan 15, 2025
2 parents ed61bfd + ffa5afb commit 3b138c8
Show file tree
Hide file tree
Showing 712 changed files with 17,909 additions and 4,333 deletions.
174 changes: 29 additions & 145 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
"@typescript-eslint/no-this-alias": ["error", { "allowedNames": ["self"] }],
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"no-console": "error",
"import/no-unresolved": "off", // TODO: Look into turning off once each package is an actual package.
Expand Down Expand Up @@ -141,8 +142,7 @@
}
]
}
],
"no-restricted-imports": ["error", { "patterns": ["src/**/*"] }]
]
}
},
{
Expand All @@ -164,147 +164,6 @@
"tailwindcss/no-contradicting-classname": "error"
}
},
{
"files": ["libs/admin-console/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/admin-console/*", "src/**/*"] }
]
}
},
{
"files": ["libs/angular/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/angular/*", "src/**/*"] }]
}
},
{
"files": ["libs/auth/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/auth/*", "src/**/*"] }]
}
},
{
"files": ["libs/billing/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/billing/*", "src/**/*"] }]
}
},
{
"files": ["libs/common/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/common/*", "src/**/*"] }]
}
},
{
"files": ["libs/components/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/components/*", "src/**/*", "@bitwarden/angular/*"] }
]
}
},
{
"files": ["libs/tools/generator/components/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/generator-components/*", "src/**/*"] }
]
}
},
{
"files": ["libs/tools/generator/core/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/generator-core/*", "src/**/*"] }
]
}
},
{
"files": ["libs/tools/generator/extensions/history/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/generator-history/*", "src/**/*"] }
]
}
},
{
"files": ["libs/tools/generator/extensions/legacy/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/generator-legacy/*", "src/**/*"] }
]
}
},
{
"files": ["libs/tools/generator/extensions/navigation/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/generator-navigation/*", "src/**/*"] }
]
}
},
{
"files": ["libs/tools/export/vault-export/vault-export-core/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/vault-export-core/*", "src/**/*"] }
]
}
},
{
"files": ["libs/tools/export/vault-export/vault-export-ui/src/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/vault-export-ui/*", "src/**/*"] }
]
}
},
{
"files": ["libs/importer/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/importer/*", "src/**/*"] }]
}
},
{
"files": ["libs/node/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/node/*", "src/**/*"] }]
}
},
{
"files": ["libs/platform/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/platform/*", "src/**/*"] }]
}
},
{
"files": ["libs/tools/send/send-ui/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/send-ui/*", "src/**/*"] }]
}
},
{
"files": ["libs/tools/card/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/tools-card/*", "src/**/*"] }]
}
},
{
"files": ["libs/vault/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/vault/*", "src/**/*"] }]
}
},
{
"files": ["apps/browser/src/**/*.ts", "libs/**/*.ts"],
"excludedFiles": [
Expand Down Expand Up @@ -344,10 +203,30 @@
]
}
},
{
"files": ["**/src/**/*.ts"],
"excludedFiles": ["**/platform/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": [
"**/platform/**/internal", // General internal pattern
// All features that have been converted to barrel files
"**/platform/messaging/**",
"**/src/**/*" // Prevent relative imports across libs.
]
}
]
}
},
{
"files": ["bitwarden_license/bit-common/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/bit-common/*", "src/**/*"] }]
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/bit-common/*", "**/src/**/*"] }
]
}
},
{
Expand All @@ -357,7 +236,12 @@
"no-restricted-imports": [
"error",
{
"patterns": ["biwarden_license/**", "@bitwarden/bit-common/*", "@bitwarden/bit-web/*"]
"patterns": [
"biwarden_license/**",
"@bitwarden/bit-common/*",
"@bitwarden/bit-web/*",
"**/src/**/*"
]
}
],
// Catches dynamic imports, e.g. in routing modules where modules are lazy-loaded
Expand Down
11 changes: 4 additions & 7 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@
"enabledManagers": ["cargo", "github-actions", "npm"],
"packageRules": [
{
"groupName": "gh minor",
"groupName": "github-action minor",
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["minor", "patch"]
},
{
"matchManagers": ["github-actions"],
"commitMessagePrefix": "[deps] BRE:"
"matchUpdateTypes": ["minor"]
},
{
"matchManagers": ["cargo"],
Expand Down Expand Up @@ -86,6 +82,7 @@
"prettier",
"prettier-plugin-tailwindcss",
"rimraf",
"@storybook/web-components-webpack5",
"tabbable",
"tldts",
"wait-on"
Expand Down Expand Up @@ -210,10 +207,10 @@
"eslint-plugin-storybook",
"eslint-plugin-tailwindcss",
"husky",
"jest-extended",
"jest-junit",
"jest-mock-extended",
"jest-preset-angular",
"jest-diff",
"lint-staged",
"ts-jest"
],
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/brew-bump-desktop.yml

This file was deleted.

12 changes: 2 additions & 10 deletions .github/workflows/build-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@ jobs:
- name: "edge"
npm_command: "dist:edge"
archive_name: "dist-edge.zip"
artifact_name: "dist-edge"
- name: "edge-mv3"
npm_command: "dist:edge:mv3"
archive_name: "dist-edge.zip"
artifact_name: "DO-NOT-USE-FOR-PROD-dist-edge-MV3"
artifact_name: "dist-edge-MV3"
- name: "firefox"
npm_command: "dist:firefox"
archive_name: "dist-firefox.zip"
Expand All @@ -212,11 +208,7 @@ jobs:
- name: "opera"
npm_command: "dist:opera"
archive_name: "dist-opera.zip"
artifact_name: "dist-opera"
- name: "opera-mv3"
npm_command: "dist:opera:mv3"
archive_name: "dist-opera.zip"
artifact_name: "DO-NOT-USE-FOR-PROD-dist-opera-MV3"
artifact_name: "dist-opera-MV3"
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
retrive_secrets_keyvault: ${{ steps.config.outputs.retrive_secrets_keyvault }}
sync_utility: ${{ steps.config.outputs.sync_utility }}
sync_delete_destination_files: ${{ steps.config.outputs.sync_delete_destination_files }}
slack_channel_name: ${{ steps.config.outputs.slack-channel-name }}
slack_channel_name: ${{ steps.config.outputs.slack_channel_name }}
steps:
- name: Configure
id: config
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/repository-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ jobs:
- name: Check out main branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
ref: main
token: ${{ steps.app-token.outputs.token }}

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}

- name: Scan with SonarCloud
uses: sonarsource/sonarcloud-github-action@02ef91109b2d589e757aefcfb2854c2783fd7b19 # v4.0.0
uses: sonarsource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >
-Dsonar.organization=${{ github.repository_owner }}
Expand Down
9 changes: 5 additions & 4 deletions apps/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@bitwarden/browser",
"version": "2025.1.0",
"version": "2025.1.1",
"scripts": {
"build": "npm run build:chrome",
"build:chrome": "cross-env BROWSER=chrome MANIFEST_VERSION=3 webpack",
"build:edge": "cross-env BROWSER=edge webpack",
"build:edge": "cross-env BROWSER=edge MANIFEST_VERSION=3 webpack",
"build:firefox": "cross-env BROWSER=firefox webpack",
"build:opera": "cross-env BROWSER=opera webpack",
"build:opera": "cross-env BROWSER=opera MANIFEST_VERSION=3 webpack",
"build:safari": "cross-env BROWSER=safari webpack",
"build:watch": "npm run build:watch:chrome",
"build:watch:chrome": "npm run build:chrome -- --watch",
Expand All @@ -30,6 +30,7 @@
"dist:safari:mv3": "cross-env MANIFEST_VERSION=3 npm run dist:safari",
"test": "jest",
"test:watch": "jest --watch",
"test:watch:all": "jest --watchAll"
"test:watch:all": "jest --watchAll",
"test:clearCache": "jest --clear-cache"
}
}
2 changes: 1 addition & 1 deletion apps/browser/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-undef */
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
};
Loading

0 comments on commit 3b138c8

Please sign in to comment.