Skip to content

Commit

Permalink
rename packages for security purposes, fix lint errors (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky authored Sep 6, 2023
1 parent 87b0337 commit 9ca8d34
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 43 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-starfishes-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@segment/edge-sdk": patch
---

Fix lint errors
5 changes: 0 additions & 5 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/cloudflare_example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"devDependencies": {
"@cloudflare/workers-types": "^3.16.0",
"@segment/eslint-config-edge-sdk": "*",
"@segment/tsconfig-edge-sdk": "*",
"eslint-config-edge-sdk": "*",
"typescript": "^4.8.3",
"wrangler": "2.1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@changesets/cli": "^2.22.0",
"eslint-config-edge-sdk": "*",
"@segment/eslint-config-edge-sdk": "*",
"prettier": "^2.5.1",
"turbo": "latest"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/edge-sdk/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module.exports = {
root: true,
extends: ["edge-sdk"],
extends: ["@segment/edge-sdk"],
};
8 changes: 4 additions & 4 deletions packages/edge-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
"lint": "TIMING=1 eslint src/**/*.ts* --fix",
"lint": "TIMING=1 eslint src/**/*.ts*",
"clean": "rm -rf .turbo && rm -rf dist",
"postversion": "sh scripts/version.sh",
"test": "jest"
},
"jest": {
"preset": "jest-presets/jest/cf"
"preset": "@segment/jest-presets/jest/cf"
},
"devDependencies": {
"@cloudflare/workers-types": "^3.16.0",
"@segment/eslint-config-edge-sdk": "*",
"@segment/jest-presets": "*",
"@segment/tsconfig-edge-sdk": "*",
"@types/jest": "^29.0.3",
"@types/uuid": "^8.3.4",
"eslint": "^7.32.0",
"eslint-config-edge-sdk": "*",
"jest": "^29.0.3",
"jest-presets": "*",
"tsup": "^5.10.1",
"typescript": "^4.5.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/edge-sdk/src/cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const extractIdFromPayload: HandlerFunction = async (
response,
context
) => {
let body: { [key: string]: any } = await request.json();
const body: { [key: string]: any } = await request.json();
const newContext = { ...context };

if (body.userId) {
Expand Down
2 changes: 1 addition & 1 deletion packages/edge-sdk/src/personas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const handlePersonasWebhook: HandlerFunction = async (
];
}

let event = (await request.json()) as PersonasWebhookPayload;
const event = (await request.json()) as PersonasWebhookPayload;

if (event.type !== "identify") {
context.logger.log("debug", "Ignoring incoming webhook, not an identify", {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-edge-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "eslint-config-edge-sdk",
"name": "@segment/eslint-config-edge-sdk",
"version": "0.0.0",
"private": true,
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-presets/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "jest-presets",
"name": "@segment/jest-presets",
"version": "0.0.0",
"private": true,
"license": "MIT",
Expand Down
52 changes: 26 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1434,8 +1434,8 @@ __metadata:
dependencies:
"@cloudflare/workers-types": ^3.16.0
"@segment/edge-sdk": "*"
"@segment/eslint-config-edge-sdk": "*"
"@segment/tsconfig-edge-sdk": "*"
eslint-config-edge-sdk: "*"
typescript: ^4.8.3
wrangler: 2.1.4
languageName: unknown
Expand All @@ -1446,14 +1446,14 @@ __metadata:
resolution: "@segment/edge-sdk@workspace:packages/edge-sdk"
dependencies:
"@cloudflare/workers-types": ^3.16.0
"@segment/eslint-config-edge-sdk": "*"
"@segment/jest-presets": "*"
"@segment/snippet": ^4.15.3
"@segment/tsconfig-edge-sdk": "*"
"@types/jest": ^29.0.3
"@types/uuid": ^8.3.4
eslint: ^7.32.0
eslint-config-edge-sdk: "*"
jest: ^29.0.3
jest-presets: "*"
tldts: ^5.7.100
tsup: ^5.10.1
typescript: ^4.5.3
Expand All @@ -1462,6 +1462,28 @@ __metadata:
languageName: unknown
linkType: soft

"@segment/eslint-config-edge-sdk@*, @segment/eslint-config-edge-sdk@workspace:packages/eslint-config-edge-sdk":
version: 0.0.0-use.local
resolution: "@segment/eslint-config-edge-sdk@workspace:packages/eslint-config-edge-sdk"
dependencies:
"@typescript-eslint/eslint-plugin": ^5.49.0
"@typescript-eslint/parser": ^5.49.0
eslint: ^8.32.0
eslint-config-prettier: ^8.3.0
eslint-config-turbo: ^0.0.7
languageName: unknown
linkType: soft

"@segment/jest-presets@*, @segment/jest-presets@workspace:packages/jest-presets":
version: 0.0.0-use.local
resolution: "@segment/jest-presets@workspace:packages/jest-presets"
dependencies:
jest-environment-miniflare: ^2.11.0
miniflare: ^2.11.0
ts-jest: ^29.0.1
languageName: unknown
linkType: soft

"@segment/segment_proxy@workspace:examples/segment_proxy":
version: 0.0.0-use.local
resolution: "@segment/segment_proxy@workspace:examples/segment_proxy"
Expand Down Expand Up @@ -3342,18 +3364,6 @@ __metadata:
languageName: node
linkType: hard

"eslint-config-edge-sdk@*, eslint-config-edge-sdk@workspace:packages/eslint-config-edge-sdk":
version: 0.0.0-use.local
resolution: "eslint-config-edge-sdk@workspace:packages/eslint-config-edge-sdk"
dependencies:
"@typescript-eslint/eslint-plugin": ^5.49.0
"@typescript-eslint/parser": ^5.49.0
eslint: ^8.32.0
eslint-config-prettier: ^8.3.0
eslint-config-turbo: ^0.0.7
languageName: unknown
linkType: soft

"eslint-config-prettier@npm:^8.3.0":
version: 8.6.0
resolution: "eslint-config-prettier@npm:8.6.0"
Expand Down Expand Up @@ -4928,16 +4938,6 @@ __metadata:
languageName: node
linkType: hard

"jest-presets@*, jest-presets@workspace:packages/jest-presets":
version: 0.0.0-use.local
resolution: "jest-presets@workspace:packages/jest-presets"
dependencies:
jest-environment-miniflare: ^2.11.0
miniflare: ^2.11.0
ts-jest: ^29.0.1
languageName: unknown
linkType: soft

"jest-regex-util@npm:^29.4.3":
version: 29.4.3
resolution: "jest-regex-util@npm:29.4.3"
Expand Down Expand Up @@ -6535,7 +6535,7 @@ __metadata:
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@changesets/cli": ^2.22.0
eslint-config-edge-sdk: "*"
"@segment/eslint-config-edge-sdk": "*"
prettier: ^2.5.1
turbo: latest
languageName: unknown
Expand Down

0 comments on commit 9ca8d34

Please sign in to comment.