Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
simonabadoiu authored Aug 10, 2023
2 parents d229fb0 + ea10c42 commit ba5150b
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
plugins: ['prettier'],
env: {
node: true,
browser: true,
worker: true,
es2022: true,
},
rules: {
'prettier/prettier': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, argsIgnorePattern: '^_' },
],
},
overrides: [
{
files: ['*d.ts'],
rules: {
'no-undef': 'off',
},
},
{
files: ['*js'],
globals: {
webcm: 'writable',
},
},
],
}

25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Build Test'

on:
push:
branches:
- '**'

jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Running Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# Actual Tests
- run: npm i
- run: npm run lint --if-present
- run: npm run typecheck --if-present
- run: npm run bundle --if-present
- run: npm run test --if-present
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"bundle": "node esbuild.js",
"build": "npm run lint && npm run typecheck && npm run bundle",
"typecheck": "tsc --project tsconfig.build.json --noEmit",
"test": "vitest run --globals",
"test": "vitest run --globals --passWithNoTests",
"test:dev": "vitest --globals",
"release": "npm run build && npm version patch && npm publish"
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const sendEvent = async (
settings: ComponentSettings
) => {
const tiktokEndpoint =
'https://business-api.tiktok.com/open_api/v1.2/pixel/track/'
'https://business-api.tiktok.com/open_api/v1.3/pixel/track/'

const requestBody = {
pixel_code: payload.properties.pixelCode || settings.pixelCode,
Expand Down

0 comments on commit ba5150b

Please sign in to comment.