Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Retire reaction and merge files into Force #5636

Merged
merged 30 commits into from
May 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6b6d3c2
[Migration] Add reaction files
damassi May 21, 2020
ca1337b
[Migration] Update tsconfig settings
damassi May 21, 2020
d41c6d1
[Migration] Update tsconfig and delete old __generated__
damassi May 21, 2020
09c1081
Fix type-check errors in force
damassi May 21, 2020
573e746
[Migration] Add relay
damassi May 21, 2020
681f35e
[Migration] Storybooks
damassi May 21, 2020
bb97445
[Migration] Temporarily disable @types for relay
damassi May 21, 2020
5fbc96e
[Migration] Enable incremental type-checking
damassi May 21, 2020
19f6bd7
[Migration] Update import paths
damassi May 22, 2020
1a6024f
[Migration] Delete publishing folder
damassi May 22, 2020
e26ed55
[Migration] Rename v2/*.test to .jest
damassi May 22, 2020
d099c47
[Migration] Migrate tests
damassi May 22, 2020
3dd59fd
[Migration] Finish migration
damassi May 22, 2020
f2fdcfe
Rename .babelrc to babel.config.js
damassi May 22, 2020
8241738
Move https://github.com/artsy/reaction/pull/3572
damassi May 22, 2020
7f89b5a
Move https://github.com/artsy/reaction/pull/3576
damassi May 22, 2020
2da85f3
Move https://github.com/artsy/reaction/pull/3589
damassi May 22, 2020
2fd98a5
Move https://github.com/artsy/reaction/pull/3587
damassi May 22, 2020
d35c60e
[Migration] Update coffeescript /v2 paths to relative
damassi May 22, 2020
386a558
Move https://github.com/artsy/reaction/pull/3590
damassi May 22, 2020
23490fe
[Migration] Fix tracking event invocation
damassi May 22, 2020
20033f6
[Migration] Comment out experiment viewed
damassi May 22, 2020
8f6c5b9
Disable codecov for jest for now
damassi May 22, 2020
b0403e6
Merge branch 'retire-reaction' of https://github.com/damassi/force in…
damassi May 22, 2020
be9feba
[Test] Try setting jest workers to 4
damassi May 22, 2020
8493d58
[Test] More CI faffing
damassi May 22, 2020
90cf907
[Test] Set jest settings back to normal
damassi May 22, 2020
50554ad
[Test] Run tests outside of docker context
damassi May 22, 2020
996653e
[Test] Readd deploy requirements; set maxWorkers=2
damassi May 23, 2020
4ad68f3
[Test] Readd deploy requirements
damassi May 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 0 additions & 52 deletions .babelrc

This file was deleted.

66 changes: 42 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,35 +112,52 @@ only_release: &only_release
workflows:
default:
jobs:
- yarn/workflow-queue
- horizon/block:
<<: *only_release
context: horizon
project_id: 11

# Pre-staging
- hokusai/test:
name: test
<<: *not_staging_or_release
post-steps:
- run: mkdir -p ./coverage ./.nyc_output ./reports
- run:
name: Copy jest coverage artifacts
command: docker cp hokusai_force_1:/app/coverage ./
when: always
- codecov/upload:
file: ./coverage/lcov.info
- run:
name: Copy mocha coverage artifacts
command: docker cp hokusai_force_1:/app/.nyc_output ./
when: always
- codecov/upload:
file: ./.nyc_output/lcov.info
- run:
name: Copy coverage reports
command: docker cp hokusai_force_1:/app/reports ./
when: always
- store_test_results:
path: ./reports
- yarn/jest:
args: --runInBand
requires:
- yarn/workflow-queue

- yarn/run:
name: test:mocha
script: "test:mocha"
requires:
- yarn/workflow-queue

# TODO: Disabled due to memory issues. Can we use our workflows above and
# upload coverage that way (similar to reaction). We save a lot of time
# by operating outside of an unnecessary docker context.

# - hokusai/test:
# name: test
# <<: *not_staging_or_release
# post-steps:
# - run: mkdir -p ./coverage ./.nyc_output ./reports
# - run:
# name: Copy jest coverage artifacts
# command: docker cp hokusai_force_1:/app/coverage ./
# when: always
# - codecov/upload:
# file: ./coverage/lcov.info
# - run:
# name: Copy mocha coverage artifacts
# command: docker cp hokusai_force_1:/app/.nyc_output ./
# when: always
# - codecov/upload:
# file: ./.nyc_output/lcov.info
# - run:
# name: Copy coverage reports
# command: docker cp hokusai_force_1:/app/reports ./
# when: always
# - store_test_results:
# path: ./reports

- yarn/update-cache:
<<: *not_staging_or_release
- yarn/type-check:
Expand All @@ -159,7 +176,8 @@ workflows:
name: push-staging-image
<<: *only_master
requires:
- test
- yarn/jest
- test:mocha
- acceptance
- build

Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/__generated__/*.graphql.ts linguist-generated
src/v2/__generated__/*.graphql.ts linguist-generated
47 changes: 24 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
lib-cov
*.seed
*.log
.artifact
.artifacts
.cache
.cache-loader
.DS_Store
.env
.env.*
.storybook/.DS_Store
.storybook/manager.jss
.yalc
*.csv
*.dat
*.DS_Store
*.gz
*.log
*.out
*.pid
*.gz
*.projectile
*.DS_Store
.env
.env.*
pids
logs
results
npm-debug.log
.DS_Store
*.seed
dump.rdb
lib-cov
logs
manifest.json
.cache
.cache-loader
.artifacts

/data
npm-debug.log
pids
results
storybook_build
yalc.lock

/dist
/node_modules
/public
/src/desktop/public/assets
/src/mobile/public/assets

node_modules
/node_modules
/public

# Compiled server code
server.dist.js
Expand All @@ -41,6 +45,3 @@ cypress/screenshots
reports*
junit.xml
cypress/videos

.yalc
yalc.lock
2 changes: 2 additions & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "@storybook/addon-options/register"
import "@storybook/addon-viewport/register"
35 changes: 35 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Events from "v2/Utils/Events"
import { configure, addParameters } from "@storybook/react"
import { createMediaStyle } from "v2/Utils/Responsive"

const req = require.context("../", true, /\.story\.tsx$/)

function loadStories() {
req.keys().forEach(filename => {
return req(filename)
})
}

// Add RRM styles to Storybooks head
const rrmStyle = document.createElement("style")
rrmStyle.innerHTML = createMediaStyle()
document.head.appendChild(rrmStyle)

addParameters({
inline: true,
brandTitle: "Reaction",
showAddonPanel: false,
sortStoriesByKind: true,
})

setTimeout(() => {
configure(loadStories, module)
})

Events.onEvent(data => {
console.log("Tracked event", data)
})

if (!window.sd || !(typeof window.sd === "object")) {
window.sd = {}
}
16 changes: 16 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<link
rel="stylesheet"
type="text/css"
href="https://webfonts.artsy.net/all-webfonts.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css"
/>
<script id="stripe-js" src="https://js.stripe.com/v3/" async></script>
17 changes: 17 additions & 0 deletions .storybook/sharify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const crypto = require("crypto")
const fs = require("fs")
const os = require("os")
const path = require("path")

module.exports = data => {
const blob = JSON.stringify(data)
const blobHash = crypto
.createHash("md5")
.update(blob)
.digest("hex")
const pathname = path.join(os.tmpdir(), `${blobHash}.js`)
fs.writeFileSync(pathname, `module.exports = { data: ${blob} }`, {
encoding: "utf8",
})
return pathname
}
Loading