From d451e3b586c042bebf7164765ff93cf370805400 Mon Sep 17 00:00:00 2001 From: Stephanie DiBenedetto Date: Fri, 7 Oct 2022 12:57:12 -0700 Subject: [PATCH 1/2] Fix typos in asserts add LICENSE-asserts.md to package.json --- asserts.js | 4 ++-- package.json | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/asserts.js b/asserts.js index b4a1e5f..5ac5850 100644 --- a/asserts.js +++ b/asserts.js @@ -132,9 +132,9 @@ jspb.asserts.fail = function(opt_message, ...args) { */ jspb.asserts.assertInstanceof = function(value, type, opt_message, ...args) { if (!(value instanceof type)) { - jspb.assert.doAssertFailure( + jspb.asserts.doAssertFailure( 'Expected instanceof %s but got %s.', - [jspb.asserts.getType(type), jspb.asseerts.getType(value)], + [jspb.asserts.getType(type), jspb.asserts.getType(value)], opt_message, args); } return value; diff --git a/package.json b/package.json index ba5efde..740bdc9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "Protocol Buffers for JavaScript", "main": "google-protobuf.js", "files": [ - "google" + "google", + "LICENSE-asserts.md" ], "dependencies": {}, "devDependencies": { @@ -24,5 +25,5 @@ "url": "https://github.com/protocolbuffers/protobuf-javascript" }, "author": "Google Protocol Buffers Team", - "license": "BSD-3-Clause" + "license": "(BSD-3-Clause AND Apache-2.0)" } From d99e4040296e844e1b726afe2914885d4b702d5c Mon Sep 17 00:00:00 2001 From: Stephanie DiBenedetto Date: Fri, 7 Oct 2022 13:33:55 -0700 Subject: [PATCH 2/2] Be explicit about all npm package files We were previously just globbing the entire google/ dir, which brings in different versions of files that we don't normally publish to npm. For example, we usually publish any_pb.js, which uses commonjs requires instead of any.js, which uses closure's goog.require. --- package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 740bdc9..bcc6128 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,13 @@ "description": "Protocol Buffers for JavaScript", "main": "google-protobuf.js", "files": [ - "google", - "LICENSE-asserts.md" + "google/protobuf/*_pb.js", + "google/protobuf/compiler/*_pb.js", + "google-protobuf.js", + "LICENSE.md", + "LICENSE-asserts.md", + "package.json", + "README.md" ], "dependencies": {}, "devDependencies": {