Skip to content

Commit

Permalink
feat: vue2 legacy support (#771)
Browse files Browse the repository at this point in the history
* feat: create legacy charts for vue2 projects

* feat: add configs for legacy folder

* feat: change project configs

* feat: add tests for legacy charts

* feat: fix utils

* feat: fix base charts tests syntax

* feat: add sandboxes for vue2 charts

* fix: remove legacy prefix from vue2 components

* fix: change build configs

* fix: fix ci tests config

* feat: update build config and tune package folders
  • Loading branch information
thabarbados committed Mar 23, 2022
1 parent 67e73a0 commit 5c9a69c
Show file tree
Hide file tree
Showing 79 changed files with 6,561 additions and 63 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -21,5 +21,8 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install dependencies to legacy folder
working-directory: legacy
run: pnpm install
- name: Run tests
run: pnpm test
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -14,3 +14,9 @@ npm-debug.log*

# testing
coverage

# legacy builds
/legacy/index.cjs
/legacy/index.cjs.map
/legacy/index.js
/legacy/index.js.map
3 changes: 3 additions & 0 deletions legacy/.babelrc
@@ -0,0 +1,3 @@
{
"extends": "../.babelrc"
}
25 changes: 25 additions & 0 deletions legacy/jest.config.json
@@ -0,0 +1,25 @@
{
"testEnvironment": "jsdom",
"setupFiles": ["<rootDir>/../test/setup.js"],
"testMatch": ["<rootDir>/test/(*.)spec.(js|ts)"],
"moduleFileExtensions": ["js", "ts", "vue"],
"transform": {
"^.+\\.vue$": "@vue/vue2-jest",
"^.+\\.(t|j)sx?$": [
"@swc/jest",
{
"module": {
"type": "commonjs"
},
"env": {
"targets": {
"node": 12
}
}
}
]
},
"collectCoverage": true,
"collectCoverageFrom": ["<rootDir>/src/**/*"],
"coverageReporters": ["lcovonly", "text"]
}
22 changes: 22 additions & 0 deletions legacy/package.json
@@ -0,0 +1,22 @@
{
"main": "./legacy/src/index.js",
"publishConfig": {
"main": "./legacy/index.cjs",
"module": "./legacy/index.js"
},
"scripts": {
"unit": "jest -c jest.config.json"
},
"devDependencies": {
"@babel/core": "7.16.5",
"@swc/core": "1.2.120",
"@swc/jest": "0.2.15",
"@vue/test-utils": "1.3.0",
"@vue/vue2-jest": "27.0.0-alpha.4",
"babel-jest": "27.4.5",
"css-loader": "0.28.0",
"jest": "27.4.3",
"vue": "2.6.14",
"vue-template-compiler": "2.6.14"
}
}

0 comments on commit 5c9a69c

Please sign in to comment.