Skip to content

Commit

Permalink
Merge branch 'main' into ts-migration/e2e-routes
Browse files Browse the repository at this point in the history
# Conflicts:
#	tests/e2e/server/routes.ts
  • Loading branch information
ruben-rebelo committed Mar 4, 2024
2 parents 0f8b31d + 4231ac9 commit aababf0
Show file tree
Hide file tree
Showing 1,242 changed files with 53,584 additions and 26,501 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/node_modules/*
**/dist/*
android/**/build/*
.github/actions/**/index.js"
docs/vendor/**
6 changes: 4 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const restrictedImportPatterns = [
];

module.exports = {
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'plugin:react-native-a11y/basic', 'plugin:@dword-design/import-alias/recommended', 'prettier'],
plugins: ['react-hooks', 'react-native-a11y'],
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-native-a11y/basic', 'plugin:@dword-design/import-alias/recommended', 'prettier'],
plugins: ['react-native-a11y'],
parser: 'babel-eslint',
ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'],
env: {
Expand All @@ -87,6 +87,7 @@ module.exports = {
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
plugins: ['react'],
rules: {
'prefer-regex-literals': 'off',
'rulesdir/no-multiple-onyx-in-file': 'off',
'rulesdir/onyx-props-must-have-default': 'off',
'react-native-a11y/has-accessibility-hint': ['off'],
Expand All @@ -112,6 +113,7 @@ module.exports = {
'@styles': './src/styles',
// This path is provide alias for files like `ONYXKEYS` and `CONST`.
'@src': './src',
'@desktop': './desktop',
},
},
],
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/NewLibraryRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ labels: Weekly, AutoAssignerAppLibraryReview
---
In order to properly evaluate if a new library can be added to `package.json`, please fill out this request form. It will be automatically assigned someone from our review team that will go through and vet the library.

*In order to add any new production dependency, it must be approved by the App Deployer team. They will evaluate the library and decide if it's something we want to move forward with or if other alternatives should be explored.*

Note: This is only for production dependencies. While we don't want people to add packages to dev-dependencies willy-nilly, we recognize that there isn't as great of a need there to secure them.

# Name of library:
Expand Down
8 changes: 7 additions & 1 deletion .github/actions/composite/buildAndroidE2EAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ inputs:
ARTIFACT_NAME:
description: The name of the workflow artifact where the APK should be uploaded
required: true
ARTIFACT_RETENTION_DAYS:
description: The number of days to retain the artifact
required: false
# Thats github default:
default: "90"
PACKAGE_SCRIPT_NAME:
description: The name of the npm script to run to build the APK
required: true
Expand Down Expand Up @@ -69,7 +74,8 @@ runs:
shell: bash

- name: Upload APK
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: ${{ inputs.ARTIFACT_NAME }}
path: ${{ inputs.APP_OUTPUT_PATH }}
retention-days: ${{ inputs.ARTIFACT_RETENTION_DAYS }}
9 changes: 7 additions & 2 deletions .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Set up Node
description: Set up Node

outputs:
cache-hit:
description: Was there a cache hit on the main node_modules?
value: ${{ steps.cache-node-modules.outputs.cache-hit }}

runs:
using: composite
steps:
Expand All @@ -13,13 +18,13 @@ runs:
desktop/package-lock.json
- id: cache-node-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json', 'patches/**') }}

- id: cache-desktop-node-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: desktop/node_modules
key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json', 'desktop/patches/**') }}
Expand Down
8 changes: 8 additions & 0 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,14 @@ class GithubUtils {
.then((events) => _.filter(events, (event) => event.event === 'closed'))
.then((closedEvents) => lodashGet(_.last(closedEvents), 'actor.login', ''));
}

static getArtifactByName(artefactName) {
return this.paginate(this.octokit.actions.listArtifactsForRepo, {
owner: CONST.GITHUB_OWNER,
repo: CONST.APP_REPO,
per_page: 100,
}).then((artifacts) => _.findWhere(artifacts, {name: artefactName}));
}
}

module.exports = GithubUtils;
Expand Down
8 changes: 8 additions & 0 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,14 @@ class GithubUtils {
.then((events) => _.filter(events, (event) => event.event === 'closed'))
.then((closedEvents) => lodashGet(_.last(closedEvents), 'actor.login', ''));
}

static getArtifactByName(artefactName) {
return this.paginate(this.octokit.actions.listArtifactsForRepo, {
owner: CONST.GITHUB_OWNER,
repo: CONST.APP_REPO,
per_page: 100,
}).then((artifacts) => _.findWhere(artifacts, {name: artefactName}));
}
}

module.exports = GithubUtils;
Expand Down
68 changes: 51 additions & 17 deletions .github/actions/javascript/bumpVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,20 @@ exports.updateiOSVersion = function updateiOSVersion(version) {
/***/ }),

