-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(exports): Setup ESM first (#21)
* feat(exports): Setup ESM first * Switch to Vitest
- Loading branch information
Showing
22 changed files
with
1,633 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,24 +16,39 @@ | |
"emotion", | ||
"styled-components" | ||
], | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"type": "module", | ||
"sideEffects": false, | ||
"source": "./src/main.ts", | ||
"main": "./dist/main.cjs", | ||
"module": "./dist/main.js", | ||
"unpkg": "./dist/main.umd.cjs", | ||
"types": "./dist/main.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/main.js", | ||
"require": "./dist/main.cjs", | ||
"types": "./dist/main.d.ts", | ||
"default": "./dist/main.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"files": [ | ||
"dist/", | ||
"src/" | ||
"./dist", | ||
"./src", | ||
"./package.json" | ||
], | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"build": "tsc -p tsconfig.prod.json", | ||
"check": "yarn compile && yarn lint && yarn test", | ||
"build": "vite build", | ||
"check": "yarn compile && yarn lint && yarn test --run", | ||
"compile": "tsc", | ||
"docs": "typedoc", | ||
"lint": "eslint .", | ||
"release": "semantic-release", | ||
"test": "NODE_ENV=test mocha \"test/**/*.test.ts\"" | ||
"test": "NODE_ENV=test vitest" | ||
}, | ||
"devDependencies": { | ||
"@assertive-ts/core": "^2.1.0", | ||
|
@@ -43,7 +58,6 @@ | |
"@stylistic/eslint-plugin": "^2.2.2", | ||
"@types/eslint__eslintrc": "^2.1.1", | ||
"@types/eslint__js": "^8.42.3", | ||
"@types/mocha": "^10.0.7", | ||
"@types/node": "^20.14.8", | ||
"eslint": "^9.5.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
|
@@ -53,15 +67,15 @@ | |
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jsdoc": "^48.3.0", | ||
"eslint-plugin-sonarjs": "^1.0.3", | ||
"expect-type": "^0.19.0", | ||
"mocha": "^10.4.0", | ||
"semantic-release": "^24.0.0", | ||
"semantic-release-yarn": "^3.0.2", | ||
"ts-node": "^10.9.2", | ||
"typedoc": "^0.26.2", | ||
"typedoc-plugin-markdown": "^4.1.0", | ||
"typedoc-plugin-merge-modules": "^5.1.0", | ||
"typescript": "^5.5.2", | ||
"typescript-eslint": "^7.13.1" | ||
"typescript-eslint": "^7.13.1", | ||
"vite": "^5.3.1", | ||
"vite-plugin-dts": "^3.9.1", | ||
"vitest": "^1.6.0" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export { makeCssVars } from "./lib/makeCssVars"; | ||
export { mergeCssVars } from "./lib/mergeCssVars"; | ||
|
||
export type { NonEmptyArray } from "./helpers/common"; | ||
export type { CssVarContext, CssVars, VarKey } from "./lib/makeCssVars"; | ||
export type { MergeVars } from "./lib/mergeCssVars"; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { expectTypeOf, it, suite } from "vitest"; | ||
|
||
import type { NonEmptyArray } from "../../../src/main"; | ||
|
||
suite("[Unit] common.test.ts", () => { | ||
it("defines the proper types", () => { | ||
expectTypeOf<NonEmptyArray<number>>().toMatchTypeOf([1]); | ||
expectTypeOf<NonEmptyArray<number>>().toMatchTypeOf([1, 2]); | ||
expectTypeOf<NonEmptyArray<number>>().toMatchTypeOf([1, 2, 3]); | ||
|
||
expectTypeOf<NonEmptyArray<number>>().not.toMatchTypeOf([]); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.