Skip to content

Commit

Permalink
feat!: stop dual transpiling to ESM and CJS and ship TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Aug 16, 2023
1 parent fa5998f commit cc14af9
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 444 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"ignorePatterns": ["packages/starlight-links-validator/tests/fixtures"],
"overrides": [
{
"files": ["packages/starlight-links-validator/src/libs/remark.ts"],
"files": ["packages/starlight-links-validator/libs/remark.ts"],
"rules": {
/**
* There is something wrong with `mdast` types:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
working-directory: packages/starlight-links-validator

- name: Generates example TypeScript types
run: pnpm astro sync
working-directory: example
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"dev": "astro dev",
"build": "pnpm -F starlight-links-validator build && astro build",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
Expand Down
6 changes: 6 additions & 0 deletions packages/starlight-links-validator/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.eslintcache
.prettierignore
.tests
tests
tsconfig.json
vitest.config.ts
File renamed without changes.
25 changes: 3 additions & 22 deletions packages/starlight-links-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,13 @@
"description": "Astro integration for Starlight to validate internal links.",
"author": "HiDeoo <[email protected]> (https://hideoo.dev)",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"default": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
}
".": "./index.ts",
"./package.json": "./package.json"
},
"scripts": {
"dev": "tsup --watch",
"build": "tsup && cp dist/index.d.ts dist/index.d.cts",
"test": "vitest",
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0 && tsc --noEmit",
"prepublishOnly": "pnpm build"
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0 && tsc --noEmit"
},
"dependencies": {
"github-slugger": "2.0.0",
Expand All @@ -38,7 +23,6 @@
"@types/mdast": "3.0.11",
"@types/node": "18.16.18",
"mdast-util-mdx-jsx": "2.1.4",
"tsup": "7.0.0",
"typescript": "5.1.3",
"unified": "10.1.2",
"vitest": "0.32.2"
Expand All @@ -55,9 +39,6 @@
"access": "public"
},
"sideEffects": false,
"files": [
"dist"
],
"keywords": [
"starlight",
"links",
Expand Down
10 changes: 0 additions & 10 deletions packages/starlight-links-validator/tsup.config.ts

This file was deleted.

Loading

0 comments on commit cc14af9

Please sign in to comment.