Skip to content

Commit 4d09ebe

Browse files
adonawacbaker6
andauthored
feat: working analytics adapter (#1)
* package file & analytics dependencies * Additional files added/set up * file upload * remove payload converter file, and change filename * minor clean up * Adjusted agnostic adapter file. added in jasmine for testing. * commit changes * added babel and typescript , fixed importing errors on 2/3 spec files. * push * Error:describe with no children/describe() or it() * push * Create LICENSE * fixes * Remove ignored files * Remove files * Remove files * Remove files * renaming and fixes * lint * nits * more nits * update dependencies * fix linter * prep for 1.0.0 * Return the promise * improve documentation and tests * improve test names * Update README.md * added ci.yml and release.yml * release.yml change * add ci.yml * Update README.md * Update README.md * add codecov * Update README.md * codecov_fix * Update README.md * Update README.md * Update README.md * Update README.md * updage package files Co-authored-by: Corey <[email protected]>
1 parent 933cde2 commit 4d09ebe

18 files changed

+11409
-676
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env"]
3+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"root": true,
3+
"extends": "eslint:recommended",
4+
"env": {
5+
"node": true,
6+
"es6": true
7+
},
8+
"parser": "@babel/eslint-parser",
9+
"plugins": [
10+
"flowtype"
11+
],
12+
"parserOptions": {
13+
"ecmaVersion": 6,
14+
"sourceType": "module"
15+
},
16+
"rules": {
17+
"indent": ["error", 2, { "SwitchCase": 1 }],
18+
"linebreak-style": ["error", "unix"],
19+
"no-trailing-spaces": 2,
20+
"eol-last": 2,
21+
"space-in-parens": ["error", "never"],
22+
"no-multiple-empty-lines": 1,
23+
"prefer-const": "error",
24+
"space-infix-ops": "error",
25+
"no-useless-escape": "off",
26+
"require-atomic-updates": "off"
27+
}
28+
}

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- '**'
9+
env:
10+
NODE_VERSION: 14.16.1
11+
jobs:
12+
check-circular:
13+
name: Circular Dependencies
14+
timeout-minutes: 5
15+
runs-on: ubuntu-18.04
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.NODE_VERSION }}
22+
- name: Cache Node.js modules
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.npm
26+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
27+
restore-keys: |
28+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
29+
- name: Install dependencies
30+
run: npm ci
31+
- run: npm run madge:circular
32+
check-lint:
33+
name: Lint
34+
timeout-minutes: 5
35+
runs-on: ubuntu-18.04
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: ${{ matrix.node-version }}
42+
- name: Cache Node.js modules
43+
uses: actions/cache@v2
44+
with:
45+
path: ~/.npm
46+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
47+
restore-keys: |
48+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
49+
- name: Install dependencies
50+
run: npm ci
51+
- run: npm run lint
52+
check-tests:
53+
name: Tests
54+
timeout-minutes: 5
55+
runs-on: ubuntu-18.04
56+
steps:
57+
- uses: actions/checkout@v2
58+
- name: Use Node.js
59+
uses: actions/setup-node@v1
60+
with:
61+
node-version: ${{ matrix.NODE_VERSION }}
62+
- name: Cache Node.js modules
63+
uses: actions/cache@v2
64+
with:
65+
path: ~/.npm
66+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
67+
restore-keys: |
68+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
69+
- run: npm ci
70+
- run: npm test
71+
env:
72+
CI: true
73+
- uses: codecov/codecov-action@v2
74+
with:
75+
fail_ci_if_error: true

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: release
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: 10
14+
- run: npm install
15+
- run: npm test
16+
- uses: JS-DevTools/npm-publish@v1
17+
with:
18+
token: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# node / npm
2+
node_modules
3+
package-lock.json
4+
.size-snapshot.json
5+
*.log
6+
.netlify
7+
lib-cov
8+
coverage
9+
.nyc_output
10+
# IDE stuff
11+
**/.idea
12+
13+
# OS stuff
14+
.DS_Store
15+
.tmp
16+
lib
17+
18+
dist
19+
misc
20+
queues
21+
TODO.md
22+
types/
23+
misc.js

0 commit comments

Comments
 (0)