Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build ESM artifacts with Node16 moduleResolution #1104

Merged
merged 7 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 0 additions & 126 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/connect-cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@connectrpc/connect-cloudflare",
"private": true,
"type": "module",
"scripts": {
"conformance": "tsc --noEmit && npm run conformance:server && npm run conformance:client",
"conformance:server": "npx wrangler deploy -c ./conformance/wrangler-server.toml && connectconformance --mode server --conf ./conformance/conformance-cloudflare-server.yaml -v ./conformance/server.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-conformance/bin/connectconformance
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

const { run } = require("../dist/cjs/conformance.js");
import { run } from "../dist/esm/conformance.js";

run();
5 changes: 3 additions & 2 deletions packages/connect-conformance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@connectrpc/connect-conformance",
"version": "1.4.0",
"private": true,
"type": "module",
timostamm marked this conversation as resolved.
Show resolved Hide resolved
"main": "./dist/cjs/index.js",
"exports": {
".": {
Expand All @@ -16,8 +17,8 @@
"generate": "buf generate buf.build/connectrpc/conformance:v1.0.2",
"clean": "rm -rf ./dist/*",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs",
"build:esm": "tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/esm && echo >./dist/esm/package.json '{\"type\":\"module\"}'"
"build:cjs": "tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm"
},
"dependencies": {
"@bufbuild/protobuf": "^1.10.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"clean": "rm -rf ./dist/*",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"attw": "attw --pack",
"jasmine": "jasmine --config=jasmine.json",
"conformance": "tsc --noEmit && connectconformance --mode server --conf ./conformance/conformance-express.yaml -v ./conformance/server.ts"
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-fastify/conformance/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import {
ServerStreamRequest,
UnaryRequest,
} from "@connectrpc/connect-conformance";
import {
fastify,
import { fastify } from "fastify";
import type {
FastifyHttpOptions,
FastifyHttpsOptions,
FastifyHttp2Options,
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"clean": "rm -rf ./dist/*",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"attw": "attw --pack",
"conformance": "tsc --noEmit && connectconformance --mode server --conf ./conformance/conformance-fastify.yaml -v ./conformance/server.ts"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/connect-fastify/src/fastify-connect-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import {
universalRequestFromNodeRequest,
universalResponseToNodeResponse,
} from "@connectrpc/connect-node";
import type { FastifyInstance } from "fastify/types/instance";
import type { FastifyRequest } from "fastify/types/request";
import type { FastifyInstance, FastifyRequest } from "fastify";

interface FastifyConnectPluginOptions extends ConnectRouterOptions {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"clean": "rm -rf ./dist/cjs/*",
"build": "tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs",
"build": "tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs",
"test": "jasmine --config=jasmine.json",
"build+test": "npm run build && npm run test"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"clean": "rm -rf ./dist/*",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"build:cjs": "tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"attw": "attw --pack"
},
"type": "module",
Expand Down
1 change: 0 additions & 1 deletion packages/connect-node/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
/dist/*/**/*.spec.js
/dist/*/**/*.spec.d.ts
/dist/*/testdata/
/dist/*/extra/
7 changes: 3 additions & 4 deletions packages/connect-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"clean": "rm -rf ./dist/*",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --moduleResolution node10 --verbatimModuleSyntax false --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"attw": "attw --pack",
"jasmine": "jasmine --config=jasmine.json",
"conformance": "npm run conformance:server && npm run conformance:client",
Expand Down Expand Up @@ -39,8 +39,7 @@
"devDependencies": {
"@types/jasmine": "^5.0.0",
"jasmine": "^5.1.0",
"@connectrpc/connect-conformance": "^1.4.0",
"@grpc/grpc-js": "^1.10.8"
"@connectrpc/connect-conformance": "^1.4.0"
},
"files": [
"dist/**"
Expand Down
58 changes: 0 additions & 58 deletions packages/connect-node/src/extra/add-grpc-service.spec.ts

This file was deleted.

Loading