/***/ 8007:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {

"use strict";
__nccwpck_require__.r(__webpack_exports__);
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
/* harmony export */ "MAX_INCREMENTS": () => (/* binding */ MAX_INCREMENTS),
/* harmony export */ "SEMANTIC_VERSION_LEVELS": () => (/* binding */ SEMANTIC_VERSION_LEVELS),
/* harmony export */ "getPreviousVersion": () => (/* binding */ getPreviousVersion),
/* harmony export */ "getVersionNumberFromString": () => (/* binding */ getVersionNumberFromString),
/* harmony export */ "getVersionStringFromNumber": () => (/* binding */ getVersionStringFromNumber),
/* harmony export */ "incrementMinor": () => (/* binding */ incrementMinor),
/* harmony export */ "incrementPatch": () => (/* binding */ incrementPatch),
/* harmony export */ "incrementVersion": () => (/* binding */ incrementVersion)
/* harmony export */ });
const _ = __nccwpck_require__(5067);

const SEMANTIC_VERSION_LEVELS = {
Expand Down Expand Up @@ -173,8 +185,8 @@ const incrementPatch = (major, minor, patch) => {
/**
* Increments a build version
*
* @param {Number} version
* @param {Number} level
* @param {String} version
* @param {String} level
* @returns {String}
*/
const incrementVersion = (version, level) => {
Expand Down Expand Up @@ -235,18 +247,7 @@ function getPreviousVersion(currentVersion, level) {
return getVersionStringFromNumber(major, minor, patch, build - 1);
}

module.exports = {
getVersionNumberFromString,
getVersionStringFromNumber,
incrementVersion,

// For tests
MAX_INCREMENTS,
SEMANTIC_VERSION_LEVELS,
incrementMinor,
incrementPatch,
getPreviousVersion,
};



/***/ }),
Expand Down Expand Up @@ -2656,12 +2657,17 @@ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)

// Coercion.
// Extract anything that could conceivably be a part of a valid semver
createToken('COERCE', `${'(^|[^\\d])' +
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
createToken('COERCEFULL', src[t.COERCEPLAIN] +
`(?:${src[t.PRERELEASE]})?` +
`(?:${src[t.BUILD]})?` +
`(?:$|[^\\d])`)
createToken('COERCERTL', src[t.COERCE], true)
createToken('COERCERTLFULL', src[t.COERCEFULL], true)

// Tilde ranges.
// Meaning is "reasonably at or greater than"
Expand Down Expand Up @@ -5954,6 +5960,34 @@ module.exports = underscoreNodeF._;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __nccwpck_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __nccwpck_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
Expand Down
8 changes: 8 additions & 0 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,14 @@ class GithubUtils {
.then((events) => _.filter(events, (event) => event.event === 'closed'))
.then((closedEvents) => lodashGet(_.last(closedEvents), 'actor.login', ''));
}

static getArtifactByName(artefactName) {
return this.paginate(this.octokit.actions.listArtifactsForRepo, {
owner: CONST.GITHUB_OWNER,
repo: CONST.APP_REPO,
per_page: 100,
}).then((artifacts) => _.findWhere(artifacts, {name: artefactName}));
}
}

module.exports = GithubUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const _ = require('underscore');
const core = require('@actions/core');
const CONST = require('../../../libs/CONST');
const GithubUtils = require('../../../libs/GithubUtils');
const GitUtils = require('../../../libs/GitUtils');
const GitUtils = require('../../../libs/GitUtils').default;

async function run() {
// Note: require('package.json').version does not work because ncc will resolve that to a plain string at compile time
Expand Down
Loading

0 comments on commit aababf0

Please sign in to comment.