Skip to content

Commit

Permalink
chore: update from main
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Jun 27, 2024
2 parents 60db565 + ec83667 commit e56d378
Show file tree
Hide file tree
Showing 185 changed files with 12,520 additions and 6,567 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
/packages/components/**
!/packages/components/scripts
/showcases/patternhub/pages/components/**
/showcases/next-showcase/pages/*slug*
/showcases/nuxt-showcase/**
build-outputs/
build-showcases/
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ updates:
# We currently need to ignore this for the actual (LTS) Angular version
- dependency-name: "zone.js"
update-types: ["version-update:semver-minor"]
# There is an issue with sass:1.77.5 and additional colors in foundations we ignore updates for now
- dependency-name: "sass"
pull-request-branch-name:
separator: "-"
# https://github.com/dependabot/dependabot-core/issues/5226#issuecomment-1179434437
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/build-gh-page.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if [[ $PRE_RELEASE == "true" || $RELEASE == "true" ]]; then
rm -rf ./public/version/"$NAME"
fi
mv ./out ./public/version/"$NAME"
echo " Moved dir out to ./public/version/$NAME"
else
if [[ ! -d ./public/review ]]; then
echo " Make dir ./public/review"
Expand All @@ -40,4 +41,5 @@ else
rm -rf ./public/review/"$NAME"
fi
mv ./out ./public/review/"$NAME"
echo " Moved dir out to ./public/review/$NAME"
fi
2 changes: 1 addition & 1 deletion .github/workflows/01-build-showcases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
env:
NEXT_PUBLIC_BASE_PATH: ${{ steps.base-path.outputs.result }}
run: |
node scripts/md-resolve-svg.js
npx --no tsx scripts/md-resolve-svg.ts
npm run build-showcases
- name: ⏫ Upload Showcases
Expand Down
8 changes: 6 additions & 2 deletions .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"**/.next/**",
"**/.github/**",
"**/docs/**",
"**/next-showcase/components/**",
"**/patternhub/**/components/**",
"**/*-example/index.html",
"**/*-showcase/index.html",
Expand All @@ -39,16 +38,21 @@
"showcases/react-showcase/src/components/radio/index.tsx",
"showcases/react-showcase/src/components/radio/index.tsx",
"showcases/react-showcase/src/components/notification/index.tsx",
"showcases/next-showcase/pages/_app.tsx",
"showcases/vue-showcase/src/components/form/Form.vue",
"showcases/angular-showcase/.angular/cache/**",
"showcases/angular-ssr-showcase/.angular/cache/**",
"packages/components/src/components/**/*.spec.tsx",
"packages/components/src/components/tag/tag.spec.tsx",
"**/**config.ts",
"**/navigation-items.ts",
"showcases/angular-showcase/.angular/cache",
"packages/foundations/assets/icons/functional/fonts/**",
"**/playwright-report/**",
"packages/foundations/src"
"packages/foundations/src",
"**/.output/**",
"**/.nuxt/**",
"showcases/nuxt-showcase/**"
],
"absolute": true
}
3 changes: 3 additions & 0 deletions .xo-config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
prettier: true,
ignores: [
'./showcases/nuxt-showcase/**'
],
overrides: [
{
files: ['./showcases/angular-showcase/**'],
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Global Repository owners
# see https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/about-code-owners for details of syntax
* [email protected] [email protected] [email protected] [email protected]
* [email protected] [email protected] [email protected] [email protected] [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"test:vue-showcase": "npm run test:e2e --workspace=vue-showcase"
},
"devDependencies": {
"@playwright/test": "1.44.1",
"cpy-cli": "^5.0.0",
"@playwright/test": "1.45.0",
"cpr": "3.0.1",
"cross-env": "^7.0.3",
"dotenv": "^16.0.3",
"fs-extra": "^11.1.0",
Expand Down
11 changes: 5 additions & 6 deletions output/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@
],
"scripts": {
"build": "npm-run-all tsc",
"mv:dist": "cpy dist ../../build-outputs/react",
"mv:package.json": "cpy package.json ../../build-outputs/react",
"mv:readme": "cpy README.md ../../build-outputs/react",
"mv:dist": "cpr dist ../../build-outputs/react/dist -o",
"mv:package.json": "cpr package.json ../../build-outputs/react/package.json -o",
"mv:readme": "cpr README.md ../../build-outputs/react/README.md -o",
"open:report": "npx playwright show-report",
"postbuild": "npm-run-all -p mv:*",
"regenerate:screenshots": "playwright test -c playwright.config.ts --update-snapshots",
"test:components": "playwright test -c playwright.config.ts",
"tsc": "tsc -p . --sourceMap false"
},
"devDependencies": {
"@playwright/experimental-ct-react": "1.44.1",
"@playwright/experimental-ct-react": "1.45.0",
"@types/react": "^18.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.77.6"
"react-dom": "^18.3.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
17 changes: 9 additions & 8 deletions output/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,24 @@
"build": "npm-run-all build:*",
"build:01_vite": "vite build",
"build:02_types": "vue-tsc --declaration --emitDeclarationOnly",
"build:03_ts_workaround": "node scripts/fix-any-types.js",
"mv:dist": "cpy dist ../../build-outputs/vue",
"mv:package.json": "cpy package.json ../../build-outputs/vue",
"mv:readme": "cpy README.md ../../build-outputs/vue",
"build:03_ts_workaround": "tsx scripts/fix-any-types.ts",
"mv:dist": "cpr dist ../../build-outputs/vue/dist -o",
"mv:package.json": "cpr package.json ../../build-outputs/vue/package.json -o",
"mv:readme": "cpr README.md ../../build-outputs/vue/README.md -o",
"postbuild": "npm-run-all -p mv:*",
"test:components": "playwright test -c playwright.config.ts"
},
"dependencies": {
"vue": "^3.4.29"
"vue": "^3.4.30"
},
"devDependencies": {
"@playwright/experimental-ct-vue": "1.44.1",
"@playwright/experimental-ct-vue": "1.45.0",
"@vitejs/plugin-vue": "^5.0.5",
"sass": "^1.77.6",
"replace-in-file": "^8.0.1",
"tsx": "^4.15.7",
"typescript": "^5.4.5",
"vite": "^5.3.1",
"vue-tsc": "^2.0.21"
"vue-tsc": "^2.0.22"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import { readdirSync } from 'node:fs';
import Replace from 'replace-in-file';
import { transformToUpperComponentName } from '@db-ui/components/scripts/utils/index.js';
import { replaceInFileSync } from 'replace-in-file';

const distDir = './dist/components';

const transformToUpperComponentName = (componentName: string) =>
componentName
.split('-')
.map((part) => `${part[0].toUpperCase()}${part.slice(1)}`)
.join('');

/**
* Props are generated like this: `readonly id?: any;`
* We replace it with the correct type like DBMyComponent["id"]
* @param input {string}
* @param component {string}
*/
const replaceAnyTypes = (input, component) => {
const replaceAnyTypes = (input: string, component: string) => {
const propModel = `DB${transformToUpperComponentName(component)}Props`;
let fileContent = input;

Expand All @@ -30,12 +33,12 @@ const replaceAnyTypes = (input, component) => {
};

const fixAnyTypes = () => {
const components = readdirSync(distDir);
const components: string[] = readdirSync(distDir);

for (const component of components) {
Replace.sync({
replaceInFileSync({
files: `${distDir}/${component}/${component}.vue.d.ts`,
processor(input) {
processor(input: string) {
return replaceAnyTypes(input, component);
}
});
Expand Down
6 changes: 3 additions & 3 deletions output/webcomponent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
],
"scripts": {
"build": "parcel build",
"mv:dist": "cpy dist ../../build-outputs/web-components",
"mv:package.json": "cpy package.json ../../build-outputs/web-components",
"mv:readme": "cpy README.md ../../build-outputs/web-components",
"mv:dist": "cpr dist ../../build-outputs/web-components/dist -o",
"mv:package.json": "cpr package.json ../../build-outputs/web-components/package.json -o",
"mv:readme": "cpr README.md ../../build-outputs/web-components/README.md -o",
"postbuild": "npm-run-all -p mv:*"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit e56d378

Please sign in to comment.