Skip to content

Commit 897b60a

Browse files
committed
Merge branch 'development' into feat/implement-rokt-mparticle-poc
* development: Set up initial kit configuration (#3)
2 parents 746db89 + dabce4b commit 897b60a

24 files changed

Lines changed: 319 additions & 78 deletions

.eslintrc

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2+
"root": true,
23
"env": {
34
"browser": true,
45
"node": true
5-
66
},
77
"globals": {
88
"mParticle": true,
@@ -17,46 +17,13 @@
1717
"after": true,
1818
"Leanplum": true
1919
},
20-
"extends": "eslint:recommended",
20+
"extends": ["plugin:prettier/recommended", "eslint:recommended"],
21+
"plugins": ["prettier"],
2122
"rules": {
22-
"indent": [
23-
"error",
24-
4,
25-
{ "SwitchCase": 1}
26-
],
27-
"linebreak-style": [
28-
"error",
29-
"unix"
30-
],
31-
"quotes": [
32-
"error",
33-
"single"
34-
],
35-
"semi": [
36-
"error",
37-
"always"
38-
],
39-
"no-unneeded-ternary": [
40-
"error",
41-
{ "defaultAssignment": false }
42-
],
43-
"comma-dangle": [
44-
"error",
45-
"never"
46-
],
47-
"curly": [
48-
"error",
49-
"multi-line"
50-
],
51-
"comma-spacing": [
52-
"error",
53-
{ before: false, after: true }
54-
],
55-
"quote-props": [
56-
"error",
57-
"as-needed",
58-
{ keywords: false, unnecessary: true, numbers: false }
59-
],
60-
"no-multi-spaces": "error",
23+
"prettier/prettier": "error",
24+
"no-prototype-builtins": "off",
25+
"no-empty": "off",
26+
"no-useless-escape": "off",
27+
"no-unexpected-multiline": "off"
6128
}
6229
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Summary
2+
{provide a thorough description of the changes}
3+
4+
## Testing Plan
5+
{explain how this has been tested, and what additional testing should be done}

.github/workflows/release.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99
default: 'true'
1010

1111
jobs:
12-
# Kit release is done from master branch.
13-
confirm-public-repo-master-branch:
14-
name: 'Confirm release is run from public/master branch'
12+
# Kit release is done from main branch.
13+
confirm-public-repo-main-branch:
14+
name: 'Confirm release is run from public/main branch'
1515
uses: mParticle/mparticle-workflows/.github/workflows/sdk-release-repo-branch-check.yml@stable
1616

1717
build-and-test:
1818
name: Build and Test
1919
runs-on: ubuntu-latest
20-
needs: confirm-public-repo-master-branch
20+
needs: confirm-public-repo-main-branch
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v4
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
needs:
5050
- build-and-test
51-
- confirm-public-repo-master-branch
51+
- confirm-public-repo-main-branch
5252
steps:
5353
- name: Checkout development branch
5454
uses: actions/checkout@v4
@@ -60,14 +60,13 @@ jobs:
6060
run: |
6161
git checkout -b release/${{ github.run_number }}
6262
git push origin release/${{ github.run_number }}
63-
6463
release:
6564
name: Perform Release
6665
runs-on: ubuntu-latest
6766
needs:
6867
- build-and-test
6968
- create-release-branch
70-
- confirm-public-repo-master-branch
69+
- confirm-public-repo-main-branch
7170
env:
7271
GITHUB_TOKEN: ${{ secrets.MP_INTEGRATIONS_SEMANTIC_RELEASE_BOT }}
7372
GIT_AUTHOR_NAME: mparticle-automation
@@ -77,11 +76,11 @@ jobs:
7776
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
7877

7978
steps:
80-
- name: Checkout public master branch
79+
- name: Checkout public main branch
8180
uses: actions/checkout@v4
8281
with:
8382
fetch-depth: 0
84-
ref: master
83+
ref: main
8584

8685
- name: Import GPG Key
8786
uses: crazy-max/ghaction-import-gpg@v4
@@ -91,7 +90,7 @@ jobs:
9190
git_user_signingkey: true
9291
git_commit_gpgsign: true
9392

94-
- name: Merge release branch into master branch
93+
- name: Merge release branch into main branch
9594
run: |
9695
git pull origin release/${{ github.run_number }}
9796
- name: Setup Node.js
@@ -110,7 +109,6 @@ jobs:
110109
if: ${{ github.event.inputs.dryRun == 'false'}}
111110
run: |
112111
npx semantic-release
113-
114112
- name: Archive npm failure logs
115113
uses: actions/upload-artifact@v4
116114
if: failure()
@@ -122,30 +120,28 @@ jobs:
122120
if: ${{ github.event.inputs.dryRun == 'false' }}
123121
run: |
124122
git push origin HEAD:release/${{ github.run_number }}
125-
126123
sync-repository:
127124
name: Sync repositories
128125
needs: release
129126
runs-on: ubuntu-latest
130127
steps:
131-
- name: Checkout master branch
128+
- name: Checkout main branch
132129
uses: actions/checkout@v4
133130
with:
134131
fetch-depth: 0
135132
repository: ${{ github.repository }}
136133
token: ${{ secrets.MP_INTEGRATIONS_SEMANTIC_RELEASE_BOT }}
137-
ref: master
134+
ref: main
138135

139-
- name: Merge release branch into master branch
136+
- name: Merge release branch into main branch
140137
if: ${{ github.event.inputs.dryRun == 'false' }}
141138
run: |
142139
git pull origin release/${{ github.run_number }}
143-
144-
- name: Push release commits to master and development branches
140+
- name: Push release commits to main and development branches
145141
if: ${{ github.event.inputs.dryRun == 'false' }}
146142
run: |
147143
git push origin HEAD:development
148-
git push origin HEAD:master
144+
git push origin HEAD:main
149145
- name: Delete release branch
150146
if: ${{ github.event.inputs.dryRun == 'false' }}
151147
run: |

.github/workflows/reusable-workflows.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55

66
jobs:
7+
web-kit-pull-request:
8+
name: Run Web Kit PR Workflow
9+
uses: mParticle/mparticle-workflows/.github/workflows/web-kit-pull-request.yml@stable
710
pr-branch-check-name:
811
name: Check PR for semantic branch name
912
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@stable
@@ -13,8 +16,3 @@ jobs:
1316
pr-branch-target-gitflow:
1417
name: Check PR for semantic target branch
1518
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-gitflow.yml@stable
16-
security-lint-checks:
17-
name: Security Lint Checks
18-
uses: mparticle/mparticle-workflows/.github/workflows/security-checks.yml@stable
19-
with:
20-
base_branch: 'development'

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
node_modules
1+
node_modules/
22
test/test-bundle.js
3-
test/end-to-end-testapp/compilation.js
3+
.DS_Store
4+
test/end-to-end-testapp/build/compilation.js
5+
dist/

.nvmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
<<<<<<< HEAD
12
v20.13.1
3+
=======
4+
v20.13.1
5+
>>>>>>> development

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5",
4+
"tabWidth": 4
5+
}

