Skip to content

Commit 94d0f59

Browse files
authored
BREAKING: ship ESM only (#99)
closes #88
1 parent 7be4d90 commit 94d0f59

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
cache: "npm"
3333
- run: npm install --no-audit --no-fund --ignore-scripts
3434
- name: Check types
35-
run: npm run check --if-present
35+
run: npm run check
3636
- name: Lint JS
3737
run: npx oxlint@latest -D perf
3838
- name: Build package

package-lock.json

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
{
22
"name": "color-sorter",
3-
"version": "6.2.0",
3+
"version": "7.0.0-alpha.0",
44
"description": "Sort colors in a visually pleasing way.",
55
"homepage": "https://github.com/projectwallace/color-sorter",
66
"repository": "projectwallace/color-sorter",
7+
"engines": {
8+
"node": ">=18.0.0"
9+
},
710
"type": "module",
8-
"source": "index.js",
911
"exports": {
1012
"types": "./dist/index.d.ts",
11-
"require": "./dist/color-sorter.umd.cjs",
1213
"default": "./dist/color-sorter.js"
1314
},
1415
"types": "./dist/index.d.ts",
15-
"main": "./dist/color-sorter.umd.cjs",
16-
"module": "./dist/color-sorter.js",
17-
"unpkg": "./dist/color-sorter.umd.cjs",
16+
"main": "./dist/color-sorter.js",
1817
"scripts": {
1918
"test": "uvu",
2019
"build": "vite build",

vite.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default defineConfig({
77
build: {
88
lib: {
99
entry: resolve(__dirname, "index.js"),
10-
name: "colorSorter",
11-
fileName: "color-sorter",
10+
formats: ['es']
1211
},
1312
rollupOptions: {
1413
// make sure to externalize deps that shouldn't be bundled

0 commit comments

Comments
 (0)