Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in the repository](https://github.com/changesets/changesets).

## Usage

To add a new changeset, run `yarn changeset` in the root of the repository. This will prompt you to:

1. Select which packages have changed
2. Choose a semver bump type (major / minor / patch) for each
3. Write a summary of the changes

The changeset file will be committed with your PR.

When it's time to release, run:

```bash
yarn changeset:version # Apply version bumps and generate changelogs
yarn changeset:publish # Build and publish to npm
```
17 changes: 17 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "contentpass/react-native-contentpass" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
5 changes: 5 additions & 0 deletions .changeset/introduce-cmp-adapters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@contentpass/react-native-contentpass": minor
---

Introduce CMP adapter layer and UI components architecture
5 changes: 5 additions & 0 deletions .changeset/new-cmp-onetrust.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@contentpass/react-native-contentpass-cmp-onetrust": minor
---

Initial release of the OneTrust CMP adapter for Contentpass React Native SDK
5 changes: 5 additions & 0 deletions .changeset/new-ui-components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@contentpass/react-native-contentpass-ui": minor
---

Initial release of the Contentpass React Native UI components
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

21 changes: 0 additions & 21 deletions .eslintrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: ./.github/actions/setup

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage
run: yarn test

build-library:
runs-on: ubuntu-latest
Expand All @@ -45,8 +45,8 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Build package
run: yarn prepare
- name: Build packages
run: yarn build

# build-android:
# runs-on: ubuntu-latest
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ on: workflow_dispatch

# See https://docs.npmjs.com/trusted-publishers
permissions:
id-token: write # Required for OIDC
contents: read
id-token: write # Required for OIDC
contents: write # Required for creating tags and GitHub releases
pull-requests: write # Required for changesets to create release PRs

jobs:
release:
Expand All @@ -24,10 +25,24 @@ jobs:
git config --global user.email "dev@contentpass.de"
git config --global user.name "Release Workflow"

- name: Log git status
run: git status
- name: Lint, test, typecheck
run: |
yarn lint
yarn test
yarn typecheck
yarn prettier:check

- name: Build
run: yarn build

- name: Run release
run: npm run release --ci
- name: Create release pull request or publish
id: changesets
uses: changesets/action@v1
with:
version: yarn changeset:version
publish: yarn changeset:publish
title: "chore: version packages"
commit: "chore: version packages"
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ android.iml

# Cocoapods
#
example/ios/Pods
expoExample/ios/Pods
examples/*/ios/Pods

# Ruby
example/vendor/
expoExample/vendor/
examples/*/vendor/

# node.js
#
Expand Down Expand Up @@ -84,6 +82,7 @@ ios/generated
android/generated

/coverage/
coverage/

# to not commit NPM token
.npmrc
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.17.0
v22.15.0
28 changes: 0 additions & 28 deletions .release-it.json

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ piece of content. It applies to all users, whether authenticated or unauthentica

### registerObserver
Registers a callback function to listen for changes in the user’s authentication and subscription status. The observer function
receives a state object describing the current status (see the exported [ContentpassState](./src/types/ContentpassState.ts) type).
receives a state object describing the current status (see the exported [ContentpassState](./packages/react-native-contentpass/src/types/ContentpassState.ts) type).

### unregisterObserver
Unregisters a previously registered observer. The observer will no longer receive updates.
Expand Down Expand Up @@ -134,11 +134,11 @@ const YourApp = () => {

## Integration with Sourcepoint SDK

See the [Sourcepoint SDK documentation](docs/SOURCEPOINT_SDK_INTEGRATION.md) for information on integrating the Contentpass SDK with the Sourcepoint SDK.
See the [Sourcepoint SDK documentation](packages/react-native-contentpass/docs/SOURCEPOINT_SDK_INTEGRATION.md) for information on integrating the Contentpass SDK with the Sourcepoint SDK.

## Contributing

See the [contributing guide](docs/CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
See the [contributing guide](packages/react-native-contentpass/docs/CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.


## License
Expand Down
46 changes: 46 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const path = require('path');
const { FlatCompat } = require('@eslint/eslintrc');

const reactPlugin = require('eslint-plugin-react');
const prettierPlugin = require('eslint-plugin-prettier');

const compat = new FlatCompat({
baseDirectory: __dirname,
resolvePluginsRelativeTo: __dirname,
});

module.exports = [
{
ignores: [
'**/node_modules/**',
'**/lib/**',
'**/ios/**',
'**/android/**',
'**/coverage/**',
'**/*.config.js',
'**/babel.config.js',
],
},
...compat.extends('@react-native', 'prettier'),
{
plugins: {
react: reactPlugin,
prettier: prettierPlugin,
},
rules: {
'react/react-in-jsx-scope': 'off',
'react-native/no-inline-styles': 'off',
'no-console': 'off',
'prettier/prettier': [
'error',
{
quoteProps: 'consistent',
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
},
],
},
},
];
3 changes: 0 additions & 3 deletions example/android/app/src/main/res/values/strings.xml

This file was deleted.

4 changes: 0 additions & 4 deletions example/app.json

This file was deleted.

12 changes: 0 additions & 12 deletions example/babel.config.js

This file was deleted.

1 change: 0 additions & 1 deletion example/ios/.xcode.env.local

This file was deleted.

Loading