Skip to content

Commit

Permalink
feat(deps): Update dependencies 2023.09.18 (#114)
Browse files Browse the repository at this point in the history
* feat(deps): Update dependencies 2023.09.18

* Update TypeScript and ESLint

* Update major versions except react-native and related

* Update react-native and related

* Recreate lock files and fix package manager entries
  • Loading branch information
JoseLion authored Sep 19, 2023
1 parent 0ef8846 commit 6410ca0
Show file tree
Hide file tree
Showing 40 changed files with 6,605 additions and 7,839 deletions.
31 changes: 25 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": ["./tsconfig.json", "./example/tsconfig.json"]
"project": [
"./tsconfig.json",
"./package/tsconfig.json",
"./example/tsconfig.json"
]
}
},
"react": {
Expand All @@ -18,7 +22,11 @@
},
"parserOptions": {
"ecmaVersion": "latest",
"project": ["./tsconfig.json", "./example/tsconfig.json"],
"project": [
"./tsconfig.json",
"./package/tsconfig.json",
"./example/tsconfig.json"
],
"sourceType": "module"
},
"plugins": [
Expand All @@ -28,15 +36,17 @@
"eslint-plugin-jsdoc",
"eslint-plugin-react",
"etc",
"react-hooks"
"react-hooks",
"sonarjs"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:etc/recommended",
"plugin:import/typescript",
"plugin:react/recommended"
"plugin:react/recommended",
"plugin:sonarjs/recommended"
],
"overrides": [{
"files": "*.ts?(x)",
Expand Down Expand Up @@ -113,6 +123,7 @@
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-shadow": ["error", { "hoist": "all" }],
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
"@typescript-eslint/no-unused-vars": ["error", {
Expand Down Expand Up @@ -160,7 +171,10 @@
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"import/newline-after-import": "error",
"import/no-absolute-path": "error",
"import/no-cycle": ["error", { "ignoreExternal": true }],
"import/no-cycle": ["error", {
"allowUnsafeDynamicCyclicDependency": true,
"ignoreExternal": true
}],
"import/no-duplicates": "error",
"import/no-import-module-exports": "error",
"import/no-namespace": "error",
Expand All @@ -177,7 +191,7 @@
}],
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": ["error", { "excludeTags": ["example", "param", "returns"] }],
"jsdoc/newline-after-description": "error",
"jsdoc/tag-lines": ["error", "any", { "startLines": 1 }],
"jsx-quotes": "error",
"keyword-spacing": "error",
"linebreak-style": "error",
Expand Down Expand Up @@ -219,6 +233,7 @@
"radix": "error",
"rest-spread-spacing": "error",
"react/display-name": "off",
"react/hook-use-state": "error",
"react/jsx-boolean-value": ["error", "always"],
"react/jsx-closing-bracket-location": "error",
"react/jsx-curly-spacing": ["error", { "when": "never" }],
Expand All @@ -228,11 +243,15 @@
"when": "multiline"
}],
"react/jsx-no-bind": "error",
"react/jsx-no-literals": "error",
"react/jsx-tag-spacing": "error",
"react/prop-types": "off",
"react/self-closing-comp": "error",
"react-hooks/rules-of-hooks": "error",
"semi-spacing": "error",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-inverted-boolean-check": "error",
"sort-keys": "error",
"space-before-blocks": "error",
"space-in-parens": "error",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 17, 18, 19]
node: [17, 18, 19, 20]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn
- run: yarn install --immutable
- run: yarn docs
- uses: actions/configure-pages@v2
- uses: actions/configure-pages@v3
- uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- uses: actions/upload-pages-artifact@v1
- uses: actions/upload-pages-artifact@v2

deploy:
environment:
Expand All @@ -40,5 +40,5 @@ jobs:
needs: build

steps:
- uses: actions/deploy-pages@v1
- uses: actions/deploy-pages@v2
id: deployment
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
needs: [build]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.6.0
20.7.0
222 changes: 111 additions & 111 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.4.1.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.4.1.cjs
yarnPath: .yarn/releases/yarn-3.6.3.cjs
3 changes: 3 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ node_modules/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage
2 changes: 1 addition & 1 deletion example/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.6.0
20.7.0
541 changes: 0 additions & 541 deletions example/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

823 changes: 0 additions & 823 deletions example/.yarn/releases/yarn-3.3.1.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions example/.yarnrc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '>= 2.6.10'
ruby ">= 2.6.10"

gem 'cocoapods', '>= 1.11.3'
gem 'cocoapods', '~> 1.12'
2 changes: 1 addition & 1 deletion example/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (>= 1.11.3)
cocoapods (~> 1.12)

RUBY VERSION
ruby 2.7.6p219
Expand Down
51 changes: 2 additions & 49 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"

import com.android.build.OutputFile

/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
Expand All @@ -13,8 +11,8 @@ import com.android.build.OutputFile
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
// codegenDir = file("../node_modules/react-native-codegen")
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native/codegen
// codegenDir = file("../node_modules/react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
/* Variants */
Expand Down Expand Up @@ -49,14 +47,6 @@ import com.android.build.OutputFile
// hermesFlags = ["-O", "-output-source-map"]
}

/**
* Set this to true to create four separate APKs instead of one,
* one for each native architecture. This is useful if you don't
* use App Bundles (https://developer.android.com/guide/app-bundle/)
* and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
Expand All @@ -75,16 +65,6 @@ def enableProguardInReleaseBuilds = false
*/
def jscFlavor = 'org.webkit:android-jsc:+'

/**
* Private function to get the list of Native Architectures you want to build.
* This reads the value from reactNativeArchitectures in your gradle.properties
* file and works together with the --active-arch-only flag of react-native run-android.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
ndkVersion rootProject.ext.ndkVersion

Expand All @@ -98,15 +78,6 @@ android {
versionCode 1
versionName "1.0"
}

splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include(*reactNativeArchitectures())
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
Expand All @@ -127,30 +98,12 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html.
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

}
}
}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ protected ReactActivityDelegate createReactActivityDelegate() {
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
DefaultNewArchitectureEntryPoint.getFabricEnabled()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">

<selector>
<!--
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android.useAndroidX=true
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.125.0
FLIPPER_VERSION=0.182.0
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
Binary file modified example/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions example/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = 'SpotlightExample'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
includeBuild('../node_modules/@react-native/gradle-plugin')
14 changes: 8 additions & 6 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!
Expand Down Expand Up @@ -30,8 +34,6 @@ target 'SpotlightExample' do
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
Expand All @@ -49,10 +51,10 @@ target 'SpotlightExample' do
end

post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
Expand Down
Loading

0 comments on commit 6410ca0

Please sign in to comment.