From 016a25e33ae521448c8401090d459d94b0cf5775 Mon Sep 17 00:00:00 2001 From: Preston Richey Date: Wed, 6 Nov 2024 15:22:16 -0500 Subject: [PATCH 1/3] Add types declaration --- package.json | 5 ++++- types/index.d.ts | 3 +++ yarn.lock | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 types/index.d.ts diff --git a/package.json b/package.json index 3300289fc74d..09fe6c7c08c0 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,10 @@ "standalone.js", "src", "bin", - "vendors" + "vendors", + "types/index.d.ts" ], + "types": "./types/index.d.ts", "dependencies": { "@angular/compiler": "12.2.16", "@babel/code-frame": "7.16.7", @@ -102,6 +104,7 @@ "@types/file-entry-cache": "5.0.2", "@types/find-cache-dir": "3.2.1", "@types/jest": "27.4.1", + "@types/prettier": "2.7.1", "@typescript-eslint/eslint-plugin": "5.20.0", "babel-jest": "27.5.1", "benchmark": "2.1.4", diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 000000000000..85302c6b2b71 --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,3 @@ +declare module "prettier" { + export * from "prettier"; +} diff --git a/yarn.lock b/yarn.lock index a75a8ec660cc..38dde32f2dba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1709,6 +1709,11 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== +"@types/prettier@2.7.1": + version "2.7.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" + integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== + "@types/prettier@^2.1.5": version "2.4.3" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.3.tgz#a3c65525b91fca7da00ab1a3ac2b5a2a4afbffbf" From 6faa49623aea3ad66b4e8870fb5ee10fd6cfe7d1 Mon Sep 17 00:00:00 2001 From: Preston Richey Date: Wed, 6 Nov 2024 15:24:58 -0500 Subject: [PATCH 2/3] Fix module name --- types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 85302c6b2b71..93e29f8d4c80 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,3 +1,3 @@ -declare module "prettier" { +declare module "@observablehq/prettier" { export * from "prettier"; } From 59957d6914df13fd466921f6e24621a3daa7dc47 Mon Sep 17 00:00:00 2001 From: Preston Richey Date: Wed, 6 Nov 2024 16:47:09 -0500 Subject: [PATCH 3/3] Bump alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09fe6c7c08c0..5a2ada15ee59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@observablehq/prettier", - "version": "2.7.1-alpha.3", + "version": "2.7.1-alpha.4", "description": "Prettier is an opinionated code formatter", "bin": "./bin/prettier.js", "repository": "prettier/prettier",