Skip to content

Commit fa70d0a

Browse files
authored
Enable changesets (firebase#3268)
* enable changeset * Create release pull request * change env variable name * use the correct secret in GHA * make firebase a devDependency in integration test projects * initial changeset release rewrite * clean up imports in cli.ts * save progress * implement canary release * update changesets to the latest * ignore integration test projects * save updates * update ignore list * stream changeset output * validate version for staging releases * fix bug * add option * skip private packages * remove unused things * update release script * fix type errors * remove commented code * fix types * add Changeset check * compare to master
1 parent 04874c9 commit fa70d0a

File tree

31 files changed

+1217
-771
lines changed

31 files changed

+1217
-771
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/master/docs/common-questions.md)

.changeset/config.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "firebase/firebase-js-sdk"}],
4+
"commit": false,
5+
"linked": [],
6+
"access": "restricted",
7+
"baseBranch": "master",
8+
"updateInternalDependencies": "patch",
9+
"ignore": [
10+
"firebase-browserify-test",
11+
"firebase-package-typings-test",
12+
"firebase-firestore-integration-test",
13+
"firebase-messaging-selenium-test",
14+
"firebase-typescript-test",
15+
"firebase-webpack-test",
16+
"@firebase/app-exp",
17+
"@firebase/app-types-exp",
18+
"@firebase/functions-exp",
19+
"@firebase/functions-types-exp",
20+
"firebase-exp"
21+
],
22+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
23+
"onlyUpdatePeerDependentsWhenOutOfRange": true,
24+
"useCalculatedVersionForSnapshots": true
25+
}
26+
}

.github/workflows/changesets.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Changeset Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Changeset Check
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
16+
- name: Setup Node.js 12.x
17+
uses: actions/setup-node@master
18+
with:
19+
node-version: 12.x
20+
21+
- name: Install Dependencies
22+
run: yarn
23+
24+
- name: Check if any Changeset file exists
25+
run: yarn changeset status --since=master

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js 12.x
20+
uses: actions/setup-node@master
21+
with:
22+
node-version: 12.x
23+
24+
- name: Install Dependencies
25+
run: yarn
26+
27+
- name: Create Release Pull Request
28+
uses: changesets/action@master
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

integration/browserify/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"test": "karma start --single-run",
88
"test:ci": "node ../../scripts/run_tests_in_ci.js"
99
},
10-
"dependencies": {
11-
"firebase": "7.15.4"
12-
},
1310
"devDependencies": {
11+
"firebase": "7.15.4",
1412
"@babel/core": "7.9.6",
1513
"@babel/preset-env": "7.9.6",
1614
"browserify": "16.5.1",

integration/firebase-typings/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"test": "tsc",
77
"test:ci": "node ../../scripts/run_tests_in_ci.js"
88
},
9-
"dependencies": {
10-
"firebase": "7.15.4"
11-
},
129
"devDependencies": {
10+
"firebase": "7.15.4",
1311
"typescript": "3.8.3"
1412
}
1513
}

integration/messaging/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"test": "mocha --exit",
88
"test:manual": "mocha --exit"
99
},
10-
"dependencies": {
11-
"firebase": "7.15.4"
12-
},
1310
"devDependencies": {
11+
"firebase": "7.15.4",
1412
"chai": "4.2.0",
1513
"chromedriver": "^83.0.0",
1614
"express": "4.17.1",

integration/typescript/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"test": "karma start --single-run",
77
"test:ci": "node ../../scripts/run_tests_in_ci.js"
88
},
9-
"dependencies": {
10-
"firebase": "7.15.4"
11-
},
129
"devDependencies": {
10+
"firebase": "7.15.4",
1311
"@babel/core": "7.9.6",
1412
"@babel/preset-env": "7.9.6",
1513
"@types/chai": "4.2.11",

integration/webpack/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"test": "karma start --single-run",
88
"test:ci": "node ../../scripts/run_tests_in_ci.js"
99
},
10-
"dependencies": {
11-
"firebase": "7.15.4"
12-
},
1310
"devDependencies": {
11+
"firebase": "7.15.4",
1412
"@babel/core": "7.9.6",
1513
"@babel/preset-env": "7.9.6",
1614
"chai": "4.2.0",

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"link:packages": "lerna exec --scope @firebase/* --scope firebase --scope rxfire -- yarn link",
3030
"stage:packages": "./scripts/prepublish.sh",
3131
"repl": "node tools/repl.js",
32-
"release": "node scripts/release/cli.js",
32+
"release": "ts-node-script scripts/release/cli.ts",
3333
"pretest": "node tools/pretest.js",
3434
"test": "lerna run --concurrency 4 --stream test",
3535
"test:ci": "lerna run --concurrency 4 --stream test:ci",
@@ -60,17 +60,23 @@
6060
"integration/*"
6161
],
6262
"devDependencies": {
63+
"@changesets/changelog-github": "0.2.5",
64+
"@changesets/cli": "2.9.1",
6365
"@microsoft/api-documenter": "7.7.20",
6466
"@microsoft/api-extractor": "7.7.13",
6567
"@types/chai": "4.2.11",
6668
"@types/chai-as-promised": "7.1.2",
69+
"@types/child-process-promise": "2.2.1",
70+
"@types/clone": "0.1.30",
71+
"@types/inquirer": "6.5.0",
6772
"@types/long": "4.0.1",
6873
"@types/mocha": "7.0.2",
6974
"@types/node": "12.12.37",
7075
"@types/sinon": "9.0.0",
7176
"@types/sinon-chai": "3.2.4",
7277
"@types/tmp": "0.2.0",
7378
"@types/yargs": "15.0.4",
79+
"@types/listr": "0.14.2",
7480
"@typescript-eslint/eslint-plugin": "2.30.0",
7581
"@typescript-eslint/eslint-plugin-tslint": "2.30.0",
7682
"@typescript-eslint/parser": "2.30.0",

0 commit comments

Comments
 (0)