Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue 3 + Vite migration #211

Open
wants to merge 118 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 117 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
a99f75f
initial commit. builds, tests work, storybook runs, but styling does …
skylermcnamee-hibc May 27, 2024
61aa029
remove purple background color test
skylermcnamee-hibc May 28, 2024
b9e56b5
move storybook.js imports into preview.js
skylermcnamee-hibc May 28, 2024
04fd7b0
switch header component from storybook default to existing common lib…
skylermcnamee-hibc May 28, 2024
f6d47a9
update image path for different file structure
skylermcnamee-hibc May 28, 2024
5088420
add storybook addon mock plugin to storybook
skylermcnamee-hibc May 28, 2024
a7926bd
move components out of stories folder, delete unused
skylermcnamee-hibc May 28, 2024
d218436
remove unneeded import/syntax
skylermcnamee-hibc May 28, 2024
9f8ce95
remove commented out mock
skylermcnamee-hibc May 28, 2024
4671d97
fix formatting, disable no-import-assign rule since it's needed for c…
skylermcnamee-hibc May 29, 2024
6100687
prettier formatting fixes
skylermcnamee-hibc May 29, 2024
e43f142
update import to work with vite
skylermcnamee-hibc May 29, 2024
5e93d93
bump a bunch of packages to their latest versions
skylermcnamee-hibc May 29, 2024
9f8b399
add code to compensate for webpack absence
skylermcnamee-hibc May 29, 2024
5263821
add vitest web worker to get web workers working in file uploader com…
skylermcnamee-hibc May 30, 2024
7ff2448
update documentation syntax for new storybook version
skylermcnamee-hibc Jun 3, 2024
4896747
remove old documentation format
skylermcnamee-hibc Jun 3, 2024
9a4ee23
upgrade pdfjs version to 4.3.136
skylermcnamee-hibc Jun 3, 2024
ca9afd6
update pdfjs workersrc import
skylermcnamee-hibc Jun 3, 2024
f348476
remove autodocs from storybook
skylermcnamee-hibc Jun 3, 2024
59eb99f
upgrade storybook version to 8.1.5
skylermcnamee-hibc Jun 3, 2024
b15ac42
update vitejs plugin vue
skylermcnamee-hibc Jun 3, 2024
2dab7aa
upgrade and run prettier
skylermcnamee-hibc Jun 3, 2024
a8d6f04
regenerate package lock
skylermcnamee-hibc Jun 3, 2024
e95a798
remove private from the package.json so it can go on npm
skylermcnamee-hibc Jun 27, 2024
29bb39c
rename default style name for backwards compatibility
skylermcnamee-hibc Jun 27, 2024
31e3782
switch bcgov bootstrap theme to v5, update references
skylermcnamee-hibc Jun 28, 2024
1a38a8e
fixes to make console errors go away
skylermcnamee-hibc Jul 4, 2024
36d23a5
fix cypress settings to work with storybook
skylermcnamee-hibc Jul 16, 2024
a921cff
add e2e tests for FileUploader component for browser verification
skylermcnamee-hibc Jul 16, 2024
eb014c6
add promise.withResolvers polyfill
skylermcnamee-hibc Jul 16, 2024
4154e94
upgrade vitest version, add vitest coverage
skylermcnamee-hibc Jul 17, 2024
c464edd
add coverage to test script, exclude relevant files
skylermcnamee-hibc Jul 17, 2024
f3d17cd
update README
skylermcnamee-hibc Jul 17, 2024
177d6f8
set minimum node version
skylermcnamee-hibc Jul 17, 2024
b323f30
fix linting issues
skylermcnamee-hibc Jul 17, 2024
c047d6c
update button file name, references to fix lint issues
skylermcnamee-hibc Jul 17, 2024
206f17e
update readme
skylermcnamee-hibc Jul 17, 2024
6f5c08c
add trailing space
skylermcnamee-hibc Jul 17, 2024
d9db5b4
update button component references
skylermcnamee-hibc Jul 18, 2024
c34cd3e
update button unit test
skylermcnamee-hibc Jul 18, 2024
4bc9d9b
rename file from button to button component for better linting
skylermcnamee-hibc Jul 18, 2024
0417998
update storybook stories to use button component
skylermcnamee-hibc Jul 18, 2024
81b7888
rename button component storybook story
skylermcnamee-hibc Jul 18, 2024
47afdf0
update button references in story
skylermcnamee-hibc Jul 18, 2024
316ef64
regenerate package lock, make engine a warning rather than strict error
skylermcnamee-hibc Jul 18, 2024
7e20af8
Merge remote-tracking branch 'localCommits/master' into vite-migration
skylermcnamee-hibc Jul 29, 2024
070ffff
update git ignore to include more entries
skylermcnamee-hibc Jul 29, 2024
c64deca
remove files that committed to the wrong location
skylermcnamee-hibc Jul 30, 2024
0670687
remove bundled code from docs
skylermcnamee-hibc Jul 30, 2024
9ed1d31
remove duplicate assets
skylermcnamee-hibc Jul 30, 2024
3995c0d
remove duplicate assets from docs folder
skylermcnamee-hibc Jul 30, 2024
9d743be
remove static media from docs
skylermcnamee-hibc Jul 30, 2024
df7123b
remove unneeded fonts and such from the docs folder
skylermcnamee-hibc Jul 30, 2024
1b86107
remove files that have been moved
skylermcnamee-hibc Jul 31, 2024
d9a3fe1
update location for storybook stories, storybook assets, storybook docs
skylermcnamee-hibc Jul 31, 2024
2d011ee
update unit tests for vitest
skylermcnamee-hibc Jul 31, 2024
0c9d263
migrate config files from vue cli to vite
skylermcnamee-hibc Jul 31, 2024
17675b4
update pull request template, node version in build scripts
skylermcnamee-hibc Jul 31, 2024
0c4a645
storybook setting updates for vite
skylermcnamee-hibc Jul 31, 2024
2656506
add cypress file uploader test
skylermcnamee-hibc Jul 31, 2024
f555eb1
update component names to be linter compliant, formatting fixes
skylermcnamee-hibc Jul 31, 2024
150bc90
rename component file names to comply with linter
skylermcnamee-hibc Jul 31, 2024
2a1a836
update unit test references
skylermcnamee-hibc Jul 31, 2024
4a6c84b
update prettier settings
skylermcnamee-hibc Jul 31, 2024
8a4bcfc
formatting fixes for components and stories
skylermcnamee-hibc Jul 31, 2024
48141ab
remove unused components
skylermcnamee-hibc Jul 31, 2024
24e3908
update README
skylermcnamee-hibc Jul 31, 2024
460011a
disable telemetry, update formatting
skylermcnamee-hibc Jul 31, 2024
c473371
update package.json, package lock
skylermcnamee-hibc Jul 31, 2024
95b4fc4
add test script for git workflow
skylermcnamee-hibc Jul 31, 2024
41f9a8a
update button styling to match bootstrap v5 changes, remove extra X f…
skylermcnamee-hibc Aug 9, 2024
eb00000
update unit test to use new style
skylermcnamee-hibc Aug 9, 2024
366bd7e
update button to button component reference in storybook story
skylermcnamee-hibc Aug 9, 2024
7cd2e5a
update reference in index.html since main.js obviously doesn't exist …
skylermcnamee-hibc Aug 9, 2024
4d1df39
upgrade bootstrap dev dependency, remove unneeded polyfills
skylermcnamee-hibc Aug 9, 2024
9e74b43
fix linting on .yaml file
skylermcnamee-hibc Aug 12, 2024
4c95389
add recommended .vscode extensions
skylermcnamee-hibc Aug 12, 2024
3a09527
prettier fixes in components + unit tests
skylermcnamee-hibc Aug 12, 2024
a4c1291
prettier formatting fixes
skylermcnamee-hibc Aug 12, 2024
042648e
prettier yaml formatting fixes
skylermcnamee-hibc Aug 12, 2024
6bea28a
migrate from eslintrc.cjs to new flat config format
skylermcnamee-hibc Aug 12, 2024
49a4d42
update package.json scripts, remove unneeded dev dependencies, add es…
skylermcnamee-hibc Aug 12, 2024
6bcf3bd
remove unneeded package, update npm scripts, update documentation
skylermcnamee-hibc Aug 13, 2024
db5f4f0
remove unneeded storybook addon, remove related comment from storyboo…
skylermcnamee-hibc Aug 13, 2024
68f4b26
update workflow to include e2e tests and lint check
skylermcnamee-hibc Aug 13, 2024
98a93c6
update prettier settings to work with vue eslint settings
skylermcnamee-hibc Aug 13, 2024
7184567
add default value and remove template shadowing from Textarea and Tim…
skylermcnamee-hibc Aug 13, 2024
753f62c
lint fixes
skylermcnamee-hibc Aug 13, 2024
2bbb68a
fix image reference in ContentModal.stories.js
skylermcnamee-hibc Aug 13, 2024
f32d07d
upgrade to latest version of axios
skylermcnamee-hibc Aug 20, 2024
1197674
npm run format
skylermcnamee-hibc Aug 20, 2024
1df59fd
fix eslint settings to work better with prettier
skylermcnamee-hibc Aug 20, 2024
d80c01c
fix captcha story, add mock requests
skylermcnamee-hibc Aug 20, 2024
ad78839
replace v-html directives with more secure alternatives, update eslin…
skylermcnamee-hibc Aug 21, 2024
4d77f17
update readme with v-html info
skylermcnamee-hibc Aug 21, 2024
2909499
fix formatting
skylermcnamee-hibc Aug 21, 2024
5363609
bump some dependency versions to use the latest
skylermcnamee-hibc Aug 22, 2024
e7fef68
freshen up the package lock
skylermcnamee-hibc Aug 22, 2024
a940c2b
remove old eslint document
skylermcnamee-hibc Aug 22, 2024
574c69c
add husky, lint-staged pre-commit checks
skylermcnamee-hibc Aug 22, 2024
3398b33
remove unneeded code
skylermcnamee-hibc Aug 22, 2024
f2e688f
refactor pageStepper story so the back and next buttons work
skylermcnamee-hibc Aug 22, 2024
439ce44
remove unneeded code
skylermcnamee-hibc Aug 23, 2024
15cb44e
update component styling for bootstrap 5
skylermcnamee-hibc Aug 23, 2024
890f484
comment out styling in component stories so they match the other comp…
skylermcnamee-hibc Aug 23, 2024
9c8f832
fix contentModal title for vue 3, add cypress tests and values for ch…
skylermcnamee-hibc Aug 23, 2024
4eac30b
add alpha suffix to package version
skylermcnamee-hibc Sep 3, 2024
fd87d97
Revert "add alpha suffix to package version"
skylermcnamee-hibc Sep 3, 2024
071146e
3.1.1-alpha.0
skylermcnamee-hibc Sep 3, 2024
23fb028
add chevron icons to package export
skylermcnamee-hibc Oct 8, 2024
219f231
3.1.1-alpha.1
skylermcnamee-hibc Oct 8, 2024
346ba36
add disabled styling to radio component
skylermcnamee-hibc Oct 15, 2024
9cdc9fe
add print page component + stories + test to common library
skylermcnamee-hibc Oct 16, 2024
dd2c333
fix icon color in print page component, update unit test
skylermcnamee-hibc Oct 16, 2024
2addaa5
add validationMessage component + stories + test
skylermcnamee-hibc Oct 16, 2024
292d47a
add new components to library exports
skylermcnamee-hibc Oct 16, 2024
ebe3894
version bump 3.1.1-alpha.1 to 3.1.1-alpha.2
skylermcnamee-hibc Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
- [ ] `npm run build` passes
- [ ] `npm run storybook` still works
- [ ] `npm run lint` has no unexpected errors
- [ ] `npm run format` was run on changed files
- [ ] All existing unit tests were run and still pass
- [ ] End-to-end tests were run and still pass in Chrome, Firefox, and Edge without unexpected console errors (`npm run test:e2e`)

