Skip to content

Commit c05b669

Browse files
author
Eric Berry
committed
Merge remote-tracking branch 'upstream/master'
# Conflicts: # packages/app/src/app/pages/Sandbox/Editor/Workspace/Advertisement/CodeSponsor.js # packages/app/src/app/pages/Sandbox/Editor/Workspace/Advertisement/index.js
2 parents 9c31297 + 7e4a81c commit c05b669

File tree

4,365 files changed

+2834148
-83310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,365 files changed

+2834148
-83310
lines changed

.all-contributorsrc

+398-3
Large diffs are not rendered by default.

.babelrc

-24
This file was deleted.

.circleci/config.yml

+52-47
Original file line numberDiff line numberDiff line change
@@ -3,73 +3,89 @@ version: 2
33
jobs:
44
build-dependencies:
55
docker:
6-
- image: circleci/node:9.2.1
6+
- image: circleci/node:10
77
working_directory: ~/codesandbox-client
88
steps:
99
- checkout
1010
- restore_cache:
1111
keys:
12-
- v3-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
13-
- v3-dependency-cache-{{ .Branch }}
14-
- v3-dependency-cache
12+
- v14-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
13+
- v14-dependency-cache-{{ .Branch }}
14+
- v14-dependency-cache
15+
- restore_cache:
16+
keys:
17+
- v14-standalone-dependency-cache-{{ .Branch }}-{{ checksum "standalone-packages/codesandbox-browserfs/yarn.lock" }}
18+
- v14-standalone-dependency-cache-{{ .Branch }}
19+
- v14-standalone-dependency-cache
1520
- run:
1621
name: Install Dependencies
1722
command: yarn install
1823
- save_cache:
19-
key: v3-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
24+
key: v14-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
2025
paths:
2126
- node_modules
27+
- packages/app/node_modules
28+
- packages/codesandbox-api/node_modules
29+
- packages/common/node_modules
30+
- packages/homepage/node_modules
31+
- packages/react-sandpack/node_modules
32+
- packages/sandpack/node_modules
33+
- save_cache:
34+
key: v14-standalone-dependency-cache-{{ .Branch }}-{{ checksum "standalone-packages/codesandbox-browserfs/yarn.lock" }}
35+
paths:
36+
- standalone-packages/codesandbox-browserfs/node_modules
2237
- run:
2338
name: Build
24-
command: yarn build:dependents
39+
command: yarn build:deps
2540
- save_cache:
26-
key: v3-repo-{{ .Environment.CIRCLE_SHA1 }}
41+
key: v14-repo-{{ .Environment.CIRCLE_SHA1 }}
2742
paths:
2843
- ~/codesandbox-client
2944

3045
build-prod:
3146
docker:
32-
- image: circleci/node:9.2.1
47+
- image: circleci/node:10
3348
working_directory: ~/codesandbox-client
3449
steps:
3550
- restore_cache:
36-
key: v3-repo-{{ .Environment.CIRCLE_SHA1 }}
51+
key: v14-repo-{{ .Environment.CIRCLE_SHA1 }}
3752
# We do this to compare sizes from these builds with master
3853
- restore_cache:
39-
key: v3-prod-app-build-cache-master
54+
key: v14-prod-app-build-cache-master
4055
- run:
4156
name: Build Application
4257
command: yarn build:prod
4358
- save_cache:
44-
key: v3-prod-app-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
59+
key: v14-prod-app-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
4560
paths:
4661
- ./packages/app/www
4762
- save_cache:
48-
key: v3-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
63+
key: v14-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
4964
paths:
5065
- ./www
51-
- store_artifacts:
52-
path: ./www
53-
destination: www
5466

