From 657209c7b172aed91dbac8e0e9310e95df058803 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Wed, 27 Sep 2023 16:20:08 -0400 Subject: [PATCH] Update --- Makefile | 9 ++++----- package.json | 2 +- packages/protobuf/package.json | 3 +-- packages/protoplugin/package.json | 5 ++--- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 2d038cfcf..5c8167a00 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,6 @@ GOOGLE_PROTOBUF_VERSION = 23.4 BAZEL_VERSION = 5.4.0 TS_VERSIONS = 4.1.2 4.2.4 4.3.5 4.4.4 4.5.2 4.6.4 4.7.4 4.8.4 4.9.5 5.0.4 -# test - node_modules: package-lock.json npm ci @@ -195,10 +193,11 @@ test-ts-compat: $(GEN)/protobuf-test node_modules done .PHONY: lint -lint: node_modules $(BUILD)/protobuf $(BUILD)/protobuf-test $(BUILD)/protobuf-conformance $(GEN)/protobuf-bench $(GEN)/protobuf-example ## Lint all files +lint: node_modules $(BUILD)/protobuf $(BUILD)/protobuf-test $(BUILD)/protobuf-conformance $(BUILD)/protoplugin $(GEN)/protobuf-bench $(GEN)/protobuf-example ## Lint all files npx eslint --max-warnings 0 . - npm run -w packages/protobuf lint:types - npm run -w packages/protoplugin lint:types + @# Check type exports on npm packages to verify they're correct + npm run -w packages/protobuf attw + npm run -w packages/protoplugin attw .PHONY: format format: node_modules $(BIN)/git-ls-files-unstaged $(BIN)/license-header ## Format all files, adding license headers diff --git a/package.json b/package.json index 5f7161e4c..861f0a4f8 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "npm": ">=8" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.10.2", "@typescript-eslint/eslint-plugin": "^6.2.1", "@typescript-eslint/parser": "^6.2.1", "eslint": "^8.46.0", @@ -28,7 +29,6 @@ "typescript": "^5.1.6" }, "dependencies": { - "@arethetypeswrong/cli": "^0.7.0", "@typescript/vfs": "1.0.0", "jest": "^29.6.2" } diff --git a/packages/protobuf/package.json b/packages/protobuf/package.json index 999f824c3..63c153ae4 100644 --- a/packages/protobuf/package.json +++ b/packages/protobuf/package.json @@ -14,11 +14,10 @@ "build": "npm run build:cjs && npm run build:esm", "build:cjs": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", "build:esm": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/esm", - "lint:types": "attw --pack" + "attw": "attw --pack" }, "main": "./dist/cjs/index.js", "type": "module", - "types": "./dist/esm/index.d.ts", "exports": { "import": { "types": "./dist/esm/index.d.ts", diff --git a/packages/protoplugin/package.json b/packages/protoplugin/package.json index 4b75a0355..a3a7f3b4e 100644 --- a/packages/protoplugin/package.json +++ b/packages/protoplugin/package.json @@ -14,7 +14,7 @@ "build": "npm run build:cjs && npm run build:esm", "build:cjs": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", "build:esm": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module ES2015 --outDir ./dist/esm --declaration --declarationDir ./dist/esm", - "lint:types": "attw --pack" + "attw": "attw --pack" }, "type": "module", "exports": { @@ -39,11 +39,10 @@ } } }, - "types": "./dist/esm/index.d.ts", "typesVersions": { "*": { "ecmascript": [ - "./dist/esm/ecmascript/index.d.ts" + "./dist/cjs/ecmascript/index.d.ts" ] } },