From df3c77335484caaa038660e82f44ceb3cb633560 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 16 Sep 2024 21:28:26 -0500 Subject: [PATCH] Get rid of individual package.json files --- packages/core/package.json | 19 ------------------- packages/core/src/element/click.ts | 2 +- packages/globals/deno.json | 1 + packages/globals/package.json | 18 ------------------ packages/html/deno.json | 1 + packages/html/package.json | 19 ------------------- packages/keyboard/deno.json | 1 + packages/keyboard/package.json | 18 ------------------ packages/keyboard/tsconfig.docs.json | 4 ---- packages/keyboard/tsconfig.json | 6 ------ packages/keyboard/typedoc.json | 7 ------- packages/with-cypress/package.json | 4 ++-- tasks/build-npm.ts | 24 ++++++++++++++++-------- 13 files changed, 22 insertions(+), 102 deletions(-) delete mode 100644 packages/core/package.json delete mode 100644 packages/globals/package.json delete mode 100644 packages/html/package.json delete mode 100644 packages/keyboard/package.json delete mode 100644 packages/keyboard/tsconfig.docs.json delete mode 100644 packages/keyboard/tsconfig.json delete mode 100644 packages/keyboard/typedoc.json diff --git a/packages/core/package.json b/packages/core/package.json deleted file mode 100644 index 25fa3db0..00000000 --- a/packages/core/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@interactors/core", - "version": "0.0.0", - "description": "Composable page objects for components", - "license": "MIT", - "homepage": "https://frontside.com/interactors", - "author": "Frontside Engineering ", - "repository": { - "type": "git", - "url": "git+https://github.com/thefrontside/interactors.git" - }, - "bugs": { - "url": "https://github.com/thefrontside/interactors/issues" - }, - "engines": { - "node": ">= 16" - }, - "sideEffects": false -} diff --git a/packages/core/src/element/click.ts b/packages/core/src/element/click.ts index 8db66475..30844770 100644 --- a/packages/core/src/element/click.ts +++ b/packages/core/src/element/click.ts @@ -1,4 +1,4 @@ -// @ts-ignore 123 +// @ts-expect-error because testing library types ar not there? import { userEvent } from '@testing-library/user-event' export function click(...args: Parameters): ReturnType { diff --git a/packages/globals/deno.json b/packages/globals/deno.json index 05809151..4f11c5f5 100644 --- a/packages/globals/deno.json +++ b/packages/globals/deno.json @@ -1,6 +1,7 @@ { "name": "@interactors/globals", "version": "1.0.0", + "description": "Global variable accessors for interactors", "tasks": { "test": "deno test --allow-run=deno --allow-env --allow-read" }, diff --git a/packages/globals/package.json b/packages/globals/package.json deleted file mode 100644 index 6e0d0f76..00000000 --- a/packages/globals/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@interactors/globals", - "version": "0.0.0", - "description": "Global variable accessors for interactors", - "license": "MIT", - "homepage": "https://frontside.com/interactors", - "author": "Frontside Engineering ", - "repository": { - "type": "git", - "url": "git+https://github.com/thefrontside/interactors.git" - }, - "bugs": { - "url": "https://github.com/thefrontside/interactors/issues" - }, - "engines": { - "node": ">= 16" - } -} diff --git a/packages/html/deno.json b/packages/html/deno.json index d589157c..a3ed58cf 100644 --- a/packages/html/deno.json +++ b/packages/html/deno.json @@ -1,6 +1,7 @@ { "name": "@interactors/html", "version": "1.0.0", + "description": "Interactors for the DOM", "tasks": { "test": "deno test --allow-run=deno --allow-env --allow-read", "docs": "rm -rf docs && mkdir -p docs/api/v1 && deno doc --html --output=docs/api/v1 mod.ts" diff --git a/packages/html/package.json b/packages/html/package.json deleted file mode 100644 index 2f4f2f1a..00000000 --- a/packages/html/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@interactors/html", - "version": "0.0.0", - "description": "Interactors for working with applications", - "license": "MIT", - "homepage": "https://frontside.com/interactors", - "author": "Frontside Engineering ", - "repository": { - "type": "git", - "url": "git+https://github.com/thefrontside/interactors.git" - }, - "bugs": { - "url": "https://github.com/thefrontside/interactors/issues" - }, - "engines": { - "node": ">= 16" - }, - "sideEffects": false -} diff --git a/packages/keyboard/deno.json b/packages/keyboard/deno.json index ee81625a..d77cfae0 100644 --- a/packages/keyboard/deno.json +++ b/packages/keyboard/deno.json @@ -1,6 +1,7 @@ { "name": "@interactors/keyboard", "version": "1.0.0", + "description": "Interactors for simulating the keyboard", "tasks": { "test": "deno test --allow-run=deno --allow-env --allow-read", "docs": "rm -rf docs && deno run -A npm:typedoc@^0.25.13 --options typedoc.json --tsconfig tsconfig.docs.json", diff --git a/packages/keyboard/package.json b/packages/keyboard/package.json deleted file mode 100644 index 1f4390cc..00000000 --- a/packages/keyboard/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@interactors/keyboard", - "version": "0.0.0", - "description": "Interactors for simulating the keyboard", - "license": "MIT", - "homepage": "https://frontside.com/interactors", - "author": "Frontside Engineering ", - "repository": { - "type": "git", - "url": "git+https://github.com/thefrontside/interactors.git" - }, - "bugs": { - "url": "https://github.com/thefrontside/interactors/issues" - }, - "engines": { - "node": ">= 16" - } -} diff --git a/packages/keyboard/tsconfig.docs.json b/packages/keyboard/tsconfig.docs.json deleted file mode 100644 index c247e7d9..00000000 --- a/packages/keyboard/tsconfig.docs.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["test/**/*.ts", "tasks/**/*.ts"] -} diff --git a/packages/keyboard/tsconfig.json b/packages/keyboard/tsconfig.json deleted file mode 100644 index da514818..00000000 --- a/packages/keyboard/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../tsconfig-base.json", - "compilerOptions": { - "allowImportingTsExtensions": true - } -} diff --git a/packages/keyboard/typedoc.json b/packages/keyboard/typedoc.json deleted file mode 100644 index 151f304c..00000000 --- a/packages/keyboard/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "out": "docs/api/v1", - "name": "@interactors/html", - "entryPoints": ["./mod.ts"], - "includeVersion": true, - "excludePrivate": true -} diff --git a/packages/with-cypress/package.json b/packages/with-cypress/package.json index d6dbbb44..98f08694 100644 --- a/packages/with-cypress/package.json +++ b/packages/with-cypress/package.json @@ -8,7 +8,7 @@ "repository": "https://github.com/thefrontside/interactors.git", "homepage": "https://frontside.com/interactors", "author": "Frontside Engineering ", - "license": "MIT", +n "license": "MIT", "files": [ "dist/**/*", "src/**/*", @@ -22,7 +22,7 @@ "cypress": ">=6.0.0 <13.0.0" }, "scripts": { - "start": "cd ./cypres/sample/ && yarn && yarn start -Y -p 3000", + "start": "cd ./cypress/sample/ && yarn && yarn start -Y -p 3000", "cypress:run": "npx cypress run", "test": "echo 'Tests are skipped for now due to a issue with some scripts' && exit 0", "test:skip": "start-server-and-test 'yarn start' http://localhost:3000 cypress:run", diff --git a/tasks/build-npm.ts b/tasks/build-npm.ts index af1f3dfa..906454e5 100644 --- a/tasks/build-npm.ts +++ b/tasks/build-npm.ts @@ -14,10 +14,7 @@ export async function buildNpm(packageDirectory: string) { with: { type: "json" }, } ); - const { default: packageJson } = await import( - `../${packageDirectory}/package.json`, - { with: { type: "json" } } - ); + const outDir = new URL(`../${packageDirectory}/build/npm`, import.meta.url); await emptyDir(outDir); @@ -44,8 +41,6 @@ export async function buildNpm(packageDirectory: string) { import.meta.resolve(`../${packageDirectory}/imports-${Date.now()}.json`) ); - console.log({ ...denoJson.imports, ...workspaceImports }); - await Deno.writeTextFile( tmpImportMapFile, JSON.stringify({ @@ -72,8 +67,21 @@ export async function buildNpm(packageDirectory: string) { sourceMap: true, }, package: { - ...packageJson, - version: denoJson.version, + name: denoJson.name, + version: denoJson.version, + description: denoJson.description, + license: "MIT", + homepage: "https://frontside.com/interactors", + author: "Frontside Engineering ", + repository: { + type: "git", + url: "git+https://github.com/thefrontside/interactors.git", + directory: packageDirectory, + }, + bugs: { + url: "https://github.com/thefrontside/interactors/issues", + }, + sideEffects: false }, });