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

chore(all): Upgrade Dependencies #612

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ module.exports = {
'packages/**/tests.ts',
'packages/**/*.test.ts',
'packages/kotti-ui/source/test-utils/**/*.ts',
'packages/storybook/**/*',
],
env: {
jest: true,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Build @3yourmind/vue-use-tippy
run: yarn workspace @3yourmind/vue-use-tippy run build
- name: Run tests
run: yarn run test
run: yarn run check:jest
prettier:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ dist/
gh-pages/
node_modules/
packages/kotti-ui/report.*.html
packages/storybook/storybook-static
packages/yoco/fonts/
yarn-error.log
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ yarn run check:stylelint
### Testing

```bash
yarn run test
yarn run check:jest
```

### Publish
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.15.4",
"@babel/preset-typescript": "^7.15.0",
"@types/jest": "^27.0.1",
"@types/jest": "^27.4.1",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@typescript-eslint/parser": "^4.31.0",
"@vue/eslint-config-typescript": "^5.0.2",
Expand All @@ -66,21 +66,21 @@
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"concurrently": "^6.2.0",
"es-check": "^6.0.0",
"concurrently": "^7.0.0",
"es-check": "^6.2.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-vue": "^6.1.2",
"husky": "^7.0.1",
"jest": "^27.1.0",
"husky": "^7.0.4",
"jest": "^27.5.1",
"jsdom-global": "^3.0.2",
"lerna": "^4.0.0",
"lint-staged": "^11.0.1",
"nodemon": "^2.0.12",
"nodemon": "^2.0.15",
"postcss": "^8.2.10",
"prettier": "^2.6.1",
"sass": "^1.26.10",
Expand All @@ -93,8 +93,8 @@
"stylelint-prettier": "^1.2.0",
"stylelint-scss": "^3.19.0",
"stylelint-selector-no-empty": "^1.0.8",
"ts-jest": "^27.0.5",
"unimported": "^1.19.0",
"ts-jest": "^27.1.4",
"unimported": "^1.19.1",
"vue": "^2.6.11",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.11"
Expand Down Expand Up @@ -131,6 +131,7 @@
"build:render.com": "yarn run watch:build-kotti-dependencies && yarn workspace @3yourmind/kotti-ui run build && yarn workspace @3yourmind/documentation run nuxt generate",
"check": "yarn run check:stylelint && yarn run check:eslint && yarn run check:prettier",
"check:eslint": "eslint --max-warnings=0 --ignore-path .gitignore '**/*.{js,jsx,json,ts,tsx,vue}'",
"check:jest": "jest",
"check:prettier": "prettier --check --ignore-path .gitignore .",
"check:stylelint": "stylelint packages/**/*.{css,scss,vue}",
"check:unimported": "lerna run check:unimported",
Expand All @@ -139,9 +140,8 @@
"fix:prettier": "prettier --write --ignore-path .gitignore .",
"fix:stylelint": "lerna run check:stylelint -- --fix",
"prepublishOnly": "yarn run check && lerna run --no-private build",
"test": "jest",
"watch:build-kotti-dependencies": "concurrently \"yarn workspace @3yourmind/sass-node-modules-importer run build\" \"yarn workspace @3yourmind/vue-use-tippy run build\" \"yarn workspace @3yourmind/yoco run build\"",
"watch": "yarn run watch:build-kotti-dependencies && nodemon --legacy-watch --watch packages/vue-use-tippy/source --watch packages/yoco/source --watch packages/sass-node-modules-importer/source --watch packages/kotti-ui/source --ignore packages/kotti-ui/source/kotti-style/tokens.css -e js,jsx,ts,tsx,vue,scss,css,json --exec \"yarn --cwd packages/kotti-ui run build && yarn --cwd packages/documentation run serve\""
"watch": "yarn run watch:build-kotti-dependencies && nodemon --legacy-watch --watch packages/vue-use-tippy/source --watch packages/yoco/source --watch packages/sass-node-modules-importer/source --watch packages/kotti-ui/source --ignore packages/kotti-ui/source/kotti-style/tokens.css -e js,jsx,ts,tsx,vue,scss,css,json --exec \"yarn --cwd packages/kotti-ui run build && yarn --cwd packages/documentation run serve\"",
"watch:build-kotti-dependencies": "concurrently \"yarn workspace @3yourmind/sass-node-modules-importer run build\" \"yarn workspace @3yourmind/vue-use-tippy run build\" \"yarn workspace @3yourmind/yoco run build\""
},
"version": "1.0.0",
"workspaces": [
Expand Down
19 changes: 10 additions & 9 deletions packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@
"dependencies": {
"@3yourmind/kotti-ui": "3.0.0-beta.18",
"@3yourmind/yoco": "*",
"@octokit/rest": "^18.0.6",
"@octokit/types": "^5.5.0",
"@metatypes/typography": "^0.5.0",
"@metatypes/units": "^0.5.0",
"@octokit/rest": "^18.12.0",
"@octokit/types": "^6.34.0",
"@vue/composition-api": "0.6.1",
"core-js": "^3.17.2",
"dayjs": "^1.9.1",
"lodash": "^4.17.19",
"marked": "^2.0.0",
"lodash": "^4.17.21",
"marked": "^4.0.12",
"natural-sort": "^1.0.0",
"vue-clipboard2": "^0.3.1"
},
"description": "Kotti-ui Doc Pages",
"devDependencies": {
"@metatypes/typography": "^0.4.0",
"@metatypes/units": "^0.4.0",
"@nuxt/types": "^2.13.2",
"@nuxt/typescript-build": "^1.0.3",
"@nuxt/typescript-runtime": "^0.4.10",
"@nuxtjs/axios": "^5.11.0",
"@nuxtjs/markdownit": "^1.2.7",
"@nuxtjs/markdownit-loader": "^1.1.1",
"@nuxtjs/style-resources": "^1.0.0",
"@types/lodash": "^4.14.157",
"@types/marked": "^1.1.0",
"@types/lodash": "^4.14.180",
"@types/marked": "^4.0.3",
"@types/natural-sort": "^0.0.20",
"case-sensitive-paths-webpack-plugin": "^2.3.0",
"nuxt": "^2.13.3"
"nuxt": "^2.13.3",
"ts-loader": "7"
},
"homepage": "https://github.com/3YOURMIND/kotti#readme",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions packages/documentation/pages/changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ import {
} from '@vue/composition-api'
import dayjs from 'dayjs'
import { cloneDeep } from 'lodash'
import marked from 'marked'
import { marked } from 'marked'
import naturalSort from 'natural-sort'

const octokit = new Octokit()
Expand All @@ -122,7 +122,7 @@ export default defineComponent({
const isLoading = ref(true)

const releases: Ref<
Endpoints['GET /repos/:owner/:repo/releases']['response']['data']
Endpoints['GET /repos/{owner}/{repo}/releases']['response']['data']
> = ref([])

onBeforeMount(async () => {
Expand All @@ -140,7 +140,7 @@ export default defineComponent({
dayjs,
isLoading,
renderMarkdown: (markdown: string) =>
marked(convertPoundToIssueLink(markdown)),
marked.parse(convertPoundToIssueLink(markdown)),
releases,
sortedReleases: computed(() =>
cloneDeep(releases.value).sort((a, b) =>
Expand Down
15 changes: 0 additions & 15 deletions packages/documentation/pages/foundations/colors/list-of-colors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@
colorName="Orange"
:colors="orangeColor"
/>
<ColorPalette
carsoli marked this conversation as resolved.
Show resolved Hide resolved
class="column col-md-12 col-4"
colorName="Yellow"
:colors="yellowColor"
/>
<ColorPalette
class="column col-md-12 col-4"
colorName="Purple"
:colors="purpleColor"
/>
</div>
<div class="columns">
<ColorPalette
Expand All @@ -66,11 +56,6 @@
colorName="Light Gray"
:colors="lightGray"
/>
<ColorPalette
class="column col-md-12 col-4"
colorName="Neutrals"
:colors="neutrals"
/>
</div>
<ColorUsage />
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"skipLibCheck": true,
"strict": true,
"target": "ES2018",
"types": ["webpack-env", "node", "@nuxt/types"]
"types": ["node", "@nuxt/types"]
FlorianWendelborn marked this conversation as resolved.
Show resolved Hide resolved
},
"exclude": ["node_modules"],
"include": [
Expand Down
10 changes: 4 additions & 6 deletions packages/kotti-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
"@popperjs/core": "2.0.6",
"big.js": "^6.1.1",
"color": "3.x",
"deep-eql": "^4.0.0",
"deepmerge": "^4.2.2",
"element-ui": "2.13.1",
"lodash": "^4.17.19",
"lodash": "^4.17.21",
"normalize.css": "^8.0.1",
"tippy.js": "6.x",
"ts-custom-error": "^3.1.1",
"ts-custom-error": "^3.2.0",
"vue-clickaway": "^2.2.2",
"zod": "^3.9.8"
},
Expand All @@ -32,9 +31,8 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-typescript": "^5.0.2",
"@types/big.js": "^6.1.1",
"@types/jest": "^27.0.1",
"@types/lodash": "^4.14.157",
"@types/big.js": "^6.1.3",
"@types/lodash": "^4.14.180",
"@vue/test-utils": "^1.0.3",
"esm": "^3.2.25",
"postcss-flexbugs-fixes": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kotti-ui/source/kotti-field/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const TestComponent = defineComponent({
name: 'TestComponent',
props: makeProps(
KottiField.propsSchema.extend({
value: z.string().nullable(),
value: z.string().nullable().default(null),
}),
),
setup: testFieldSetup,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TestField = defineComponent<KottiField.PropsInternal>({
components: { KtField },
props: makeProps(
KottiField.propsSchema.extend({
value: z.string().nullable(),
value: z.string().nullable().default(null),
}),
),
setup: (props, { emit }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TestField = defineComponent<KottiField.PropsInternal>({
components: { KtField },
props: makeProps(
KottiField.propsSchema.extend({
value: z.string().nullable(),
value: z.string().nullable().default(null),
}),
),
setup: (props, { emit }) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/kotti-ui/source/kotti-form/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const TestField = defineComponent<KottiField.PropsInternal>({
components: { KtField },
props: makeProps(
KottiField.propsSchema.extend({
value: z.string().nullable(),
value: z.string().nullable().default(null),
}),
),
setup: testFieldSetup,
Expand All @@ -56,7 +56,7 @@ const TestFieldObject = defineComponent<KottiField.PropsInternal>({
components: { KtField },
props: makeProps(
KottiField.propsSchema.extend({
value: z.record(z.unknown()).nullable(),
value: z.record(z.unknown()).nullable().default(null),
}),
),
setup: testFieldSetup,
Expand Down
15 changes: 7 additions & 8 deletions packages/kotti-ui/source/kotti-table/KtTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
</template>

<script lang="jsx">
import deepEql from 'deep-eql'
carsoli marked this conversation as resolved.
Show resolved Hide resolved
import pick from 'lodash/pick'
import { isEqual, pick } from 'lodash'

import { TableBody } from './components/TableBody'
import TableHeader from './components/TableHeader.vue'
Expand Down Expand Up @@ -214,47 +213,47 @@ export default {
selected: {
immediate: true,
handler(value, oldValue) {
if (!deepEql(value, oldValue)) {
if (!isEqual(value, oldValue)) {
this.localStore.commit('setSelected', value)
}
},
},
columns: {
immediate: true,
handler(value, oldValue) {
if (value && !deepEql(value, oldValue)) {
if (value && !isEqual(value, oldValue)) {
this.store.commit('setColumns', value)
}
},
},
sortedColumns: {
immediate: true,
handler(value, oldValue) {
if (value && !deepEql(value, oldValue)) {
if (value && !isEqual(value, oldValue)) {
this.store.commit('setSortedColumns', value)
}
},
},
hiddenColumns: {
immediate: true,
handler(value, oldValue) {
if (value && !deepEql(value, oldValue)) {
if (value && !isEqual(value, oldValue)) {
this.store.commit('setHiddenColumns', value)
}
},
},
filteredColumns: {
immediate: true,
handler(value, oldValue) {
if (value && !deepEql(value, oldValue)) {
if (value && !isEqual(value, oldValue)) {
this.store.commit('setFilteredColumns', value)
}
},
},
orderedColumns: {
immediate: true,
handler(value, oldValue) {
if (value && !deepEql(value, oldValue)) {
if (value && !isEqual(value, oldValue)) {
this.store.commit('setOrderedColumns', value)
}
},
Expand Down
6 changes: 3 additions & 3 deletions packages/kotti-ui/source/kotti-table/logic/expand.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import deepEql from 'deep-eql'
import { isEqual } from 'lodash'

export const defaultState = {
expandMultiple: false,
Expand All @@ -7,7 +7,7 @@ export const defaultState = {

function toggleRowExpansion(state, row) {
const expanded = state.expanded
const index = expanded.findIndex((elem) => deepEql(elem, row))
const index = expanded.findIndex((elem) => isEqual(elem, row))
const shouldExpand = index === -1 //if the row is not already included in state.expanded

if (state.expandMultiple) {
Expand All @@ -30,6 +30,6 @@ export const mutations = {

export const getters = {
isExpanded(state, row) {
return state.expanded.some((e) => deepEql(e, row))
return state.expanded.some((e) => isEqual(e, row))
},
}
9 changes: 4 additions & 5 deletions packages/kotti-ui/source/kotti-table/logic/select.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import deepEql from 'deep-eql'
import debounce from 'lodash/debounce'
import { debounce, isEqual } from 'lodash'

export function toggleRowSelection(state, row, selected) {
let changed = false
const selection = state.selection
const index = selection.findIndex((selectedRow) => deepEql(selectedRow, row))
const index = selection.findIndex((selectedRow) => isEqual(selectedRow, row))
if (typeof selected === 'undefined') {
if (index === -1) {
selection.push(row)
Expand Down Expand Up @@ -52,7 +51,7 @@ export function cleanSelection(store) {
state.selection = state.selection.filter((s) => rowsSet.has(s[rowKey]))
} else {
state.selection = state.selection.filter((s) =>
state.rows.some((r) => deepEql(r, s)),
state.rows.some((r) => isEqual(r, s)),
)
}

Expand Down Expand Up @@ -132,6 +131,6 @@ export const getters = {
: row[state.rowKey]
},
isSelected(state, row) {
return state.selection.some((e) => deepEql(e, row))
return state.selection.some((e) => isEqual(e, row))
},
}
Loading