CHANGELOG.md

Whitespace-only changes.

CONTRIBUTING.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing
2+
3+
Thanks for contributing! Please read this document to follow our conventions for contributing to the mParticle SDK.
4+
5+
## Setting Up
6+
7+
- Fork the repository and then clone down your fork
8+
- Commit your code per the conventions below, and PR into the mParticle SDK `master` branch
9+
- Your PR title will be checked automatically against the below convention (view the commit history to see examples of a proper commit/PR title). If it fails, you must update your title.
10+
- Our engineers will work with you to get your code change implemented once a PR is up
11+
12+
## PR Title and Commit Convention
13+
14+
PR titles should follow [conventional commit standards](https://www.conventionalcommits.org/). This helps automate the release process.
15+
16+
The standard format for commit messages is as follows:
17+
18+
```
19+
<type>[optional scope]: <description>
20+
[optional body]
21+
[optional footer]
22+
```
23+
24+
The following lists the different `types` allowed in the commit message:
25+
26+
- feat: A new feature (automatic minor release)
27+
- fix: A bug fix (automatic patch release)
28+
- docs: Documentation only changes
29+
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
30+
- refactor: A code change that neither fixes a bug nor adds a feature
31+
- perf: A code change that improves performance
32+
- test: Adding missing or correcting existing tests
33+
- chore: Changes that don't modify src or test files, such as automatic documentation generation, or building latest assets
34+
- ci: Changes to CI configuration files/scripts
35+
- revert: Revert commit
36+
- build: Changes that affect the build system or other dependencies
37+
38+
In the footer, if there is a breaking change, start your footer with `BREAKING CHANGE:` followed by a description.
39+
40+
## Running Tests
41+
42+
```bash
43+
$ npm install
44+
$ npm run test // builds mparticle bundles and runs tests
45+
```
46+
47+
There are additional scripts that may improve your development experience:
48+
```bash
49+
$ npm run watch // watches src/ files and continuously rebuilds bundles as changes are made
50+
$ npm run watch:tests // watches test/ files and continuously rebuilds test bundles as changes are made
51+
$ npm run test:debug // opens a browser so you can step through mParticle and test code
52+
```

0 commit comments

Comments
 (0)