Skip to content
Draft
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
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ docs/
e2e/

# TODO(bazel 8): move to REPO.bazel
node_modules
examples/connect_node/node_modules
examples/node_modules
examples/proto_grpc/node_modules
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
name: Release

on:
# Can be triggered from the tag.yaml workflow
workflow_call:
inputs:
tag_name:
required: true
type: string
secrets:
BCR_PUBLISH_TOKEN:
required: true
# Or, developers can manually push a tag from their clone
push:
tags:
- "v*.*.*"
# Can be triggered from the tag.yaml workflow
workflow_call:
inputs:
tag_name:
required: true
type: string
secrets:
BCR_PUBLISH_TOKEN:
required: true
# Or, developers can manually push a tag from their clone
push:
tags:
- 'v*.*.*'
permissions:
id-token: write
attestations: write
Expand Down
70 changes: 35 additions & 35 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,40 @@

name: Tag a Release
on:
# Allow devs to tag manually through the GitHub UI.
# For example after landing a fix that customers are waiting for.
workflow_dispatch:
# Run twice a month, on the 1rst and 15th at 3PM UTC (8AM PST)
# This is a trade-off between making too many releases,
# which overwhelms BCR maintainers and over-notifies users,
# and releasing too infrequently which delays delivery of bugfixes and features.
schedule:
- cron: "0 15 1,15 * *"
# Allow devs to tag manually through the GitHub UI.
# For example after landing a fix that customers are waiting for.
workflow_dispatch:
# Run twice a month, on the 1rst and 15th at 3PM UTC (8AM PST)
# This is a trade-off between making too many releases,
# which overwhelms BCR maintainers and over-notifies users,
# and releasing too infrequently which delays delivery of bugfixes and features.
schedule:
- cron: '0 15 1,15 * *'
jobs:
tag:
permissions:
contents: write # allow create tag
runs-on: ubuntu-latest
outputs:
new-tag: ${{ steps.ccv.outputs.new-tag }}
new-tag-version: ${{steps.ccv.outputs.new-tag-version}}
steps:
- uses: actions/checkout@v5
tag:
permissions:
contents: write # allow create tag
runs-on: ubuntu-latest
outputs:
new-tag: ${{ steps.ccv.outputs.new-tag }}
new-tag-version: ${{steps.ccv.outputs.new-tag-version}}
steps:
- uses: actions/checkout@v5
with:
# Need enough history to find the prior release tag
fetch-depth: 0
- name: Bump tag if necessary
id: ccv
uses: smlx/ccv@7318e2f25a52dcd550e75384b84983973251a1f8 # v0.10.0
release:
needs: tag
uses: ./.github/workflows/release.yml
with:
# Need enough history to find the prior release tag
fetch-depth: 0
- name: Bump tag if necessary
id: ccv
uses: smlx/ccv@7318e2f25a52dcd550e75384b84983973251a1f8 # v0.10.0
release:
needs: tag
uses: ./.github/workflows/release.yml
with:
tag_name: ${{ needs.tag.outputs.new-tag-version }}
secrets:
BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }}
if: needs.tag.outputs.new-tag == 'true' && needs.tag.outputs.new-tag-version-type != 'major'
permissions:
id-token: write
attestations: write
contents: write
tag_name: ${{ needs.tag.outputs.new-tag-version }}
secrets:
BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }}
if: needs.tag.outputs.new-tag == 'true' && needs.tag.outputs.new-tag-version-type != 'major'
permissions:
id-token: write
attestations: write
contents: write
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ repos:
# Requires that commitizen is already installed
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
- repo: local
hooks:
- id: aspect_rules_lint
Expand Down
10 changes: 10 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@npm__prettier__3.6.2__links//:defs.bzl", "npm_link_imported_package")

npm_link_imported_package(name = "node_modules")

js_library(
name = "prettierrc",
srcs = [".prettierrc"],
visibility = ["//:__subpackages__"],
)