5567
test-integrations:
5668
docker:
5769
- image: codesandbox/node-puppeteer
5870
working_directory: ~/codesandbox-client
5971
steps:
6072
- restore_cache:
61-
key: v3-repo-{{ .Environment.CIRCLE_SHA1 }}
73+
key: v14-repo-{{ .Environment.CIRCLE_SHA1 }}
6274
- run:
6375
name: Start Test Server
6476
command: yarn start:test
6577
background: true
78+
- run:
79+
name: Setup BrowserStack local environment
80+
command: '[ -n "$BROWSER_STACK_KEY" ] && ./packages/app/integration-tests/BrowserStackLocal --key $BROWSER_STACK_KEY || true'
81+
background: true
6682
- run:
6783
name: Test Integrations
6884
command: |
69-
sleep 6
85+
sleep 15
7086
yarn test:integrations --ci --testResultsProcessor="jest-junit"
7187
environment:
72-
JEST_JUNIT_OUTPUT: "/tmp/test-results/js-test-results.xml"
88+
JEST_JUNIT_OUTPUT: '/tmp/test-results/js-test-results.xml'
7389
- store_test_results:
7490
path: /tmp/test-results
7591
- store_artifacts:
@@ -78,45 +94,44 @@ jobs:
7894

7995
test-jest:
8096
docker:
81-
- image: circleci/node:9.2.1
97+
- image: circleci/node:10
8298
working_directory: ~/codesandbox-client
8399
steps:
84100
- restore_cache:
85-
key: v3-repo-{{ .Environment.CIRCLE_SHA1 }}
101+
key: v14-repo-{{ .Environment.CIRCLE_SHA1 }}
86102
- run:
87103
name: Test
88104
command: yarn test --ci --testResultsProcessor="jest-junit"
89105
environment:
90-
JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml"
106+
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
91107

92108
lint:
93109
docker:
94-
- image: circleci/node:9.2.1
110+
- image: circleci/node:10
95111
working_directory: ~/codesandbox-client
96112
steps:
97113
- restore_cache:
98-
key: v3-repo-{{ .Environment.CIRCLE_SHA1 }}
114+
key: v14-repo-{{ .Environment.CIRCLE_SHA1 }}
99115
- run:
100116
name: Lint
101117
command: yarn lint
102118

103-
deploy:
104-
docker:
105-
- image: circleci/node:9.2.1
119+
create-docker-image:
120+
machine: true
106121
working_directory: ~/codesandbox-client
107122
steps:
123+
- checkout
108124
- restore_cache:
109-
key: v3-repo-{{ .Environment.CIRCLE_SHA1 }}
110-
- restore_cache:
111-
key: v3-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
112-
- add_ssh_keys:
113-
fingerprints:
114-
- "f7:f1:e6:60:96:24:d9:cd:1b:8b:c0:34:e7:ee:fa:82"
125+
key: v14-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
115126
- run:
116-
name: Add key to known_hosts
117-
command: echo "ssh.codesandbox.io ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKyKbuMPJSETTyPRRJVOeC5I8j7wyUMW8HYheg7cN71eKTuw55tkoygxI59BvNi/CAyCnRT5LnxZhvrq9nSlPYc=" >> ~/.ssh/known_hosts
127+
name: Docker Sign In
128+
command: '[ -n "$DOCKER_USER" ] && echo $DOCKER_PWD | docker login -u $DOCKER_USER --password-stdin || true'
129+
- run:
130+
name: Create Image
131+
command: '[ -n "$DOCKER_USER" ] && docker build -t codesandbox/client:${CIRCLE_SHA1:0:7} . || true'
118132
- deploy:
119-
command: sh ./deploy.sh
133+
name: Push Image
134+
command: '[ -n "$DOCKER_USER" ] && docker push codesandbox/client:${CIRCLE_SHA1:0:7} || true'
120135