### Please specify the type of change this PR introduces (Bug fix, feature addition, content update, chore, etc.):

Expand Down
50 changes: 26 additions & 24 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,36 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, and build
run: |
npm ci
npm run build
env:
CI: true
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, and build
run: |
npm ci
npm run build
env:
CI: true
test:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
node-version: [12.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, and build
run: |
npm ci
npm run test
env:
CI: true
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Unit tests
run: npm run test:unit
- name: E2E tests
run: npm run test:e2e:headless
- name: LINTing
run: npm run lint
4 changes: 2 additions & 2 deletions .github/workflows/npm-audit-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: npm audit workflow
on:
push:
# branches:
# - main
# - main
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
Expand All @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@main
with:
node-version: "12"
node-version: "22"
- name: install dependencies
run: npm ci
- uses: oke-py/npm-audit-action@v1.8.2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Storybook: Build and Deploy'
on:
name: "Storybook: Build and Deploy"
on:
push:
branches: [main]
paths: ["stories/**", "src/components/**"] # Trigger the action only when files change in the folders defined here
Expand All @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [22.x]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
Expand Down
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
Expand All @@ -19,6 +20,9 @@ pids
lib-cov

# Coverage directory used by tools like istanbul
.DS_Store
dist
dist-ssr
coverage
*.lcov

Expand Down Expand Up @@ -46,6 +50,7 @@ typings/

# TypeScript cache
*.tsbuildinfo
*.local

# Optional npm cache directory
.npm
Expand All @@ -58,6 +63,8 @@ typings/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
/cypress/videos/
/cypress/screenshots/

# Optional REPL history
.node_repl_history
Expand Down Expand Up @@ -105,3 +112,15 @@ dist

# Storybook build path
docs-build/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*storybook.log
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lint-staged
#uncomment the next line to test the pre-commit function without actually committing
#exit 1
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,ts,jsx,tsx,vue,cjs}": ["eslint ."],
"*": ["prettier . --check --ignore-unknown"]
}
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": true,
"tabWidth": 2,
"singleQuote": false,
"printWidth": 100,
"trailingComma": "es5",
"singleAttributePerLine": true
}
30 changes: 18 additions & 12 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
module.exports = {
"stories": [
"../stories/storybook.js",
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"storybook-addon-mock/register",
]
}
/** @type { import('@storybook/vue3-vite').StorybookConfig } */
const config = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],

