From ad5022913e8d75208a33d7b5b527a16115c4e201 Mon Sep 17 00:00:00 2001 From: Seth Silesky <5115498+silesky@users.noreply.github.com> Date: Mon, 7 Nov 2022 16:21:37 -0600 Subject: [PATCH] rename examples package, simplify changeset config and pipeline (#661) --- .buildkite/pipeline.yml | 4 +- .changeset/config.json | 2 +- examples/standalone-playground/package.json | 2 +- examples/with-next-js/package.json | 2 +- examples/with-next-js/tsconfig.json | 3 +- examples/with-vite/package.json | 2 +- yarn.lock | 92 ++++++++++----------- 7 files changed, 54 insertions(+), 53 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9b7e902fd..6094e24e4 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -129,9 +129,9 @@ steps: - echo "--- Install dependencies" - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn install --immutable - echo "--- Build bundles" - - yarn workspaces foreach -vtR --from '{with-next-js,with-vite}' run build + - yarn turbo run --filter='./examples/*' build - echo "+++ Run tests" - - yarn workspaces foreach -vt --from 'with-next-js' run lint + - yarn turbo run --filter='./examples/*' lint plugins: - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" diff --git a/.changeset/config.json b/.changeset/config.json index f86ddd37b..4a2f79fd0 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,6 @@ { "$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json", - "ignore": ["standalone-playground", "with-next-js", "with-vite"], + "ignore": ["@example/*", "@internal/*"], "changelog": [ "@changesets/changelog-github", { diff --git a/examples/standalone-playground/package.json b/examples/standalone-playground/package.json index dbf3befa5..0d4aadb6d 100644 --- a/examples/standalone-playground/package.json +++ b/examples/standalone-playground/package.json @@ -1,5 +1,5 @@ { - "name": "standalone-playground", + "name": "@example/standalone-playground", "private": true, "installConfig": { "hoistingLimits": "workspaces" diff --git a/examples/with-next-js/package.json b/examples/with-next-js/package.json index ff5a0a607..4463fa849 100644 --- a/examples/with-next-js/package.json +++ b/examples/with-next-js/package.json @@ -1,5 +1,5 @@ { - "name": "with-next-js", + "name": "@example/with-next-js", "version": "0.1.0", "private": true, "scripts": { diff --git a/examples/with-next-js/tsconfig.json b/examples/with-next-js/tsconfig.json index 250d24369..0458d7f70 100644 --- a/examples/with-next-js/tsconfig.json +++ b/examples/with-next-js/tsconfig.json @@ -15,7 +15,8 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve" + "jsx": "preserve", + "incremental": true }, "include": [ "next-env.d.ts", diff --git a/examples/with-vite/package.json b/examples/with-vite/package.json index 56a6aa1be..f9ce15fee 100644 --- a/examples/with-vite/package.json +++ b/examples/with-vite/package.json @@ -1,5 +1,5 @@ { - "name": "with-vite", + "name": "@example/with-vite", "private": true, "scripts": { "concurrently": "yarn run -T concurrently", diff --git a/yarn.lock b/yarn.lock index 89ecef818..fd2e28ee3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1098,6 +1098,52 @@ __metadata: languageName: node linkType: hard +"@example/standalone-playground@workspace:examples/standalone-playground": + version: 0.0.0-use.local + resolution: "@example/standalone-playground@workspace:examples/standalone-playground" + dependencies: + "@segment/analytics-next": "workspace:^" + concurrently: ^7.2.1 + languageName: unknown + linkType: soft + +"@example/with-next-js@workspace:examples/with-next-js": + version: 0.0.0-use.local + resolution: "@example/with-next-js@workspace:examples/with-next-js" + dependencies: + "@next/bundle-analyzer": ^12.1.5 + "@segment/analytics-next": "workspace:^" + "@types/faker": ^5.1.2 + "@types/react": ^17.0.37 + eslint-config-next: ^12.1.6 + faker: ^5.1.0 + lodash: ^4.17.21 + next: ^12.1.0 + prismjs: ^1.27.0 + rc-table: ^7.10.0 + react: ^17.0.2 + react-dom: ^17.0.2 + react-json-tree: ^0.13.0 + react-simple-code-editor: ^0.11.0 + source-map-loader: ^3.0.1 + languageName: unknown + linkType: soft + +"@example/with-vite@workspace:examples/with-vite": + version: 0.0.0-use.local + resolution: "@example/with-vite@workspace:examples/with-vite" + dependencies: + "@segment/analytics-next": "workspace:^" + "@types/react": ^18.0.0 + "@types/react-dom": ^18.0.0 + "@vitejs/plugin-react": ^1.3.0 + react: ^18.0.0 + react-dom: ^18.0.0 + typescript: ^4.6.4 + vite: ^2.9.12 + languageName: unknown + linkType: soft + "@gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -12647,15 +12693,6 @@ __metadata: languageName: node linkType: hard -"standalone-playground@workspace:examples/standalone-playground": - version: 0.0.0-use.local - resolution: "standalone-playground@workspace:examples/standalone-playground" - dependencies: - "@segment/analytics-next": "workspace:^" - concurrently: ^7.2.1 - languageName: unknown - linkType: soft - "statuses@npm:>= 1.5.0 < 2, statuses@npm:~1.5.0": version: 1.5.0 resolution: "statuses@npm:1.5.0" @@ -14272,43 +14309,6 @@ __metadata: languageName: node linkType: hard -"with-next-js@workspace:examples/with-next-js": - version: 0.0.0-use.local - resolution: "with-next-js@workspace:examples/with-next-js" - dependencies: - "@next/bundle-analyzer": ^12.1.5 - "@segment/analytics-next": "workspace:^" - "@types/faker": ^5.1.2 - "@types/react": ^17.0.37 - eslint-config-next: ^12.1.6 - faker: ^5.1.0 - lodash: ^4.17.21 - next: ^12.1.0 - prismjs: ^1.27.0 - rc-table: ^7.10.0 - react: ^17.0.2 - react-dom: ^17.0.2 - react-json-tree: ^0.13.0 - react-simple-code-editor: ^0.11.0 - source-map-loader: ^3.0.1 - languageName: unknown - linkType: soft - -"with-vite@workspace:examples/with-vite": - version: 0.0.0-use.local - resolution: "with-vite@workspace:examples/with-vite" - dependencies: - "@segment/analytics-next": "workspace:^" - "@types/react": ^18.0.0 - "@types/react-dom": ^18.0.0 - "@vitejs/plugin-react": ^1.3.0 - react: ^18.0.0 - react-dom: ^18.0.0 - typescript: ^4.6.4 - vite: ^2.9.12 - languageName: unknown - linkType: soft - "word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3": version: 1.2.3 resolution: "word-wrap@npm:1.2.3"