Skip to content

Commit 11124f9

Browse files
authored
chore: move default branch to main (#8693)
1 parent 76af7df commit 11124f9

File tree

7 files changed

+38
-34
lines changed

7 files changed

+38
-34
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -407,18 +407,18 @@ workflows:
407407
filters:
408408
branches:
409409
only:
410-
- master
410+
- main
411411
- deploy-staging-approval:
412412
type: approval
413413
filters:
414414
branches:
415415
ignore:
416-
- master
416+
- main
417417
- deploy-to-staging:
418418
requires:
419419
- deploy-staging-approval
420420
- create-docker-image
421421
filters:
422422
branches:
423423
ignore:
424-
- master
424+
- main

.github/ISSUE_TEMPLATE/BUG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ Your best chance of getting this bug looked at quickly is to provide an example.
3636
| Operating System | |
3737

3838
<!-- prettier-ignore-start -->
39-
[code_of_conduct]: https://github.com/codesandbox/codesandbox-client/blob/master/CODE_OF_CONDUCT.md
40-
[contributing]: https://github.com/codesandbox/codesandbox-client/blob/master/CONTRIBUTING.md
39+
[code_of_conduct]: https://github.com/codesandbox/codesandbox-client/blob/main/CODE_OF_CONDUCT.md
40+
[contributing]: https://github.com/codesandbox/codesandbox-client/blob/main/CONTRIBUTING.md
4141
<!-- prettier-ignore-end -->

CONTRIBUTING.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ share dependencies between these parts.
2828
backends. Forked from
2929
[https://github.com/jvilk/BrowserFS](https://github.com/jvilk/BrowserFS), with
3030
an additional
31-
[CodeSandbox backend](https://github.com/codesandbox/codesandbox-client/blob/master/standalone-packages/codesandbox-browserfs/src/backend/CodeSandboxFS.ts).
31+
[CodeSandbox backend](https://github.com/codesandbox/codesandbox-client/blob/main/standalone-packages/codesandbox-browserfs/src/backend/CodeSandboxFS.ts).
3232

3333
This version of CodeSandbox is using the production server as source of truth,
3434
this is specified by the environment variable `LOCAL_SERVER`. If you're working
@@ -71,22 +71,24 @@ To install the project you need to have `yarn` and `node`
7171
- on subsequent runs you can also bypass dependencies building and use
7272
`yarn start:fast`
7373

74-
> Tip: Keep your `master` branch pointing at the original repository and make
75-
> pull requests from branches on your fork. To do this, run:
74+
> Tip: Keep your `main` branch pointing at the original repository and make pull
75+
> requests from branches on your fork. To do this, run:
7676
>
7777
> ```sh
7878
> git remote add upstream https://github.com/codesandbox/codesandbox-client.git
7979
> git fetch upstream
80-
> git branch --set-upstream-to=upstream/master master
80+
> git branch --set-upstream-to=upstream/main main
8181
> ```
8282
>
8383
> This will add the original repository as a "remote" called "upstream," then
84-
> fetch the git information from that remote, then set your local `master`
85-
> branch to use the upstream master branch whenever you run `git pull`. Then you
86-
> can make all of your pull request branches based on this `master` branch.
87-
> Whenever you want to update your version of `master`, do a regular `git pull`.
88-
89-
5. If you want to debug the state of the app, use `npx overmind-devtools` and make sure that the app is running. Learn more [here](https://overmindjs.org/core/devtools).
84+
> fetch the git information from that remote, then set your local `main` branch
85+
> to use the upstream main branch whenever you run `git pull`. Then you can make
86+
> all of your pull request branches based on this `main` branch. Whenever you
87+
> want to update your version of `main`, do a regular `git pull`.
88+
89+
5. If you want to debug the state of the app, use `npx overmind-devtools` and
90+
make sure that the app is running. Learn more
91+
[here](https://overmindjs.org/core/devtools).
9092

9193
## Submitting a Pull Request
9294

contributor-docs/adding-template.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ add (**sandbox** vs. **container**).
8787

8888
To get started, you should first follow the steps in our contribution guidelines
8989
in order to
90-
[set up CodeSandbox locally](https://github.com/codesandbox/codesandbox-client/blob/master/CONTRIBUTING.md#setting-up-the-project-locally).
90+
[set up CodeSandbox locally](https://github.com/codesandbox/codesandbox-client/blob/main/CONTRIBUTING.md#setting-up-the-project-locally).
9191

9292
### 1. Add template logo
9393

9494
Add the logo for your template in the
95-
[templates repo](https://github.com/codesandbox/codesandbox-client/tree/master/packages/template-icons/src)
95+
[templates repo](https://github.com/codesandbox/codesandbox-client/tree/main/packages/template-icons/src)
9696
(`codesandbox-templates/packages/template-icons/src`).
9797

9898
#### SVG logos
@@ -102,24 +102,24 @@ content. If your template's name is "Banana", name your logo file "BananaIcon".
102102

103103
Examples:
104104

105-
- [Vue logo](https://github.com/codesandbox/codesandbox-client/tree/master/packages/template-icons/src/VueIcon.tsx)
106-
- [React logo](https://github.com/codesandbox/codesandbox-client/tree/master/packages/template-icons/src/ReactIcon.tsx)
105+
- [Vue logo](https://github.com/codesandbox/codesandbox-client/tree/main/packages/template-icons/src/VueIcon.tsx)
106+
- [React logo](https://github.com/codesandbox/codesandbox-client/tree/main/packages/template-icons/src/ReactIcon.tsx)
107107

108108
### 2. Add template definition
109109

110110
In order for CodeSandbox to recognise your template, you need to add a new
111111
definition of it in the `codesandbox-client/packages/common/src/templates`
112-
[directory](https://github.com/codesandbox/codesandbox-client/tree/master/packages/common/src/templates).
112+
[directory](https://github.com/codesandbox/codesandbox-client/tree/main/packages/common/src/templates).
113113
You do this by creating a new `.ts` file with the name of your template.
114114

115115
Examples:
116116

117-
- [Parcel](https://github.com/codesandbox/codesandbox-client/blob/master/packages/common/src/templates/parcel.ts)
118-
- [Gatsby](https://github.com/codesandbox/codesandbox-client/blob/master/packages/common/src/templates/gatsby.ts)
117+
- [Parcel](https://github.com/codesandbox/codesandbox-client/blob/main/packages/common/src/templates/parcel.ts)
118+
- [Gatsby](https://github.com/codesandbox/codesandbox-client/blob/main/packages/common/src/templates/gatsby.ts)
119119

120120
The template definition can have various options, which you can find more
121121
information about in
122-
[template.ts](https://github.com/codesandbox/codesandbox-client/blob/master/packages/common/src/templates/template.ts).
122+
[template.ts](https://github.com/codesandbox/codesandbox-client/blob/main/packages/common/src/templates/template.ts).
123123

124124
We encourage you to improve the user experience of your templates by taking
125125
advantage of the options you have available while writing your template
@@ -133,7 +133,7 @@ Examples:
133133
<!-- TODO: Add more examples -->
134134

135135
After writing your template definition, you also need to add it to the
136-
[index.js](https://github.com/codesandbox/codesandbox-client/blob/master/packages/common/src/templates/index.ts)
136+
[index.js](https://github.com/codesandbox/codesandbox-client/blob/main/packages/common/src/templates/index.ts)
137137
file in the same directory (`codesandbox-client/packages/common/src/templates`)
138138
in order for CodeSandbox to be able to retrieve your template.
139139

@@ -148,18 +148,18 @@ preset.
148148

149149
We call a template configuration for the bundler in CodeSandbox a 'Preset'. All
150150
currently installed presets are defined in the
151-
[index.ts](https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/sandbox/eval/index.ts)
151+
[index.ts](https://github.com/codesandbox/codesandbox-client/blob/main/packages/app/src/sandbox/eval/index.ts)
152152
file under `codesandbox-client/packages/app/src/sandbox/eval/presets`.
153153

154154
In order to understand how this configuration works, we recommend you to take a
155155
look at templates that have already been implemented and their presets.
156156

157157
Examples:
158158

159-
- [create-react-app-typescript](https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/sandbox/eval/presets/create-react-app-typescript/index.js)
159+
- [create-react-app-typescript](https://github.com/codesandbox/codesandbox-client/blob/main/packages/app/src/sandbox/eval/presets/create-react-app-typescript/index.js)
160160
(most basic one)
161-
- [CxJS](https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/sandbox/eval/presets/cxjs/index.js)
162-
- [vue-cli](https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/sandbox/eval/presets/vue-cli/index.js)
161+
- [CxJS](https://github.com/codesandbox/codesandbox-client/blob/main/packages/app/src/sandbox/eval/presets/cxjs/index.js)
162+
- [vue-cli](https://github.com/codesandbox/codesandbox-client/blob/main/packages/app/src/sandbox/eval/presets/vue-cli/index.js)
163163

164164
### 4. Add the importer
165165

@@ -169,7 +169,7 @@ template for every template. This logic is **not** found in `codesanbox-client`.
169169

170170
This means you that you also have to add your template in another file in the
171171
`codesandbox-importers` repository called
172-
[templates.ts](https://github.com/codesandbox/codesandbox-importers/blob/master/packages/import-utils/src/create-sandbox/templates.ts).
172+
[templates.ts](https://github.com/codesandbox/codesandbox-importers/blob/main/packages/import-utils/src/create-sandbox/templates.ts).
173173

174174
When you create your Pull Request in `codesanbox-client`, you also need to
175175
create a Pull Request in `codesandbox-importer` and reference it in your Pull
@@ -190,7 +190,7 @@ functionality of templates using containers.
190190

191191
To test your new template, you need to create a mock response from the API and
192192
force the new template specification. To do this, you uncomment
193-
[this line](https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/app/store/actions.js#L17)
193+
[this line](https://github.com/codesandbox/codesandbox-client/blob/main/packages/app/src/app/store/actions.js#L17)
194194
and change `'custom'` to the id/name of your template:
195195

196196
```diff

packages/app/src/app/overmind/factories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const withLoadApp = <I>(
9393
const response = await effects.http.get<{
9494
contributors: Contributor[];
9595
}>(
96-
'https://raw.githubusercontent.com/codesandbox/codesandbox-client/master/.all-contributorsrc'
96+
'https://raw.githubusercontent.com/codesandbox/codesandbox-client/main/.all-contributorsrc'
9797
);
9898

9999
state.contributors = response.data.contributors.map(

packages/app/src/app/pages/Dashboard/Components/SyncedSandbox/SyncedSandboxListItem.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export const SyncedSandboxListItem = ({ name, path, url, ...props }) => {
6161
<Stack justify="space-between" align="center">
6262
<Text size={3} weight="medium" css={{ color: '#E5E5E5' }}>
6363
{name}
64-
{props.branch !== 'master' ? `:${props.branch}` : ''}
64+
{['main', 'master'].includes(props.branch)
65+
? ''
66+
: `:${props.branch}`}
6567
</Text>
6668
</Stack>
6769
</Stack>

testpr-script.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function test(prId) {
3131
const branchName = `pr-${username.sync()}-${prId}`;
3232

3333
Promise.resolve()
34-
.then(() => spawnPromise('git', ['checkout', 'master']))
34+
.then(() => spawnPromise('git', ['checkout', 'main']))
3535
.then(() => spawnPromise('git', ['branch', '-D', branchName]))
3636
.catch(() => {
3737
/* Do not care if this fails */
@@ -45,7 +45,7 @@ async function test(prId) {
4545
])
4646
)
4747
.then(() => spawnPromise('git', ['checkout', branchName]))
48-
.then(() => spawnPromise('git', ['merge', 'master']))
48+
.then(() => spawnPromise('git', ['merge', 'main']))
4949
.then(() => spawnPromise('yarn', ['install']))
5050
.then(() => spawnPromise('yarn', ['build:deps']))
5151
.then(() => spawnPromise('yarn', ['typecheck']))

0 commit comments

Comments
 (0)