Skip to content

Commit

Permalink
Merge pull request #340 from Countly/staging
Browse files Browse the repository at this point in the history
24.4.0 Release
  • Loading branch information
turtledreams authored Apr 17, 2024
2 parents b3610de + 5ac8bf1 commit a0f571c
Show file tree
Hide file tree
Showing 94 changed files with 6,969 additions and 31,553 deletions.
295 changes: 189 additions & 106 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"version": "detect"
}
},
"extends": ["plugin:react/recommended", "prettier", "eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
Expand All @@ -16,114 +15,198 @@
"sourceType": "module",
"project": ["**/tsconfig.json"]
},
"overrides": [
{
"files": ["__tests__/**/*"],
"env": {
"jest": true
}
}
],
"parser": "@typescript-eslint/parser",
"plugins": ["react", "react-native", "@typescript-eslint"],
"root": true,
"extends": ["airbnb/legacy"],
"rules": {
//JavaScript rules
"prefer-template": "error",
// allow .js files to contain JSX code
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".tsx"] }],

// prevent eslint to complain about the "styles" variable being used before it was defined
"no-use-before-define": ["error", { "variables": false }],

// ignore errors for the react-navigation package
"react/prop-types": ["error", { "ignore": ["navigation", "navigation.navigate"] }],
"no-var": "warn",
"curly": ["error", "all"],

//TypeScript related rules
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "warn",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error", //???
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/class-literal-property-style": "warn",
"@typescript-eslint/consistent-generic-constructors": "warn",
"@typescript-eslint/consistent-indexed-object-style": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/consistent-type-definitions": "warn",
"@typescript-eslint/consistent-type-exports": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/explicit-member-accessibility": "warn",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/member-ordering": "warn", //???
"@typescript-eslint/method-signature-style": "warn",
//"@typescript-eslint/naming-convention": "warn"
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/no-confusing-non-null-assertion": "warn",
"@typescript-eslint/no-confusing-void-expression": "warn",
"@typescript-eslint/no-duplicate-enum-values": "warn",
"@typescript-eslint/no-dynamic-delete": "warn",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "warn",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-invalid-void-type": "warn",
"@typescript-eslint/no-meaningless-void-operator": "warn",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-redundant-type-constituents": "warn",
"@typescript-eslint/no-require-imports": "warn",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-type-alias": "warn",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-useless-empty-export": "warn",
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
"@typescript-eslint/parameter-properties": "warn",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-enum-initializers": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-literal-enum-member": "warn",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/prefer-readonly-parameter-types": "warn",
"@typescript-eslint/prefer-reduce-type-parameter": "warn",
"@typescript-eslint/prefer-regexp-exec": "warn",
"@typescript-eslint/prefer-return-this-type": "warn",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/prefer-ts-expect-error": "warn",
"@typescript-eslint/promise-function-async": "warn",
"@typescript-eslint/require-array-sort-compare": "warn",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/sort-type-constituents": "warn",
"@typescript-eslint/strict-boolean-expressions": "warn",
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/typedef": "warn",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "warn",

"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/no-var-requires": "error",

