Skip to content

Commit 04d6a91

Browse files
committed
Merge remote-tracking branch 'fcc/main' into prod-merge
2 parents ad5f726 + 25c257f commit 04d6a91

File tree

5,282 files changed

+32472
-32895
lines changed

Some content is hidden

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

5,282 files changed

+32472
-32895
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ api-server/src/public/**
55
api-server/lib/**
66
config/i18n.js
77
config/certification-settings.js
8+
config/superblock-order.js
89
web/**
10+
docs/**/*.md

.eslintrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@
3838
"import/order": "error",
3939
"import/no-cycle": [2, { "maxDepth": 2 }],
4040
"react/prop-types": "off",
41-
"no-only-tests/no-only-tests": "error"
41+
"no-only-tests/no-only-tests": "error",
42+
"no-unused-vars": "off",
43+
"@typescript-eslint/no-unused-vars": [
44+
"warn",
45+
{
46+
"argsIgnorePattern": "^_",
47+
"varsIgnorePattern": "^_",
48+
"caughtErrorsIgnorePattern": "^_"
49+
}
50+
]
4251
},
4352
"overrides": [
4453
{

.github/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
'platform: api':
1111
- api-server/**/*
12+
- api/**/*
1213

1314
'scope: tools/scripts':
1415
- cypress/**/*

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
- name: Checkout repository
3333
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
3434
- name: Setup CodeQL
35-
uses: github/codeql-action/init@2956c096220fb34b6bf430b4ec7dcff2e77c8084 # tag=v1
35+
uses: github/codeql-action/init@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # v2
3636
with:
3737
languages: ${{ matrix.language }}
3838
- name: Perform Analysis
39-
uses: github/codeql-action/analyze@2956c096220fb34b6bf430b4ec7dcff2e77c8084 # tag=v1
39+
uses: github/codeql-action/analyze@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # v2

.github/workflows/codesee-diagram.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: Codesee-io/codesee-detect-languages-action@latest
3131

3232
- name: Configure JDK 16
33-
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # tag=v3
33+
uses: actions/setup-java@19eeec562b37d29a1ad055b7de9c280bd0906d8d # v3
3434
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
3535
with:
3636
java-version: '16'

.github/workflows/crowdin-download.curriculum.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ jobs:
281281
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
282282
with:
283283
node-version: ${{ matrix.node-version }}
284-
cache: 'npm'
285284

286285
- name: Set Environment variables
287286
run: |

.github/workflows/e2e-mobile.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ jobs:
2929
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
3030
with:
3131
node-version: 16.x
32-
cache: 'npm'
3332

34-
- name: Setup Flutter 3.0.x
33+
- name: Setup Flutter 3.3.x
3534
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # tag=v2
3635
with:
37-
flutter-version: '3.0.x'
36+
flutter-version: '3.3.x'
3837
channel: 'stable'
3938
cache: true
40-
cache-key: flutter-3.0.x
39+
cache-key: flutter-3.3.x
4140
cache-path: ${{ runner.tool_cache }}/flutter
4241

4342
- name: Set freeCodeCamp Environment Variables
@@ -58,16 +57,15 @@ jobs:
5857
flutter test test/widget_test.dart
5958
6059
- name: Cypress run
61-
uses: cypress-io/github-action@v2
60+
uses: cypress-io/github-action@v4
6261
with:
6362
record: ${{ env.CYPRESS_RECORD_KEY != 0 }}
6463
start: npx serve
6564
wait-on: http://localhost:3000
6665
wait-on-timeout: 1200
6766
config: retries=1,screenshotOnRunFailure=false,video=false,baseUrl=http://localhost:3000/mobile/mobile-app/generated-tests/
6867
browser: chrome
69-
headless: true
70-
spec: cypress/integration/mobile-learn/test-challenges.js
68+
spec: cypress/e2e/mobile-learn/test-challenges.js
7169
env:
7270
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
7371
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/e2e-third-party.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-20.04
1616
services:
1717
mongodb:
18-
image: mongo:4
18+
image: mongo:4.4
1919
ports:
2020
- 27017:27017
2121
# We need mailhog to catch any emails the api tries to send.
@@ -38,7 +38,6 @@ jobs:
3838
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
3939
with:
4040
node-version: 16.x
41-
cache: 'npm'
4241

4342
- name: Set freeCodeCamp Environment Variables
4443
run: |
@@ -66,5 +65,5 @@ jobs:
6665
wait-on-timeout: 1200
6766
config: baseUrl=http://localhost:8000
6867
browser: chrome
69-
headless: true
68+
7069
spec: cypress/e2e/third-party/*.js

.github/workflows/e2e-web.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ on:
55
- 'docs/**'
66
branches-ignore:
77
- 'renovate/**'
8+
- 'next-api'
89
pull_request:
910
paths-ignore:
1011
- 'docs/**'
12+
branches-ignore:
13+
- 'next-api'
1114

1215
jobs:
1316
build-client:
@@ -28,7 +31,6 @@ jobs:
2831
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
2932
with:
3033
node-version: 16.x
31-
cache: 'npm'
3234

3335
- name: Set freeCodeCamp Environment Variables
3436
run: cp sample.env .env
@@ -75,7 +77,7 @@ jobs:
7577
spec: cypress/e2e/default/**/*.js
7678
services:
7779
mongodb:
78-
image: mongo:4
80+
image: mongo:4.4
7981
ports:
8082
- 27017:27017
8183
# We need mailhog to catch any emails the api tries to send.
@@ -114,7 +116,6 @@ jobs:
114116
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
115117
with:
116118
node-version: ${{ matrix.node-version }}
117-
cache: 'npm'
118119

119120
- name: Set freeCodeCamp Environment Variables
120121
run: cp sample.env .env
@@ -138,5 +139,5 @@ jobs:
138139
wait-on-timeout: 1200
139140
config: baseUrl=http://localhost:8000
140141
browser: ${{ matrix.browsers }}
141-
headless: true
142+
142143
spec: ${{ matrix.spec }}

.github/workflows/node.js-find-unused.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
2828
with:
2929
node-version: ${{ matrix.node-version }}
30-
cache: 'npm'
3130

3231
- name: Set Environment variables
3332
run: |

.github/workflows/node.js-tests-upcoming.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
3434
with:
3535
node-version: ${{ matrix.node-version }}
36-
cache: 'npm'
3736

3837
- name: Set Environment variables
3938
run: |

.github/workflows/node.js-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ on:
55
push:
66
branches-ignore:
77
- 'renovate/**'
8+
- 'next-api'
89
pull_request:
10+
branches-ignore:
11+
- 'next-api'
912

1013
permissions:
1114
contents: read
@@ -36,7 +39,6 @@ jobs:
3639
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
3740
with:
3841
node-version: ${{ matrix.node-version }}
39-
cache: 'npm'
4042

4143
- name: Set Environment variables
4244
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ config/client/test-evaluator.json
165165
config/curriculum.json
166166
config/i18n.js
167167
config/certification-settings.js
168+
config/superblock-order.js
169+
config/superblock-order.test.js
168170

169171
### Generated utils files ###
170172
utils/block-nameify.js
@@ -210,6 +212,7 @@ curriculum/build
210212
client/static/_redirects
211213
client/static/mobile
212214
client/static/curriculum-data
215+
client/i18n/locales/**/trending.json
213216

214217
### UI Components ###
215218
tools/ui-components/dist

.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
**/.cache
22
**/public
33
client/static
4+
client/**/trending.json
45
**/*fixtures*
56
curriculum/challenges/_meta/*/*
67
curriculum/challenges/**/*
78
config/**/*.json
89
config/i18n.js
910
config/certification-settings.js
10-
docs/i18n
11+
config/superblock-order.js
12+
config/superblock-order.test.js
1113
utils/block-nameify.js
1214
utils/block-nameify.test.js
1315
utils/slugs.js
@@ -16,3 +18,4 @@ utils/index.js
1618
**/package-lock.json
1719
web/.next
1820
curriculum-server/data/curriculum.json
21+
docs/**/*.md

api-server/src/server/middlewares/error-handlers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ const isDev = process.env.FREECODECAMP_NODE_ENV !== 'production';
2424

2525
export default function prodErrorHandler() {
2626
// error handling in production.
27-
// eslint-disable-next-line no-unused-vars
28-
return function (err, req, res, next) {
27+
return function (err, req, res, _next) {
2928
// response for when req.body is bigger than body-parser's size limit
3029
if (err?.type === 'entity.too.large') {
3130
return res.status('413').send('Request payload is too large');

client/gatsby-config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ const { clientLocale, curriculumLocale, homeLocation, sentryClientDSN } =
1010
envData;
1111

1212
const curriculumIntroRoot = path.resolve(__dirname, './src/pages');
13-
const pathPrefix =
14-
clientLocale === 'english' || clientLocale === 'chinese'
15-
? ''
16-
: '/' + clientLocale;
13+
const pathPrefix = clientLocale === 'english' ? '' : '/' + clientLocale;
1714

1815
module.exports = {
1916
flags: {

client/i18n/locales.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ const filesThatShouldExist = [
1111
{
1212
name: 'motivation.json'
1313
},
14-
{
15-
name: 'trending.json'
16-
},
1714
{
1815
name: 'intro.json'
1916
},

client/i18n/locales/arabic/translations.json

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
"page-number": "{{pageNumber}} من {{totalPages}}"
227227
},
228228
"footer": {
229-
"tax-exempt-status": "منظمة freeCodeCamp هي منظمة خيرية معفاة من الضرائب 501(c)(3) يدعمها المتبرعين (الرقم التعريفي الضريبي الاتحادي للولايات المتحدة: 82-0779546)",
229+
"tax-exempt-status": "تكون مؤسسة freeCodeCamp خيرية معفاة ضريبياً 501(c)(3) يدعمها المتبرعين (الرقم التعريفي الضريبي الاتحادي للولايات المتحدة: 82-0779546)",
230230
"mission-statement": "مهمتنا: مساعدة الناس على تعلم البرمجة مجاناً. ونحن نحقق ذلك بإنشاء آلاف الأشرطة من الفيديو والمقالات ودروس البرمجة التفاعلية - وجميعها متاحة مجاناً للجمهور. ولدينا أيضاً الآلاف من المجموعات الدراسية في freeCodeCamp حول العالم.",
231231
"donation-initiatives": "التبرعات لـ freeCodeCamp تذهب لمبادراتنا التعليمية، وتساعد في دفع تكاليف الخوادم، والخدمات، والموظفين.",
232232
"donate-text": "يمكنك <1>تقديم تبرع قابل للخصم الضريبي هنا </1>.",
@@ -264,7 +264,7 @@
264264
"p8": "وهذا المنهج سيعطيك آلاف الساعات من التدريب العملي على البرمجة.",
265265
"p9": "وإذا كنت ترغب في تعلم المزيد من نظريات الرياضيات وعلوم الكمبيوتر، لدينا أيضا آلاف الساعات من دورات الفيديو على <0>قناة freeCodeCamp على يوتيوب</0>.",
266266
"p10": "إذا كنت ترغب في الحصول على وظيفة مطور أو عملاء مستقلين، فإن مهارات البرمجة ستكون مجرد جزء من اللغز. تحتاج أيضاً إلى بناء شبكتك الشخصية وسمعتك كمطور.",
267-
"p11": "يمكنك فعل ذلك على تويتر و GitHub، وأيضاً على <0>منتدى freeCodeCamp </0>.",
267+
"p11": "يمكنك فعل ذلك على LinkedIn و GitHub، وأيضاً على <0>منتدى freeCodeCamp </0>.",
268268
"p12": "برمجة سعيدة!"
269269
},
270270
"upcoming-lessons": "الدروس القادمة",
@@ -284,7 +284,7 @@
284284
"sign-in-save": "قم بتسجيل الدخول لحفظ تقدّمك",
285285
"download-solution": "تنزيل الحل",
286286
"percent-complete": "{{percent}}% مكتمل",
287-
"project-complete": "Completed {{completedChallengesInBlock}} of {{totalChallengesInBlock}} certification projects",
287+
"project-complete": "أكملت {{completedChallengesInBlock}} من {{totalChallengesInBlock}} مشروعات الشهادات",
288288
"tried-rsa": "إذا كنت قد جربت طريقة <0>اقرأ-ابحث-اسأل</0>، فيمكنك طلب المساعدة في منتدى freeCodeCamp.",
289289
"rsa": "اقرأ ، ابحث ، اسأل",
290290
"rsa-forum": "<strong>قبل إجراء موضوع جديدة</strong> يرجى الاطلاع على ما إذا كان سؤالك <0> قد تم الإجابة عليه فعلًا في المنتدى </0>.",
@@ -325,7 +325,11 @@
325325
"sorry-getting-there": "عذراً، لم يجتَز كودك. قربت من النجاح.",
326326
"sorry-hang-in-there": "عذراً، لم يجتَز كودك. لا تستسلم.",
327327
"sorry-dont-giveup": "عذراً، لم يجتَز كودك. لا تفقد الأمل.",
328-
"challenges-completed": "اكتمل {{completedCount}} من {{totalChallenges}} تحديات"
328+
"challenges-completed": "اكتمل {{completedCount}} من {{totalChallenges}} تحديات",
329+
"season-greetings-fcc": "تحيات الموسم من مجتمع freeCodeCamp 🎉",
330+
"if-getting-value": "إذا أفادك freeCodeCamp بشكل مثمر، يمكنك تتبرع دعما لرسالتنا التطوعية حتي يستمر مهمتنا.",
331+
"building-a-university": "نحن نبني برنامَج مجاني لشهادة جامعة علوم الكمبيوتر Computer Science",
332+
"if-help-university": "لقد حققنا قدرا كبيرا من التقدم بالفعل. أدعم منظمتنا الخيرية بالطريق الطويل الذي أمامنا."
329333
},
330334
"donate": {
331335
"title": "ادعم منظمتنا الخيرية",
@@ -350,6 +354,7 @@
350354
"your-donation": "سيوفر تبرعك{{usd}}$ {{hours}} ساعات من التعلم للناس حول العالم.",
351355
"your-donation-2": "سيوفر تبرعك {{usd}}$ {{hours}} ساعات من التعلم للناس حول العالم كل شهر.",
352356
"your-donation-3": "سيوفر تبرعك {{usd}}$ {{hours}} ساعات من التعلم للناس حول العالم كل عام.",
357+
"become-supporter": "أصبح داعماً",
353358
"duration": "كن داعماً لمرة واحدة لمنظمتنا الخيرية.",
354359
"duration-2": "كن داعماً شهريا لمنظمتنا الخيرية.",
355360
"duration-3": "كن داعماً سنويا لمنظمتنا الخيرية",
@@ -402,11 +407,11 @@
402407
"endowment": "هذه ستكون مساعدة هائلة. بما أن هذه عملية يدوية أكثر، يمكن لـ Quincy أن يساعدك فيها شخصيا. يرجى مراسلته مباشرة على [email protected].",
403408
"how-legacy": "كيف يمكنني اعداد هدية مستقبلية لـ freeCodeCamp.org؟",
404409
"we-honored": "سيشرفنا أن نضع مثل هذه الهدية في الاستخدام الجيد لمساعدة الناس في جميع أنحاء العالم على تعلم البرمجة. وتبعا لمكان سكنك، قد يكون هذا معفيا من الضرائب.",
405-
"legacy-gift-message": "أعطي وأوريث [مبلغ _____ دولار أمريكي (أو عملة أخرى) أو _____ في المائة من الباقي وبقايا تركتي] إلى freeCodeCamp.org (رقم التعريف الضريبي لشركة Free Code Camp، Inc. 82-0779546) ، وهي مؤسسة خيرية منظمة بموجب قوانين ولاية ديلاوير ، الولايات المتحدة ، وتقع حاليًا في 3905 Hedgcoxe Rd، PO Box 250352، Plano، Texas، 75025 United States ، لاستخدامها في أغراضها الخيرية العامة وفقًا لتقديرها.",
410+
"legacy-gift-message": "أعطي وأوريث [مبلغ _____ دولار أمريكي (أو عملة أخرى) أو _____ في المائة من الباقي وبقايا تركتي] إلى freeCodeCamp.org (رقم التعريف الضريبي لشركة Free Code Camp، Inc. 82-0779546) ، وهي مؤسسة خيرية بموجب قوانين ولاية ديلاوير، الولايات المتحدة، وتقع حاليًا في 3905 Hedgcoxe Rd، PO Box 250352، Plano، Texas، 75025 United States، لاستخدامها في أغراضها الخيرية العامة وفقًا لتقديرها.",
406411
"thank-wikimedia": "ونود أن نشكر مؤسسة ويكيميديا على توفير هذه اللغة الرسمية لنا لكي نستخدمها.",
407412
"legacy-gift-questions": "إذا كان لديك أي أسئلة حول هذه العملية، يرجى إرسال بريد الإلكتروني إلى [email protected].",
408413
"how-stock": "كيف يمكنني التبرع بالاسهم لـ freeCodeCamp.org؟",
409-
"welcome-stock": "نحن نرحب بتبرعاتك للاسهم. يرجى إرسال بريد إلكتروني مباشر إلى Quincy ويمكنه مساعدتك في ذلك، ومشاركة تفاصيل حساب الوساطة الخاص بالمنظمة الخيرية: [email protected].",
414+
"welcome-stock": "نحن نرحب بتبرعاتك للأسهم. يرجى إرسال بريد إلكتروني مباشر إلى Quincy ويمكنه مساعدتك في ذلك، ومشاركة تفاصيل حساب الوساطة الخاص بالمؤسسة الخيرية: [email protected].",
410415
"how-receipt": "هل يمكنني الحصول على إيصال تبرع حتى يمكنني خصم تبرعي من ضرائبي؟",
411416
"just-forward": "بالتأكيد. فقط أرسل الإيصال من معاملتك إلى [email protected]، أخبرنا بأنك تريد إيصال وأي تعليمات خاصة قد تكون لديك، وسنرد مع إيصال لك.",
412417
"how-update": "لقد قمت بإعداد تبرع شهري، ولكن أحتاج إلى تحديث أو إيقاف تكرار ذلك شهريا. كيف يمكنني القيام بذلك؟",
@@ -498,7 +503,8 @@
498503
"open-preview-in-new-window": "أفتح المعاينة في شاشة جديدة وتركيزها",
499504
"step": "الخطوة",
500505
"steps": "الخطوات",
501-
"steps-for": "خطوات {{blockTitle}}"
506+
"steps-for": "خطوات {{blockTitle}}",
507+
"code-example": "{{codeName}} code example"
502508
},
503509
"flash": {
504510
"honest-first": "للمطالبة بشهادة ، يجب عليك أولاً قبول سياسة الصدق الأكاديمي الخاصة بنا",
@@ -716,5 +722,12 @@
716722
"focus-instructions-panel": "ركز على لوحة تعليمات",
717723
"navigate-previous": "تنقل إلى التمرين السابق",
718724
"navigate-next": "تنقل إلى التمرين التالي"
725+
},
726+
"signout": {
727+
"heading": "تسجيل الخروج من حسابك",
728+
"p1": "تحذير: إذا تابعت، لن يتم حفظ تقدمك.",
729+
"p2": "سيؤدي هذا الإجراء إلى تسجيل خروجك من حسابك على هذا الجهاز وجلسة المتصفح فقط. الرجاء تأكيد ما إذا كنت ترغب في المتابعة.",
730+
"certain": "نعم، سجل الخروج من حسابي",
731+
"nevermind": "لا أريد تسجيل الخروج"
719732
}
720733
}

0 commit comments

Comments
 (0)