Skip to content

Commit

Permalink
turbo update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkirtzel committed Jun 25, 2024
1 parent 0105a41 commit 7368353
Show file tree
Hide file tree
Showing 24 changed files with 990 additions and 2,365 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
"name": "walkerOS dev container",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:latest",
// Features to add to the dev container. More info: https://containers.dev/features.
Expand Down Expand Up @@ -46,8 +46,8 @@
"5173": {
"label": "8080 - apps/demo/tagging"
},
"8080": {
"label": "5173 - apps/demo/react"
"8002": {
"label": "8002 - apps/demo/react"
}
}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ jobs:
cache: 'npm'
- run: npm install
- run: npm run test
- run: npm run lint
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"pageviews",
"Piwik",
"piwikpro",
"tsup",
"walkerjs",
"walkeros"
]
Expand Down
3,216 changes: 901 additions & 2,315 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"clean": "turbo run clean",
"dev": "turbo run dev",
"lint": "turbo run lint",
"publish-packages": "turbo run build test && changeset version && changeset publish",
"publish-packages": "turbo run lint build test && changeset version && changeset publish",
"test": "turbo run test"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@changesets/cli": "^2.27.6",
"@elbwalker/jest": "*",
"@elbwalker/tsconfig": "*",
"@elbwalker/tsup": "*",
"@elbwalker/types": "2.0.0-next.0",
"eslint-config-custom": "*",
"turbo": "^1.12.5",
"typescript": "^5.4.2"
"turbo": "^2.0.5",
"typescript": "^5.5.2"
},
"packageManager": "npm@9.6.7",
"browserslist": [
Expand Down
5 changes: 2 additions & 3 deletions packages/clients/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/clients/node/src/types/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { WalkerOS, Schema, Handler, Hooks, On } from '@elbwalker/types';
import type { WalkerOS, Schema, Handler, Hooks } from '@elbwalker/types';
import type { SessionData } from '@elbwalker/utils';
import type * as NodeDestination from './destination';
import type * as On from './on';

export interface Instance extends State, WalkerOS.Instance {
push: Elb<Promise<PushResult>>;
Expand Down
1 change: 1 addition & 0 deletions packages/clients/node/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * as NodeClient from './client';
export * as NodeDestination from './destination';
export * as On from './on';
31 changes: 31 additions & 0 deletions packages/clients/node/src/types/on.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { WalkerOS } from '@elbwalker/types';

// Instance state for the on actions
export type Config = {
consent?: Array<ConsentConfig>;
ready?: Array<ReadyConfig>;
run?: Array<RunConfig>;
};

// On types
export type Types = keyof Config;

// Parameters for the onAction function calls
export type Options = ConsentConfig | ReadyConfig | RunConfig;

// Consent
export interface ConsentConfig {
[key: string]: ConsentFn;
}
export type ConsentFn = (
instance: WalkerOS.Instance,
consent: WalkerOS.Consent,
) => void;

// Ready
export type ReadyConfig = ReadyFn;
export type ReadyFn = (instance: WalkerOS.Instance) => void;

// Run
export type RunConfig = RunFn;
export type RunFn = (instance: WalkerOS.Instance) => void;
5 changes: 2 additions & 3 deletions packages/clients/walkerjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/clients/walkerjs/src/types/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Hooks, On, WalkerOS } from '@elbwalker/types';
import type { Hooks, WalkerOS } from '@elbwalker/types';
import type { SessionConfig, SessionData } from '@elbwalker/utils';
import type * as On from './on';
import type * as WebDestination from './destination';
import type * as Walker from './walker';

Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/node/bigquery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/web/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/web/google-ads/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/web/google-ga4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/web/google-gtm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/web/meta-pixel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/web/piwikpro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/destinations/web/plausible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/stacks/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/tagger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"test": "jest --colors --coverage"
},
"dependencies": {
Expand Down
5 changes: 2 additions & 3 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "tsup",
"build:dev": "tsup --config tsup.dev.config.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "npm run dev:build & npm run dev:test",
"dev:build": "tsup --watch --config tsup.dev.config.ts",
"dev:test": "jest --watchAll --colors",
"dev": "jest --watchAll --colors",
"lint": "eslint \"**/*.ts*\"",
"test": "jest --colors --coverage"
},
Expand Down
12 changes: 10 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
"pipeline": {
"tasks": {
"build": {
"dependsOn": ["clean", "^build"],
"outputs": ["dist/**"]
},
"build:dev": {
"dependsOn": ["clean", "^build:dev"],
"outputs": ["dist/**"]
},
"clean": {
"cache": false
},
"dev": {},
"dev": {
"cache": false,
"dependsOn": ["build:dev"],
"persistent": true
},
"lint": {
"outputs": []
},
Expand Down
8 changes: 8 additions & 0 deletions website/docs/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ turbo run build --filter=walker.js --filter=utils
The `filter` option can be used to only run one or multiple packages. To filter
use the `packages name` field in the `package.json` file.

### Updates

To update all npm packages to the latest version, run:

```bash
npx npm-check-updates -u && npm update && npm install
```

## Documentation

The documentation is also included in the repository under the `website/docs`
Expand Down

0 comments on commit 7368353

Please sign in to comment.