// Note: you must disable the base rule as it can report incorrect errors
"object-curly-spacing": "off",
"@typescript-eslint/object-curly-spacing": "warn"
"prefer-arrow-callback": "off",
"prefer-destructuring": "off",
"comma-dangle": "off",
"no-restricted-globals": "off",
"no-restricted-properties": "off",
"strict": "off",
"no-unused-vars": "warn",
"no-var": "off",
"func-names": "off",
"consistent-return": "off",
"prefer-rest-params": "off",
"radix": "off",
"prefer-spread": "off",
"no-plusplus": "off",
"camelcase": "off",
"no-use-before-define": "off",
"no-lonely-if": "off",
"no-restricted-syntax": "off",
"vars-on-top": "off",
"no-param-reassign": "off",
"max-len": "off",
"guard-for-in": "off",
"no-underscore-dangle": "off",
"no-bitwise": "off",
"no-mixed-operators": "off",
"object-shorthand": "off",
"max-classes-per-file": "off",
"block-spacing": [
"error",
"always"
],
"brace-style": [
"error",
"1tbs"
],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"comma-style": [
"error",
"last"
],
"computed-property-spacing": [
"error",
"never"
],
"curly": [
"error",
"all"
],
"eol-last": "off",
"func-call-spacing": [
"error",
"never"
],
"indent": [
"error",
4
],
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true
}
],
"keyword-spacing": [
"error",
{
"before": true,
"after": true
}
],
"lines-between-class-members": [
"error",
"always"
],
"no-multi-spaces": [
"error"
],
"no-trailing-spaces": [
"error",
{
"ignoreComments": true
}
],
"no-whitespace-before-property": [
"error"
],
"object-curly-newline": [
"error",
{
"multiline": true,
"consistent": true
}
],
"object-property-newline": [
"error",
{
"allowAllPropertiesOnSameLine": true
}
],
"semi": [
"error",
"always"
],
"semi-style": [
"error",
"last"
],
"space-before-blocks": [
"error",
"always"
],
"space-in-parens": [
"error",
"never"
],
"space-infix-ops": [
"error"
],
"space-unary-ops": [
"error",
{
"words": true,
"nonwords": false
}
],
"switch-colon-spacing": [
"error"
],
"unicode-bom": [
"error",
"never"
],
"linebreak-style": [
"error",
"unix"
],
"no-useless-escape": "off",
"no-useless-concat": "off",
"quotes": [
"error",
"double"
],
"no-console": [
"off"
],
"dot-notation": [
"error"
],
"eqeqeq": [
"warn",
"always"
],
"no-alert": [
"error"
],
"no-caller": [
"error"
],
"no-eval": [
"error"
],
"no-extend-native": [
"error"
],
"no-iterator": [
"error"
],
"no-loop-func": [
"error"
],
"no-shadow": [
"error"
]
}
}
39 changes: 39 additions & 0 deletions .github/workflows/release_notice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release Notice
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# To check the github context
- name: Dump Github context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"repository": "${{ github.repository }}",
"tag_name": "${{ github.event.release.tag_name }}",
"actor": "${{ github.actor }}",
"body": ${{ toJSON(github.event.release.body) }},
"html_url": "${{ github.event.release.html_url }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE }}
- name: Send custom JSON data to Discord
uses: sarisia/[email protected]
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
nodetail: true
title: New ${{ github.repository }} version ${{ github.event.release.tag_name }} published by ${{ github.actor }}
description: |
Release URL: ${{ github.event.release.html_url }}
Click [here](https://github.com/Countly/countly-server/blob/master/CHANGELOG.md) to view the change log.
`${{ github.event.release.body }}`
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ android/android.iml
android/.settings/org.eclipse.buildship.core.prefs
android/.classpath
countly-sdk-react-native-bridge-*.tgz
example/AwesomeProject
example/AwesomeProject
coverage/
package-lock.json
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
## 24.4.0
* ! Minor breaking change ! Tracking of foreground and background time for APM is disabled by default

* Added `disableAdditionalIntentRedirectionChecks` config method
* Added a new metric for detecting whether or not a device has a hinge for Android
* Added four new APM configuration options under the `CountlyConfig.apm` interface:
* `enableForegroundBackgroundTracking` for enabling automatic F/B time tracking
* `enableAppStartTimeTracking` for enabling automatic app launch time tracking (Android only)
* `enableManualAppLoadedTrigger` for enabling the manipulation of app load time finished timestamp
* `setAppStartTimestampOverride` for enabling the manipulation of app load time starting timestamp
* Added a new Event interface (`Countly.events`) that groups event related calls:
* `recordEvent` for recording an event
* `startEvent` for starting a timed event
* `cancelEvent` for canceling an ongoing timed event
* `endEvent` for ending a timed event and record it

* Mitigated an issue with `getRemoteConfigValueForKeyP` and `remoteConfigClearValues` happening when they were called before initializing the SDK

* Deprecated `enableApm` config option. Use `apm.enableAppStartTimeTracking` instead (for iOS also `enableForegroundBackgroundTracking` must be used)
* Deprecated the old events methods:
* `sendEvent` use `Countly.events.recordEvent` instead
* `startEvent` use `Countly.events.startEvent` instead
* `cancelEvent` use `Countly.events.cancelEvent` instead
* `endEvent` use `Countly.events.endEvent` instead

* Updated the underlying Android SDK version to 24.4.0
* Updated the underlying iOS SDK version to 24.4.0

## 23.12.0
* Added TS type declerations to the SDK

* Updated the underlying Android SDK version to 23.12.0
* Updated the underlying iOS SDK version to 23.12.0

## 23.10.0
* Fixed a bug where segment provided to 'logException' was ignored in Android devices
* Fixed a bug where bridged SDK logs were not printing
Expand Down
Loading

0 comments on commit a0f571c

Please sign in to comment.