buildifier(
name = "buildifier",
Expand Down
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ npm.npm_translate_lock(
pnpm_lock = "//examples:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
npm.npm_import(
name = "npm__prettier__3.6.2",
integrity = "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
package = "prettier",
version = "3.6.2",
)
use_repo(npm, "npm__prettier__3.6.2")
use_repo(npm, "npm__prettier__3.6.2__links")
use_repo(npm, "npm")

# Allow us to do 'bazel run @pnpm -- --dir=$PWD install'
Expand Down
2 changes: 1 addition & 1 deletion e2e/external_dep/lib.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const foo = 'bar';
export const foo = 'bar'
2 changes: 1 addition & 1 deletion e2e/external_dep/sub_external/asset.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
2 changes: 1 addition & 1 deletion e2e/external_dep/sub_external/sub-lib.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log("Hello");
console.log('Hello')
2 changes: 1 addition & 1 deletion e2e/external_dep/sub_external/subdir/asset.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
2 changes: 1 addition & 1 deletion e2e/external_dep/sub_external/subdir/sub-lib.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log("Hello");
console.log('Hello')
2 changes: 1 addition & 1 deletion e2e/worker/composite/a/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const a: string = 'a'
export const a: string = 'a'
2 changes: 1 addition & 1 deletion e2e/worker/composite/b/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const b: string = 'b'
export const b: string = 'b'
6 changes: 3 additions & 3 deletions e2e/worker/composite/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {a} from "./a";
import {b} from "./b";
import { a } from './a'
import { b } from './b'

export const c = a + b;
export const c = a + b
2 changes: 1 addition & 1 deletion e2e/worker/feature/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const name = `fancy_feature`

export const sub = import("./sub").then(s => s.name);
export const sub = import('./sub').then((s) => s.name)
2 changes: 1 addition & 1 deletion e2e/worker/feature/sub/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const name = "feature/sub";
export const name = 'feature/sub'
2 changes: 1 addition & 1 deletion e2e/worker/feature1/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const name = "feature1"
export const name = 'feature1'
2 changes: 1 addition & 1 deletion e2e/worker/feature2/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const name = "feature3"
export const name = 'feature3'
2 changes: 1 addition & 1 deletion e2e/worker/feature3/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const name = "feature3"
export const name = 'feature3'
4 changes: 2 additions & 2 deletions e2e/worker/feature4/helper/helper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function little_helpless_helper() {
return "feature4/helper"
}
return 'feature4/helper'
}
2 changes: 1 addition & 1 deletion e2e/worker/feature4/helper/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {little_helpless_helper} from "./helper";
export { little_helpless_helper } from './helper'
2 changes: 1 addition & 1 deletion e2e/worker/feature4/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const name = "feature3"
export const name = 'feature3'
6 changes: 3 additions & 3 deletions e2e/worker/feature4/src/logic1.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {little_helpless_helper} from "../helper"
import { little_helpless_helper } from '../helper'

little_helpless_helper();
little_helpless_helper()

export const name = "feature4/logic1"
export const name = 'feature4/logic1'
6 changes: 3 additions & 3 deletions e2e/worker/feature4/src/logic2.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {little_helpless_helper} from "../helper"
import { little_helpless_helper } from '../helper'

little_helpless_helper();
little_helpless_helper()

export const name = "feature4/logic2"
export const name = 'feature4/logic2'
6 changes: 3 additions & 3 deletions e2e/worker/feature4/src/logic3/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {little_helpless_helper} from "../../helper"
import { little_helpless_helper } from '../../helper'

little_helpless_helper();
little_helpless_helper()

export const name = "feature4/logic3"
export const name = 'feature4/logic3'
2 changes: 1 addition & 1 deletion e2e/worker/feature4/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"compilerOptions": {
"declaration": true
}
}
}
4 changes: 2 additions & 2 deletions e2e/worker/lib.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const name = "lib";
export const version = "1.0.0"
export const name = 'lib'
export const version = '1.0.0'
20 changes: 10 additions & 10 deletions e2e/worker/main.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as feature1 from "./feature1";
import * as feature2 from "./feature2";
import * as feature3 from "./feature3";
import * as feature4 from "./feature4";
import * as feature from "./feature";
import * as debug from "debug";
import * as feature1 from './feature1'
import * as feature2 from './feature2'
import * as feature3 from './feature3'
import * as feature4 from './feature4'
import * as feature from './feature'
import * as debug from 'debug'

import * as core from "@nestjs/core";
import * as rxjs from "rxjs";
import * as core from '@nestjs/core'
import * as rxjs from 'rxjs'

debug.log(core, rxjs);
debug.log(core, rxjs)

export const features = [
feature.name,
Expand All @@ -22,4 +22,4 @@ export function sayhello(should_i) {
if (should_i) {
console.log(features)
}
}
}
3 changes: 1 addition & 2 deletions examples/jsx/a.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

export const A = <div>a</div>
export const A = <div>a</div>
4 changes: 1 addition & 3 deletions examples/jsx/b.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@


export const B = <div>b</div>
export const B = <div>b</div>
12 changes: 6 additions & 6 deletions examples/jsx/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"allowJs": true,
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"jsx": "preserve"
"allowJs": true,
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"jsx": "preserve"
}
}
}
2 changes: 1 addition & 1 deletion examples/module_ext/a.mts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const A = "a";
export const A = 'a'
2 changes: 1 addition & 1 deletion examples/module_ext/b.mjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const B = "b";
export const B = 'b'
2 changes: 1 addition & 1 deletion examples/module_ext/c.cts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const C = "c";
export const C = 'c'
2 changes: 1 addition & 1 deletion examples/module_ext/d.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const D = "d";
export const D = 'd'
8 changes: 4 additions & 4 deletions examples/module_ext/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"allowJs": true,
"sourceMap": true,
"declaration": true,
"declarationMap": true
"allowJs": true,
"sourceMap": true,
"declaration": true,
"declarationMap": true
}
}
2 changes: 1 addition & 1 deletion examples/out_dir/main.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log('hello world')
console.log('hello world')
2 changes: 1 addition & 1 deletion examples/output_group/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const a: string = 'hello';
export const a: string = 'hello'
1 change: 0 additions & 1 deletion examples/proto_grpc/status_connect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
// @generated from file examples/proto_grpc/status.proto (package rpc, syntax proto3)
/* eslint-disable */
// @ts-nocheck

2 changes: 1 addition & 1 deletion examples/root_dirs/src/lib.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const ANSWER = 42;
export const ANSWER = 42
4 changes: 2 additions & 2 deletions examples/root_dirs/src/spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { ANSWER } from './lib';
import { ANSWER } from './lib'

console.log('TEST: ', ANSWER === 42);
console.log('TEST: ', ANSWER === 42)
Loading
Loading