Skip to content

Commit

Permalink
Merge pull request #3 from klovaaxel/refactor
Browse files Browse the repository at this point in the history
Refactor and bump to 1.4.1
  • Loading branch information
klovaaxel authored Sep 22, 2024
2 parents d931e6e + a003f26 commit cd6ba46
Show file tree
Hide file tree
Showing 15 changed files with 481 additions and 1,244 deletions.
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"recommended": true,
"style": {
"noNonNullAssertion": "off"
},
"complexity": {
"noUselessSwitchCase": "off"
}
}
}
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 0 additions & 2 deletions bunfig.toml

This file was deleted.

361 changes: 275 additions & 86 deletions cypress/component/combobox.cy.ts

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ Cypress.Commands.add("pressKey", (val) => {
const element = document.activeElement ?? document;
element.dispatchEvent(new KeyboardEvent("keydown", { key: val }));
});

Cypress.Commands.add("releaseKey", (val) => {
const element = document.activeElement ?? document;
element.dispatchEvent(new KeyboardEvent("keyup", { key: val }));
});
6 changes: 6 additions & 0 deletions cypress/support/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ declare namespace Cypress {
* @example cy.pressKey("Enter")
*/
pressKey: (val: string) => void;

/**
* Custom command to release a key on the active element.
* @example cy.releaseKey("Enter")
*/
releaseKey: (val: string) => void;
}
}
9 changes: 9 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"types": ["cypress"]
},
"include": ["**/*.ts"]
}
3 changes: 0 additions & 3 deletions happydom.ts

This file was deleted.

14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.4.1",
"name": "combobox-framework",
"description": "A framework for building comboboxes",
"keywords": [
Expand All @@ -16,7 +16,7 @@
"url": "https://github.com/klovaaxel/combobox-framework/issues",
"email": "[email protected]"
},
"license": "SEE LICENSE IN LICENSE",
"license": "SEE LICENSE IN FILE",
"author": "klovaaxel",
"browser": "dist/combobox-framework.js",
"types": "dist/combobox-framework.d.ts",
Expand All @@ -27,17 +27,13 @@
},
"files": ["dist/**"],
"scripts": {
"dev": "vite",
"build:watch": "vite build --watch",
"build": "bun lint; tsc && vite build; bun run build.mjs; bun test; cypress run --component; echo \"Done! Don't forget to update the version number in package.json\"",
"build-demo": "tsc && vite build",
"build-module": "bun run build.mjs",
"preview": "vite preview",
"dev": "cypress open --component",
"build": "bun lint; tsc && bun run build.mjs; cypress run --component; echo \"Done! Don't forget to update the version number in package.json\"",
"lint": "bunx @biomejs/biome check --apply *.json; bunx @biomejs/biome check --apply src/"
},
"devDependencies": {
"@biomejs/biome": "^1.5.3",
"@happy-dom/global-registrator": "^13.3.8",
"@types/cypress": "^1.1.3",
"bun-plugin-dts": "^0.2.1",
"typescript": "^5.2.2",
"vite": "^5.2.8",
Expand Down
Loading

0 comments on commit cd6ba46

Please sign in to comment.