Skip to content

Commit

Permalink
Get rid of individual package.json files
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyd committed Sep 17, 2024
1 parent afb222f commit ce955d4
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 85 deletions.
19 changes: 0 additions & 19 deletions packages/core/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/src/element/click.ts
Original file line number Diff line number Diff line change
@@ -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<typeof userEvent.click>): ReturnType<typeof userEvent.click> {
Expand Down
1 change: 1 addition & 0 deletions packages/globals/deno.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
18 changes: 0 additions & 18 deletions packages/globals/package.json

This file was deleted.

1 change: 1 addition & 0 deletions packages/html/deno.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
19 changes: 0 additions & 19 deletions packages/html/package.json

This file was deleted.

1 change: 1 addition & 0 deletions packages/keyboard/deno.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
18 changes: 0 additions & 18 deletions packages/keyboard/package.json

This file was deleted.

4 changes: 2 additions & 2 deletions packages/with-cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"repository": "https://github.com/thefrontside/interactors.git",
"homepage": "https://frontside.com/interactors",
"author": "Frontside Engineering <engineering@frontside.com>",
"license": "MIT",
n "license": "MIT",
"files": [
"dist/**/*",
"src/**/*",
Expand All @@ -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",
Expand Down
24 changes: 16 additions & 8 deletions tasks/build-npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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({
Expand All @@ -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 <engineering@frontside.com>",
repository: {
type: "git",
url: "git+https://github.com/thefrontside/interactors.git",
directory: packageDirectory,
},
bugs: {
url: "https://github.com/thefrontside/interactors/issues",
},
sideEffects: false
},
});

Expand Down

0 comments on commit ce955d4

Please sign in to comment.