Skip to content

Commit a59143f

Browse files
chore: add changesets (#103)
1 parent c7e5641 commit a59143f

File tree

13 files changed

+796
-28
lines changed

13 files changed

+796
-28
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "sourcegraph/codemod" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["@sourcegraph/demo-app"]
11+
}

.github/workflows/lsif.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v2
22+
2223
- name: Setup Node.js
2324
uses: actions/setup-node@v2
2425
with:
25-
node-version: 14
26+
node-version: 16
27+
2628
- name: Install dependencies
2729
run: yarn --ignore-engines --ignore-scripts
2830

@@ -35,6 +37,7 @@ jobs:
3537
run: src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
3638
env:
3739
SRC_ENDPOINT: https://sourcegraph.com/
40+
3841
- name: Upload lsif-tsc dump to Dogfood
3942
working-directory: ${{ matrix.root }}
4043
run: src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress || true

.github/workflows/release.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,37 @@ name: Release
22
on:
33
push:
44
branches:
5-
- master
5+
- main
6+
7+
concurrency: ${{ github.workflow }}-${{ github.ref }}
68

79
jobs:
8-
test:
10+
release:
11+
name: Release
912
runs-on: ubuntu-latest
1013
steps:
11-
- uses: actions/checkout@v2
12-
- name: Setup Node.js
14+
- name: Checkout Repo
15+
uses: actions/checkout@v2
16+
with:
17+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
18+
fetch-depth: 0
19+
20+
- name: Setup node.js
1321
uses: actions/setup-node@v2
1422
with:
15-
node-version: 14
23+
node-version: 16
24+
1625
- name: Install dependencies
17-
run: yarn install
18-
- name: Run build
19-
run: yarn build
20-
- name: Release
26+
run: yarn
27+
28+
- name: Create Release Pull Request or Publish to npm
29+
id: changesets
30+
uses: changesets/action@v1
31+
with:
32+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
33+
publish: yarn release
34+
commit: 'chore: update versions'
35+
title: 'chore: update versions'
2136
env:
2237
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2338
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24-
run: yarn semantic-release

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v2
9+
910
- name: Setup Node.js
1011
uses: actions/setup-node@v2
1112
with:
12-
node-version: 14
13+
node-version: 16
14+
1315
- name: Install dependencies
1416
run: yarn install
17+
1518
- name: Run build
1619
run: yarn build
20+
1721
- name: Run format
1822
run: yarn format:check
23+
1924
- name: Run lint
2025
run: yarn lint
26+
2127
- name: Run tests
2228
run: yarn test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ npm-debug.log
2121
yarn-error.log
2222
.eslintcache
2323
*.tsbuildinfo
24+
25+
.turbo

jest.config.base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { InitialOptionsTsJest } from 'ts-jest'
22

33
const config: InitialOptionsTsJest = {
4+
passWithNoTests: true,
45
preset: 'ts-jest',
56
globals: {
67
'ts-jest': {

jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { InitialOptionsTsJest } from 'ts-jest'
22

33
const config: InitialOptionsTsJest = {
4+
passWithNoTests: true,
45
projects: ['./packages/*/jest.config.ts'],
56
}
67

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"transform": "yarn workspace @sourcegraph/codemod-cli transform",
1313
"test": "jest",
14-
"release": "semantic-release",
14+
"release": "yarn build && yarn changeset publish",
1515
"format": "prettier '**/*.{js?(on),ts?(x),scss,md,yml}' --write --list-different --ignore-path ./.prettierignore",
1616
"format:check": "yarn format --write=false",
1717
"lint": "eslint --ignore-pattern 'demo-app' --cache .",
@@ -49,6 +49,7 @@
4949
"typescript": "4.5.2"
5050
},
5151
"devDependencies": {
52+
"@changesets/cli": "^2.22.0",
5253
"@commitlint/cli": "^16.2.3",
5354
"@commitlint/config-conventional": "^16.2.1",
5455
"@sourcegraph/eslint-config": "^0.27.1",
@@ -67,7 +68,8 @@
6768
"prettier": "^2.4.1",
6869
"semantic-release": "^17.4.4",
6970
"ts-dedent": "^2.2.0",
70-
"ts-jest": "^27.1.2"
71+
"ts-jest": "^27.1.2",
72+
"turbo": "^1.2.5"
7173
},
7274
"resolutions": {
7375
"typescript": "4.5.2"

packages/demo-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"name": "@sourcegraph/app",
3+
"name": "@sourcegraph/demo-app",
44
"version": "1.10.1",
55
"description": "The Sourcegraph web app",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)