Oliver Eyton-Williams
e118dda13a
fix: order imports and remove circular dependencies ( #41824 )
...
* fix: remove circular dependency
redux depended on templates/Challenges/redux and vice versa. This
meant that import order mattered and confusing bugs could arise.
(cherry picked from commit 7d67a4e70922bbb3051f2f9982dcc69e240d43dc)
* feat: require imports to be in alphabetical order
Import order generally does not matter, but there are edge cases
(circular imports and css imports, for example) where changing order
changes behaviour
(cherry picked from commit b8d1393a91ec6e068caf8e8498a5c95df68c2b2c)
* chore: order imports
* fix: lift up challenge description + title comps
This brings the classic Show closer to the others as they
now all create the description and title components
* fix: remove donation-saga/index circular import
(cherry picked from commit 51a44ca668a700786d2744feffeae4fdba5fd207)
* refactor: extract action-types from settings
(cherry picked from commit 25e26124d691c84a0d0827d41dafb761c686fadd)
* fix: lint errors
* feat: prevent useless renames
2021-08-02 08:39:40 -05:00
Oliver Eyton-Williams
1ba9d03cb5
feat: remove csrf from the client ( #42242 )
2021-07-16 10:49:47 -05:00
Shaun Hamilton and Oliver Eyton-Williams
6ca6d9950c
feat(client): improve SuperBlock cert claiming UX ( #41147 )
...
* feat(client): improve SuperBlock cert claiming UX
* broken: add certCard foundation
* broken: add TODO comments for scatter-brain
* restructure stepsToClaimSelector
* add api-server verifyCanClaimCert logic
* temp: correct verifyCanClaim URL
* move GET logic to CertificationCard, remove console.logs
* add error handling, and navigation logic
* correct verification logical flow
* fix completion-epic updates, fix cert verify
* update widget to button, disable button unless verified
* working: refactor CertChallenge with hook state
* add StepsType
* update Honesty snapshot
* add DonationModal to SuperBlockIntro
* disable Claim Cert button unless also isHonest
* prevent warning when viewing cert
* test: use navigate in Modal to return to hash
* test: replace gatsby.navigate with reach/router.navigate
* add propTypes
* fix: rename propTypes -> prop-types
* use react-scrollable-anchor to squash modal bug
* update location parser type
* open-source Oliver's suggestion
* fix superblock title
* add claim-cert-from-learn tests
* use larger tests
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
* fix some cypress stuff
* fix ShowCertification cypress test
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-07-15 23:51:27 +09:00
Oliver Eyton-Williams and Nicholas Carrigan
92d7ae1725
fix(client): remove extra slash when redirecting to client ( #42588 )
...
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com >
2021-07-12 13:54:54 +05:30
Renovate Bot
7c2a4aff6e
chore(deps): update dependency jest to v27
2021-07-06 19:01:17 +05:30
Mrugesh Mohapatra
adc09ec180
chore: apply npm audit fix to all packages
2021-06-28 19:00:55 +05:30
Mrugesh Mohapatra
9015ad3151
chore(api): update deps - major - @sentry/node
2021-06-28 19:00:55 +05:30
Mrugesh Mohapatra
faa9996681
chore(api): update deps - minor
2021-06-28 19:00:55 +05:30
Mrugesh Mohapatra
ba3a3f60e1
chore(api): update deps - patch
2021-06-28 19:00:55 +05:30
Ahmad Abdolsaheb and Oliver Eyton-Williams
b3f2c64de8
fix(client): remove algolia and hot keys modules from landing pages ( #42394 )
...
* fix(client): remove algolia and hot keys from landing pages
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-06-24 12:50:36 +03:00
Huyen Nguyen
2c16234853
chore: add jest global variables ( #42573 )
2021-06-20 09:14:42 +02:00
Nicholas Carrigan (he/him) and Oliver Eyton-Williams
7857c3932b
fix: signout redirect ( #42538 )
...
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-06-17 23:54:18 +05:30
Oliver Eyton-Williams
a555e013a0
refactor: remove unused env vars ( #42500 )
2021-06-15 09:57:10 -07:00
gikf
bc9e8a69de
fix(client): display legacy certs like current ones ( #42038 )
...
* fix: display legacy certs like the current ones
* fix: link projects in legacy certs to project pages
* fix: update tests to changed legacy cert display
* fix: update tests for removed legacy certs forms
* fix: display legacy certs like the current ones
* fix: submit projects for cert on projects pages
* fix: remove legacy certs form submitting handling
* fix: move claiming cert setup before both tests
* fix: remove legacy cert update props and actions
* fix: remove legacy cert updates from api
* fix: correct merge conflict
2021-06-11 17:06:46 +01:00
Mrugesh Mohapatra
2db594d318
chore: apply npm audit:fix
2021-06-08 21:16:56 +05:30
Oliver Eyton-Williams
3875c6e619
fix: use env.json in both client and server ( #42359 )
2021-06-08 13:12:44 +01:00
Oliver Eyton-Williams
7b65909522
feat: make api only return json ( #42320 )
...
* fix(api): return json for delete + reset-progress
* refactor(api): make .json calls explicit
These .send() calls had objects as arguments. Using .json() makes it
explicit without changing behaviour.
* fix: return json or redirectWithFlash
We should never be getting requests for plain text, but if we do they
should be redirected back to the client.
* fix: prioritize JSON responses
If accepted, respond with JSON. If not, it's probably a bad request.
2021-06-05 13:20:40 +01:00
Oliver Eyton-Williams
802273cf8a
refactor: remove sinon ( #42337 )
2021-06-02 21:03:05 +05:30
Oliver Eyton-Williams
2648f75df6
fix: remove redundant babel plugin ( #42234 )
...
@babel/plugin-proposal-class-properties is now included in preset-env
2021-05-24 13:30:09 -07:00
Mrugesh Mohapatra
6d8baddec0
chore: update api deps, apply npm audit fix ( #42179 )
...
* chore(api): bump minor and patch
* chore: apply npm audit fix across deps
2021-05-18 22:39:26 +05:30
Oliver Eyton-Williams
1c1d86922c
refactor: simplify jest config ( #42136 )
...
* refactor: bring api jest tests to root
* refactor: pull client tests to root
* fix: remove ancient curriculum babelrc
* feat: run all jest tests at once
* fix: remove unused babelrcRoot
* chore: remove more jests
2021-05-16 18:08:04 +05:30
Mrugesh Mohapatra
83943de719
chore: rollback CSRF token generation ( #42082 )
...
This reverts commit e1c00138a9 .
2021-05-11 00:27:08 +05:30
Oliver Eyton-Williams and Ahmad Abdolsaheb
e1c00138a9
fix: generate csrf tokens on server ( #41968 )
...
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com >
2021-05-10 21:40:42 +05:30
21dd80c47a
chore(deps): update dependency prettier to v2.3.0 ( #42074 )
...
* chore(deps): update dependency prettier to v2.3.0
* chore: apply formating per prettier
* fix: correctly disable import/no-unresolved
Co-authored-by: Renovate Bot <bot@renovateapp.com >
Co-authored-by: Mrugesh Mohapatra <hi@mrugesh.dev >
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-05-10 08:48:49 -07:00
Mrugesh Mohapatra and Oliver Eyton-Williams
81d8d3f294
fix(npm-audit): improve audit and fix run-scripts ( #42050 )
...
* fix(npm-audit): improve audit and fix run-scripts
* fix: include --no-bail
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com >
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-05-07 23:48:11 +05:30
Ahmad Abdolsaheb and Oliver Eyton-Williams
27c8d564e4
fix(client): replace Stripe with PayPal ( #41924 )
...
* feat: remove stripe payment option from client
* feat: remove stripe completely
* fix: remove last Stripe remnants
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-05-03 11:45:23 +03:00
Mrugesh Mohapatra
341fe76f0f
chore: roll back CSRF changes for the weekend
...
This reverts commit 00193858a0 .
2021-04-30 23:57:28 +05:30
Oliver Eyton-Williams and Mrugesh Mohapatra
00193858a0
fix: generate csrf tokens on server not client ( #41908 )
...
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com >
2021-04-30 09:42:26 +03:00
Oliver Eyton-Williams
300ff756ce
fix(api): stop ignored files (tests) being copied ( #41926 )
2021-04-27 10:40:01 -07:00
Shaun Hamilton
d3f59e6d5d
fix(dev): rename superBlock with v7 to certSlug ( #41738 )
...
* fix(dev): rename superBlock with v7 to slug
* improve name slug -> certSlug
* superBlockTitle -> superBlock
* correct teeny, tiny mistake
* fix: correct slug to certSlug in certLocation
* refactor currentCerts
* rename showCert cert -> certSlug and various
2021-04-23 22:29:17 +03:00
Oliver Eyton-Williams
5d46e2830a
feat: add Docker build ( #41187 )
...
* feat(docker): build and use client and api images
* feat: always use .env
dotenv fails without throwing if the .env file is missing and never
overwrites variables if they already exist. As such, we can use it in
build pipelines.
* fix: remove quotes from env vars
dotenv normalises quoted and unquoted strings (X=x, X='x' and
X="x") all become the same .env object {X: 'x'}. However, Docker's
env_file does not (the three cases are distinct). As a result, we
should use unquoted strings for consistency.
* fix: provide custom warning when .env is missing
* feat(docker): include client-config
* fix(docker): remove build packages from api image
* fix(docker): run script from correct dir
* fix(docker): correct permissions and dests
* fix(docker): consolidate run steps
This is standard practice, but did not have a noticable affect on the
image size
* fix(docker): clean the npm cache
Prior to this step the image was 1.11GB uncompressed and we got a modest
saving, 1.09GB after.
* refactor(docker): regexless COPY directives
* feat(docker): use alpine
This shrinks the image down to 259MB
* fix(docker): update build scripts
* fix: correct the server Dockerfile RUNs
* DEBUG: expose mysql port for seeding
* chore: update client Dockerfile's node versions
* fix: remove executable permissions from index.js
It's not a cli, so I don't think it needs to be executable.
* chore: update node and remove stale comments
* feat: use ENTRYPOINT + CMD to allow runtime config
* fix: add CURRICULUM_LOCALE arg
* feat: allow client port configuration
* feat: allow api port to be configured
* refactor: use unique variable names for ports
* fix: add default CLIENT_PORT
* refactor: clean up
2021-04-20 19:29:31 +05:30
Mrugesh Mohapatra
87666a738d
chore: bump patch updates to api-server ( #41833 )
2021-04-16 11:50:04 +02:00
Ahmad Abdolsaheb and Oliver Eyton-Williams
d5d786049e
feat(api): stripe checkout integration ( #41666 )
...
* feat: add api stripe checkout integration
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-04-02 15:33:34 +09:00
Mrugesh Mohapatra and Oliver Eyton-Williams
42365dd172
fix: update package files, lerna config ( #41599 )
...
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-03-27 07:46:20 -07:00
Mrugesh Mohapatra and Oliver Eyton-Williams
ad9b1f89d8
fix(api, client): update Gatsby, webpack & related things ( #41452 )
...
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-03-25 12:13:43 -07:00
Oliver Eyton-Williams
e9b1247688
test(api): suppress expected log ( #41502 )
2021-03-16 09:53:08 -06:00
Mrugesh Mohapatra
6c91f81b0e
chore(deps): upgrade eslint, prettier & related packages
2021-03-11 12:19:42 +05:30
Mrugesh Mohapatra
0a53a1d7f0
chore(deps): upgrade lerna to v4
2021-03-11 12:19:42 +05:30
dependabot[bot]
94df0c1d85
Bump @babel/preset-env from 7.13.8 to 7.13.9 in /api-server
...
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env ) from 7.13.8 to 7.13.9.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.9/packages/babel-preset-env )
Signed-off-by: dependabot[bot] <support@github.com >
2021-03-07 05:42:57 +00:00
Mrugesh Mohapatra
cd40d47363
chore(api): remove unused code and endpoints ( #41332 )
2021-03-05 02:30:11 +05:30
dependabot[bot]
2e752551dc
chore(deps-dev): bump @babel/plugin-proposal-class-properties
...
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-properties ) from 7.12.13 to 7.13.0.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.0/packages/babel-plugin-proposal-class-properties )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 06:59:42 +00:00
dependabot[bot]
1fc770f196
chore(deps-dev): bump @babel/node from 7.12.17 to 7.13.0 in /api-server
...
Bumps [@babel/node](https://github.com/babel/babel/tree/HEAD/packages/babel-node ) from 7.12.17 to 7.13.0.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.0/packages/babel-node )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 06:39:33 +00:00
dependabot[bot]
385683ba09
chore(deps-dev): bump @babel/core from 7.12.17 to 7.13.8 in /api-server
...
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core ) from 7.12.17 to 7.13.8.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.8/packages/babel-core )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 06:18:50 +00:00
dependabot[bot]
31d02ea2f0
chore(deps-dev): bump @babel/register in /api-server
...
Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register ) from 7.12.13 to 7.13.8.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.8/packages/babel-register )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 06:18:20 +00:00
dependabot[bot]
8b3a711f1d
chore(deps-dev): bump @babel/plugin-proposal-object-rest-spread
...
Bumps [@babel/plugin-proposal-object-rest-spread](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-object-rest-spread ) from 7.12.13 to 7.13.8.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.8/packages/babel-plugin-proposal-object-rest-spread )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 06:00:30 +00:00
dependabot[bot]
b3fe97408a
chore(deps-dev): bump @babel/preset-env in /api-server
...
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env ) from 7.12.17 to 7.13.8.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.8/packages/babel-preset-env )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 05:59:56 +00:00
dependabot[bot]
9cd97962a3
chore(deps): bump express-validator from 6.9.2 to 6.10.0 in /api-server
...
Bumps [express-validator](https://github.com/express-validator/express-validator ) from 6.9.2 to 6.10.0.
- [Release notes](https://github.com/express-validator/express-validator/releases )
- [Commits](https://github.com/express-validator/express-validator/compare/v6.9.2...v6.10.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 05:28:10 +00:00
dependabot[bot]
40a1bc767f
chore(deps-dev): bump @babel/cli from 7.12.17 to 7.13.0 in /api-server
...
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli ) from 7.12.17 to 7.13.0.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.0/packages/babel-cli )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 05:25:13 +00:00
dependabot[bot]
0e1306eccf
chore(deps-dev): bump @babel/plugin-proposal-optional-chaining
...
Bumps [@babel/plugin-proposal-optional-chaining](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-optional-chaining ) from 7.12.17 to 7.13.8.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.8/packages/babel-plugin-proposal-optional-chaining )
Signed-off-by: dependabot[bot] <support@github.com >
2021-02-28 05:20:28 +00:00
Mrugesh Mohapatra and Oliver Eyton-Williams
b5f4754e2a
fix: re-revert the API decoupling ( #41263 )
...
* fix(api): decouple api from curriculum
This reverts commit 8f0e441644 and
introduces the implementations from #40703 .
* fix(gitpod): add curriculum build to GitPod
This reverts commit 706d70f58d and
introduces implementations from #41234 .
* docs: update DevOps manual for api change (#41259 )
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com >
2021-02-25 12:02:35 -08:00