Skip to content

Commit

Permalink
Switch to @bufbuild/license-header (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Jul 12, 2024
1 parent b019568 commit f797b83
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 9 deletions.
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@ test: $(BIN)/conformance_test_runner ## Run conformance tests
node report.js

.PHONY: license
license: Makefile ## Updates license headers
GOBIN=$(abspath $(BIN)) go install github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@v1.1.0
$(BIN)/license-header \
--license-type "apache" \
--copyright-holder "Buf Technologies, Inc." \
--year-range "$(LICENSE_HEADER_YEAR_RANGE)" \
report.js
license: ## Updates license headers
npm ci
npm run license-header

.PHONY: checkdiff
checkdiff:
Expand Down
14 changes: 14 additions & 0 deletions impl/baseline/runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env -S npx tsx

// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import {
ConformanceRequest,
ConformanceResponse,
Expand Down
14 changes: 14 additions & 0 deletions impl/google-protobuf/runner.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env -S node

// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// This file is mostly copied from the conformance testee files located at:
// https://github.com/protocolbuffers/protobuf-javascript/blob/main/experimental/runtime/kernel/conformance/
// - conformance_testee.js
Expand Down
14 changes: 14 additions & 0 deletions impl/protobuf-es/runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env -S npx tsx

// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import {
ConformanceRequest,
ConformanceResponse,
Expand Down
14 changes: 14 additions & 0 deletions impl/protobuf-ts/runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env -S npx tsx

// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import type { IMessageType } from "@protobuf-ts/runtime";
import {
ConformanceRequest,
Expand Down
14 changes: 14 additions & 0 deletions impl/protobuf.js/runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env -S npx tsx

// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { readSync, writeSync } from "fs";

import * as protos from "./gen/protos_pb.js";
Expand Down
14 changes: 14 additions & 0 deletions impl/protoc-gen-ts/runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env -S npx tsx

// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import {Message} from "google-protobuf";
import { conformance } from "./gen/conformance/conformance";
import { protobuf_test_messages } from "./gen/google/protobuf/test_messages_proto3";
Expand Down
14 changes: 14 additions & 0 deletions impl/protoscript/runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env -S npx tsx

// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import {
ConformanceRequest,
ConformanceResponse,
Expand Down
2 changes: 1 addition & 1 deletion impl/ts-proto/runner.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Buf Technologies, Inc.
// Copyright 2023-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
35 changes: 35 additions & 0 deletions package-lock.json

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

13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{
"name": "protobuf-conformance",
"private": true,
"type": "module"
"type": "module",
"scripts": {
"license-header": "license-header --ignore 'proto/**' --ignore 'impl/*/gen/**' --ignore 'impl/protobuf.js/wrapper.js'"
},
"licenseHeader": {
"licenseType": "apache",
"yearRange": "2023-2024",
"copyrightHolder": "Buf Technologies, Inc."
},
"dependencies": {
"@bufbuild/license-header": "^0.0.4"
}
}

0 comments on commit f797b83

Please sign in to comment.