Migrated webpack to vite.
Replaced jest with vitest (because I couldn't resolve 'import.meta' issue)
Replaced legacy vue-svg-loader with vite-svg-loader
Replaced bip39 dep with bip39-english (it includes only english wordlist)
Replaced aws-sdk v2 with aws-sdk V3 (because v2 was throwing some weird error in console. Ref: https://stackoverflow.com/questions/75107933/aws-sdk-contributes-to-build-error-uncaught-typeerror-e-is-not-a-constructor)
Renamed VUE_APP_ENDPOINT_URL env variable to VITE_ENDPOINT_URL
Removed a ton of dependencies (like babel and jest-related stuff).
Tested in Chrome, Safari, Brave, Firefox and Opera browsers.
Additionally fixed logout errors from buckets and object browser routes.
TODO: try to remove util and stream-browserify dependencies and see if it works
Change-Id: I4562649a59eb0ba80c1a672d55c59fceb8c80b23
We decided to remove sanitizing dependency and restrict v-html with 2 exceptions for web/satellite (we control the content in those cases)
Issue:
https://github.com/storj/storj-private/issues/148
Change-Id: Ic6b2e894d20e7f0553f759ede51845a10831e890
Added rule to restrict trailing white spaces.
Added rule to always use '===' instead of '=='.
Added rule to have correct spacing around commas.
Added rule to have spaces around '=>'.
Added rule to not have spaces in parentheses.
Added rule to have space before blocks '{}'.
Change-Id: Ibdbd204d591f0356e0745d89672e0e0579b59ce1
This change updates VInput with composition API, and fix resulting test failures.
see: https://github.com/storj/storj/issues/5115
Change-Id: Ic6870f4faef51de168ef077952b7ce6a39562e6e
This change updates VButton with composition API, updates .eslintrc.js to ignore resulting import errors, and fix resulting test failures.
see: https://github.com/storj/storj/issues/5114
Change-Id: Iaf9e8323333c797936d3acb38dd32f6e27d1ed08
we want sign up page to be more configurable since we have to add partner branding to it.
added ability to add logo, different title and decpription and even html after common markup.
v-html rule disabled and sanitize plusin added to avoid xss injections.
tsconfig changed to be able to load modules from json files.
Change-Id: I9ff2cf6e5cf977b8c41ca48953b491bd361f26a1
This contains also multiple fixes to make it work.
The following is a non-exhaustive list.
When @Prop default value is a callback, then it is called
instead of set verbatim. This means, when you want a default
value to be a callback, then it needs to be `default: () => () => X`.
jest does not yet properly support WebWorkers, hence the code introduces
an indirection to provide the worker URL.
This in turn required removing the global "store" dependency from
the tests. As a consequence the new NotificatorPlugin takes store
as a dependency. And many of the tests are adjusted to not import
store directly.
Moved StoreModule definition to avoid initializing the global store.
Some of the router code was moved into store. We can later figure out
how to structure it better and move it back.
bip39 needs explicit fallbacks for some of the dependencies.
Fixes to timer mocking. jest supports it natively.
Remove sinon dependency. jest provides all the functionality we need.
Change-Id: I7af3599390c63ce9f99dbd0b1e0870e9f8ca994d
Also ignore coverage folder for linting. I had to add a new
.stylelintignore file, because ignoreFiles property was not properly
working.
Change-Id: Iadd99b64eadd9c4103f750519263113ae8780ce1
The components used in templates should always be included in the
component declaration. Similarly, it shouldn't contain extra components
to avoid compiling in components that aren't needed.
Change-Id: I8c47ceffa8bcbcca223ac0f538f9e30d1e849829
Some linters do not work properly without those annotations.
This was done with a batch replace.
Also needed to turn off two lint rules, they will be re-enabled in the
followup change. This way the batch change can be clearly separated from
manual modifications.
Change-Id: I891ae09689520edaba5588c1f2206766db2d2b90
Fix svg.d.ts definition.
Disable no-explicit-any in src/api, because wrangling all the GraphQL
result types properly is not that nice. We can either fix this later
manually, generate GraphQL types or remove the GraphQL endpoints.
Add annotations to src/store/. Currently it still uses any in places and
also defines more types than absolutely necessary. This is an
unfortunate side-effect of the vuex api. There does seem to be an
alternative package that handles them, but to minimize the number of
changes, we'll currently use these types. Due to those decisions it's
also not easily possible to have types instead of any in multiple
places.
StripeCardInput currently uses any, however, if we find the proper
declarations, we can replace them later.
Change-Id: I2ec8bf7fdd8023129d1f8739ce2b6d97de2a58d0
Fixes two things:
All button tags must have type field specified, otherwise it defaults to
submit, which is mostly not correct for our site.
Disallows unused refs.
Change-Id: I28bb44aab9c153f83fec16fc4023a453444c3926
After migrating to eslint some errors were disabled to make it easier to
migrate.
This enables all the lint rules and treats all warnings as a build
failure. Similarly, CI won't automatically try to fix mistakes.
Change-Id: I80f808af026fc51bed90421b3b24737994a52094
tslint has been deprecated so it's nice to switch to eslint.
Currently this uses a minimal eslint, to get things up and running.
node-sass requires C which does not work nicely on all platforms.
Change-Id: I3ca9adf2971475c009e541652b7637c18ad960f4