From 76466f7c774e0db229068bf5644bad84f2401049 Mon Sep 17 00:00:00 2001 From: Niklas Fiekas Date: Sun, 28 Jan 2024 17:26:35 +0100 Subject: [PATCH] Revert "Merge pull request #167 from schlawg/master" This reverts commit b4fb8e9efd6c83d3a90083c1fc2331379fc03805, reversing changes made to 18cd6ae6b76a1baa0fe2dda5d3f21448c4aedbd5. --- package.json | 68 +++++++++++++++++++++++++++++++++++++-------------- tsconfig.json | 3 ++- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index ffa72968..0f5288ff 100644 --- a/package.json +++ b/package.json @@ -14,21 +14,9 @@ "author": "Niklas Fiekas ", "funding": "https://github.com/sponsors/niklasf", "license": "GPL-3.0-or-later", - "module": "dist/esm/index.js", - "main": "dist/cjs/index.js", - "types": "dist/types/index.d.ts", - "exports": { - ".": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js", - "types": "./dist/types/index.d.ts" - }, - "./*": { - "import": "./dist/esm/*.js", - "require": "./dist/cjs/*.js", - "types": "./dist/types/*.d.ts" - } - }, + "module": "index.js", + "types": "index.d.ts", + "type": "module", "sideEffects": false, "dependencies": { "@badrap/result": "^0.2" @@ -45,9 +33,7 @@ "typescript": "^5" }, "scripts": { - "prepare": "tsc --declarationDir dist/types", - "build": "tsc --declarationDir dist/types && tsc --outDir dist/cjs --module commonjs -d false", - "prepublishOnly": "pnpm build && find dist -name '*.test.*' -exec rm {} +", + "prepare": "tsc", "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js", "doc": "typedoc src/types.ts src/attacks.ts src/util.ts src/squareSet.ts src/board.ts src/setup.ts src/chess.ts src/compat.ts src/debug.ts src/fen.ts src/san.ts src/transform.ts src/variant.ts src/pgn.ts", "lint": "eslint src/*.ts", @@ -55,7 +41,51 @@ "check-format": "dprint check" }, "files": [ - "dist", + "attacks.js", + "board.js", + "chess.js", + "compat.js", + "variant.js", + "transform.js", + "setup.js", + "squareSet.js", + "types.js", + "util.js", + "debug.js", + "fen.js", + "san.js", + "pgn.js", + "index.js", + "attacks.d.ts", + "board.d.ts", + "chess.d.ts", + "compat.d.ts", + "variant.d.ts", + "transform.d.ts", + "setup.d.ts", + "squareSet.d.ts", + "types.d.ts", + "util.d.ts", + "debug.d.ts", + "fen.d.ts", + "san.d.ts", + "pgn.d.ts", + "index.d.ts", + "attacks.js.map", + "board.js.map", + "chess.js.map", + "compat.js.map", + "variant.js.map", + "transform.js.map", + "setup.js.map", + "squareSet.js.map", + "types.js.map", + "util.js.map", + "debug.js.map", + "fen.js.map", + "san.js.map", + "pgn.js.map", + "index.js.map", "src/attacks.ts", "src/board.ts", "src/chess.ts", diff --git a/tsconfig.json b/tsconfig.json index 665abc69..9f776332 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,8 @@ "lib": ["ES2018"], "module": "esnext", "esModuleInterop": true, - "outDir": "dist/esm", + "outDir": "", + "declarationDir": "", "declaration": true, "sourceMap": true },