addons: ["@storybook/addon-essentials", "storybook-addon-mock"],

framework: {
name: "@storybook/vue3-vite",
options: {},
},

core: {
disableTelemetry: true, // 👈 Disables telemetry
},

docs: {},
};
export default config;
19 changes: 12 additions & 7 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import "@/styles/styles.css";
import "@bcgov/bootstrap-v5-theme/css/bootstrap-theme.min.css";

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}
};

export default preview;
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"vue.volar",
"dbaeumer.vscode-eslint",
"ms-vscode-remote.remote-wsl"
],
"unwantedRecommendations": []
}
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
4 changes: 2 additions & 2 deletions COMPLIANCE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |
spec:
- name: PIA
status: PIA_STATUS_HERE
last-updated: '2021-02-26T21:05:21.110Z'
last-updated: "2021-02-26T21:05:21.110Z"
- name: STRA
status: STRA_STATUS_HERE
last-updated: '2021-02-26T21:05:21.110Z'
last-updated: "2021-02-26T21:05:21.110Z"
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## How to contribute
Government employees, public and members of the private sector are encouraged to contribute to the repository by **forking and submitting a pull request**.

(If you are new to GitHub, you might start with a [basic tutorial](https://help.github.com/articles/set-up-git) and check out a more detailed guide to [pull requests](https://help.github.com/articles/using-pull-requests/).)
Government employees, public and members of the private sector are encouraged to contribute to the repository by **forking and submitting a pull request**.

(If you are new to GitHub, you might start with a [basic tutorial](https://help.github.com/articles/set-up-git) and check out a more detailed guide to [pull requests](https://help.github.com/articles/using-pull-requests/).)

Pull requests will be evaluated by the repository guardians on a schedule and if deemed beneficial will be committed to the master.

Expand Down
Loading
Loading