diff --git a/README.md b/README.md index a7e7e678a..4b12c53eb 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ ## Project setup ``` -npm install -g pnpm +npm install -g pnpm@9 pnpm install ``` ### Compiles and hot-reloads for development ``` -pnpm run serve +pnpm run dev ``` ### Compiles and minifies for production diff --git a/app/.env.example b/app/.env.example index a65f1327b..6fc434521 100644 --- a/app/.env.example +++ b/app/.env.example @@ -3,7 +3,6 @@ VUE_APP_PATH="/" #vaults web-url VUE_APP_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/" VUE_APP_AUTH_WEB_URL="https://dev.account.bcregistry.gov.bc.ca/" -VUE_APP_BUSINESSES_URL="https://dev.account.bcregistry.gov.bc.ca/" VUE_APP_CORPORATE_ONLINE_URL="https://www.corporateonline.gov.bc.ca" VUE_APP_BUSINESS_DASH_URL="https://dev.business-dashboard.bcregistry.gov.bc.ca/" VUE_APP_BUSINESS_REGISTRY_URL="https://dev.business-registry-dashboard.bcregistry.gov.bc.ca/" @@ -27,7 +26,7 @@ VUE_APP_NAMEX_API_VERSION="/api/v1" VUE_APP_NAMEX_API_KEY= VUE_APP_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca" VUE_APP_STATUS_API_VERSION="/api/v1" -VUE_APP_REGISTRIES_SEARCH_API_URL="https://bcregistry-dev.apigee.net/registry-search" +VUE_APP_REGISTRIES_SEARCH_API_URL="https://test.api.connect.gov.bc.ca/registry-search-dev" VUE_APP_REGISTRIES_SEARCH_API_VERSION_2="/api/v2" VUE_APP_REGISTRIES_SEARCH_API_KEY= @@ -40,9 +39,9 @@ VUE_APP_KEYCLOAK_REALM="bcregistry" VUE_APP_KEYCLOAK_CLIENTID="name-requests-web" VUE_APP_AUTH_TOKEN_URL="https://dev.loginproxy.gov.bc.ca/auth/realms/bcregistry/protocol/openid-connect/token" -#vaults webchat +#vaults name-request VUE_APP_HOTJAR_ID="" -VUE_APP_QUICK_SEARCH_PUBLIC_ID="" +VUE_APP_QUICK_SEARCH_PUBLIC_ID="namex-solr-service-account" VUE_APP_QUICK_SEARCH_PUBLIC_SECRET="" #vaults webchat diff --git a/app/.eslintrc.js b/app/.eslintrc.js index 53d4a57e8..33acdc9e5 100644 --- a/app/.eslintrc.js +++ b/app/.eslintrc.js @@ -47,10 +47,7 @@ module.exports = { files: [ '**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)' - ], - env: { - jest: true - } + ] } ] } diff --git a/app/babel.config.js b/app/babel.config.js index 053075b1a..6925be40b 100644 --- a/app/babel.config.js +++ b/app/babel.config.js @@ -1,6 +1,3 @@ module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ], plugins: ['@babel/plugin-proposal-private-methods'] } diff --git a/app/devops/vaults.env b/app/devops/vaults.env index d8ced22fc..cd9e81721 100644 --- a/app/devops/vaults.env +++ b/app/devops/vaults.env @@ -4,7 +4,6 @@ VUE_APP_PATH=/ #vaults web-url VUE_APP_REGISTRY_HOME_URL="op://web-url/$APP_ENV/registry/REGISTRY_HOME_URL" VUE_APP_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL" -VUE_APP_BUSINESSES_URL="op://web-url/$APP_ENV/business/BUSINESSES_URL" VUE_APP_CORPORATE_ONLINE_URL="op://web-url/$APP_ENV/bcregistry/COLIN_URL" VUE_APP_BUSINESS_DASH_URL="op://web-url/$APP_ENV/business-dash/BUSINESS_DASH_URL" VUE_APP_BUSINESS_REGISTRY_URL="op://web-url/$APP_ENV/business-registry-ui/BUSINESS_REGISTRY_URL" @@ -41,7 +40,7 @@ VUE_APP_KEYCLOAK_REALM="op://keycloak/$APP_ENV/base/KEYCLOAK_REALMNAME" VUE_APP_KEYCLOAK_CLIENTID="op://keycloak/$APP_ENV/name-requests-web/UI_KEYCLOAK_RESOURCE_NAME" VUE_APP_AUTH_TOKEN_URL="op://keycloak/$APP_ENV/base/KEYCLOAK_AUTH_TOKEN_URL" -#vaults webchat +#vaults name-request VUE_APP_HOTJAR_ID="op://name-request/$APP_ENV/ui/HOTJAR_ID" VUE_APP_QUICK_SEARCH_PUBLIC_ID="op://name-request/$APP_ENV/ui/QUICK_SEARCH_PUBLIC_ID" VUE_APP_QUICK_SEARCH_PUBLIC_SECRET="op://name-request/$APP_ENV/ui/QUICK_SEARCH_PUBLIC_SECRET" diff --git a/app/public/index.html b/app/index.html similarity index 72% rename from app/public/index.html rename to app/index.html index 8a288deb6..72459311a 100644 --- a/app/public/index.html +++ b/app/index.html @@ -4,9 +4,7 @@ - - - + Name Request @@ -17,6 +15,6 @@
- + diff --git a/app/jest.config.js b/app/jest.config.js deleted file mode 100644 index 06918bfbf..000000000 --- a/app/jest.config.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - globals: { - 'ts-jest': { - diagnostics: false, - isolatedModules: true, - babelConfig: true - } - }, - preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel', - setupFiles: ['/tests/setup.ts'], - // notify: true, - // notifyMode: 'always', - transformIgnorePatterns: [] -} diff --git a/app/package.json b/app/package.json index b94f5431e..70b7095cc 100644 --- a/app/package.json +++ b/app/package.json @@ -1,17 +1,19 @@ { "name": "name-request", - "version": "5.5.45", + "version": "5.8.7", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", "scripts": { - "serve": "vue-cli-service serve", - "build": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build", - "test": "vue-cli-service test:unit --verbose --coverage", - "test:unit": "vue-cli-service test:unit --testPathPattern --coverage", - "lint": "vue-cli-service lint", - "lint:nofix": "vue-cli-service lint --no-fix", - "build-check": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build" + "dev": "vite", + "build": "vite build", + "build-check": "vite build", + "preview": "vite preview --port 8080", + "lint": "eslint . --ext js,ts,vue --no-fix", + "test": "vitest run", + "test:unit": "vitest run", + "test:watch": "vitest watch", + "test:coverage": "vitest run --coverage" }, "dependencies": { "@babel/compat-data": "^7.24.4", @@ -25,18 +27,18 @@ "@bcrs-shared-components/web-chat": "2.0.0", "@mdi/font": "^4.9.95", "axios": "^0.27.2", - "babel-plugin-transform-decorators": "^6.24.1", "core-js": "^3.37.0", "http-status-codes": "^1.4.0", - "launchdarkly-js-client-sdk": "^2.24.2", + "launchdarkly-js-client-sdk": "^3.9.0", "lodash": "^4.17.21", + "pinia": "^2.0.35", + "pinia-class": "^0.0.3", "qs": "^6.12.1", "quill": "^2.0.0", "remove-accents": "^0.4.4", "sbc-common-components": "3.0.15-c", - "style-loader": "^1.3.0", - "tslib": "^2.6.2", - "vue": "2.7.10", + "tslib": "^2.8.1", + "vue": "2.7.16", "vue-contenteditable": "^1.0.2", "vue-hotjar": "^1.4.0", "vue-quill-editor": "^3.0.6", @@ -46,49 +48,42 @@ }, "devDependencies": { "@babel/plugin-proposal-private-methods": "^7.18.6", - "@types/jest": "^27.5.2", - "@types/lodash": "^4.17.0", - "@types/node": "^20.12.7", + "@esbuild-plugins/node-modules-polyfill": "0.2.2", + "@pinia/testing": "^0.0.16", + "@types/lodash": "^4.17.7", + "@types/node": "^20.19.18", "@types/sinon": "^10.0.20", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "@volar-plugins/vetur": "latest", - "@vue/cli-plugin-babel": "^5.0.8", - "@vue/cli-plugin-eslint": "^5.0.8", - "@vue/cli-plugin-router": "^5.0.8", - "@vue/cli-plugin-typescript": "^5.0.8", - "@vue/cli-plugin-unit-jest": "^5.0.8", - "@vue/cli-plugin-vuex": "^5.0.8", - "@vue/cli-service": "^5.0.8", + "@vitejs/plugin-vue2": "^2.2.0", "@vue/eslint-config-standard": "^4.0.0", "@vue/eslint-config-typescript": "^9.1.0", "@vue/test-utils": "^1.3.6", - "@vue/vue2-jest": "^27.0.0", "cross-env": "^7.0.3", "eslint": "~7.32.0", "eslint-plugin-vue": "^8.7.1", "eslint-plugin-vuetify": "^1.1.0", + "jsdom": "^22.1.0", "json-server": "^0.15.1", - "postcss-loader": "^8.1.1", - "sass": "~1.32.13", - "sass-loader": "^10.5.2", + "sass": "~1.59.3", "sinon": "^14.0.2", - "ts-jest": "^27.1.5", "typescript": "4.5.5", - "vue-class-component": "^7.2.6", - "vue-cli-plugin-vuetify": "^2.5.8", + "vite": "4.5.2", + "vite-plugin-environment": "^1.1.3", + "vitest": "0.33.0", + "volar-service-vetur": "^0.0.62", "vue-debounce-decorator": "^1.0.1", "vue-property-decorator": "^9.1.2", - "vue-template-compiler": "2.7.10", - "vuetify-loader": "^1.9.2", + "vue-test-utils-helpers": "git+https://github.com/bcgov/vue-test-utils-helpers.git", "vuex-class": "^0.3.2", - "vuex-module-decorators": "^1.2.0", - "webpack": "~5.78.0", - "webpack-bundle-analyzer": "^3.9.0" + "vuex-module-decorators": "^1.2.0" }, "pnpm": { "patchedDependencies": { "sbc-common-components@3.0.15-c": "patches/sbc-common-components@3.0.15-c.patch" - } + }, + "onlyBuiltDependencies": [ + "vue-demi" + ] } } diff --git a/app/patches/sbc-common-components@3.0.15-c.patch b/app/patches/sbc-common-components@3.0.15-c.patch index 01244b0b4..48cb46b05 100644 --- a/app/patches/sbc-common-components@3.0.15-c.patch +++ b/app/patches/sbc-common-components@3.0.15-c.patch @@ -1,16 +1,27 @@ +diff --git a/src/components/SbcFooter.vue b/src/components/SbcFooter.vue +index 6fa4d2304bce52930cb6ed1007c108ba2dee30b2..15cacbeec27ff058eabaa3feb006416829ebc1d1 100644 +--- a/src/components/SbcFooter.vue ++++ b/src/components/SbcFooter.vue +@@ -4,7 +4,6 @@ +