121136
workflows:
122137
version: 2
@@ -135,19 +150,9 @@ workflows:
135150
- build-prod:
136151
requires:
137152
- build-dependencies
138-
- hold:
139-
type: approval
140-
filters:
141-
branches:
142-
only: master
153+
- create-docker-image:
143154
requires:
144155
- build-prod
145156
- lint
146-
- test-integrations
157+
# - test-integrations
147158
- test-jest
148-
- deploy:
149-
filters:
150-
branches:
151-
only: master
152-
requires:
153-
- hold

.dockerignore

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
node_modules
2-
.vscode
3-
deploy.sh
4-
Dockerfile
5-
Dockerfile.prod
1+
*
2+
!www

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[*.js]
2+
indent_style = space
3+
indent_size = 2
4+
end_of_line = lf

.eslintrc

+9-5
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@
1010
"globals": {
1111
"Raven": true,
1212
"VERSION": true,
13-
"$PropertyType": true
13+
"$PropertyType": true,
14+
"TimeoutID": true
1415
},
1516
"rules": {
1617
"react/jsx-filename-extension": 0,
1718
"react/sort-comp": 0,
1819
"import/no-extraneous-dependencies": 0,
20+
"react/prop-types": 0,
1921
"arrow-parens": 0,
2022
"import/prefer-default-export": 0,
2123
"class-methods-use-this": 0,
2224
"no-console": ["error", { "allow": ["error"] }],
2325
"prefer-template": "off",
24-
"no-plusplus": 0
25-
},
26-
"settings": {
27-
"import/resolver": "webpack"
26+
"no-plusplus": 0,
27+
"no-underscore-dangle": "off",
28+
"no-nested-ternary": "warn",
29+
"react/require-default-props": "off",
30+
"import/no-named-default": 0,
31+
"no-param-reassign": ["error", { "props": false }]
2832
}
2933
}
File renamed without changes.

.github/ISSUE_TEMPLATE/BUG.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Did something not work?
4+
---
5+
6+
# 🐛 bug report
7+
8+
## Description of the problem
9+
## How has this issue affected you? What are you trying to accomplish?
10+
11+
### Link to sandbox: [link]() (optional)
12+
### Your Environment
13+
| Software | Name/Version|
14+
| ---------------- | ---------- |
15+
| Сodesandbox |
16+
| Browser |
17+
| Operating System |

.github/ISSUE_TEMPLATE/FEATURE.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: 🌈 Feature
3+
about: What cool thing would you like to add?
4+
---
5+
6+
# 🌈 Feature
7+
8+
<!-- What is this feature? -->
9+
<!-- How the feature should work? -->
10+
<!-- You have examples or an idea how it can be implemented? -->

.github/ISSUE_TEMPLATE/QUESTION.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: ❔ Question
3+
about: Have any questions?
4+
---
5+
6+
# ❔ Question
7+
8+
<!--- Provide your question, code sample Or other information that will help in solving here -->
9+
10+
### Link to sandbox: [link]() (optional)
11+
### Your Environment
12+
| Software | Name/Version|
13+
| ---------------- | ---------- |
14+
| Сodesandbox |
15+
| Browser |
16+
| Operating System |

.github/stale.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 180
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 15
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- bug
8+
only: issues
9+
# Label to use when marking an issue as stale
10+
staleLabel: stale?
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
17+
closeComment: >
18+
This issue has been automatically closed due to inactivity.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ yarn-error.log
2424
jest
2525

2626
lerna-debug.log
27+
28+
standalone-packages/monaco-editor-core

.prettierignore

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
!/standalone-packages/vscode/src/vs/codesandbox/
2+
!/standalone-packages/vscode/src/vs/codesandbox/*
3+
!/standalone-packages/vscode/src/vs/codesandbox/**/*.ts
4+
!/standalone-packages/vscode/src/vs/codesandbox/**/*.*
5+
16
static/
2-
package.json
7+
/package.json
8+
/standalone-packages/*
9+
10+
# Our server side code changes html, we don't want to unintentionally break this by formatting
11+
*.html

.travis.yml

-5
This file was deleted.

0 commit comments

Comments
 (0)