From 8749498dae0a1e293b2fb6ec1f2822beeeb390f8 Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Wed, 26 Jun 2024 09:13:29 +0200 Subject: [PATCH] Generate outputs in `dist` (#49) * Generate code in /dist * Move outputs to dir * Fix configuration * Update API extractor configs * Keep generating files * Update TS config * Run prettier * Add changeset --- .changeset/warm-rocks-rush.md | 32 +++++++++++++++++++ config/api-extractor.json | 2 +- docs/review/api/alfa-frontier.api.md | 30 ++++++++--------- .../alfa-angular/config/api-extractor.json | 2 +- packages/alfa-angular/package.json | 8 ++--- packages/alfa-angular/src/tsconfig.json | 6 ++++ packages/alfa-angular/tsconfig.json | 2 +- .../alfa-assert/config/api-extractor.json | 2 +- packages/alfa-assert/package.json | 8 ++--- packages/alfa-assert/src/tsconfig.json | 6 ++++ packages/alfa-assert/test/asserter.spec.ts | 2 +- packages/alfa-assert/test/tsconfig.json | 7 ++++ packages/alfa-assert/tsconfig.json | 10 ++---- packages/alfa-chai/config/api-extractor.json | 2 +- packages/alfa-chai/package.json | 8 ++--- packages/alfa-chai/src/tsconfig.json | 7 ++++ packages/alfa-chai/tsconfig.json | 3 +- .../alfa-cheerio/config/api-extractor.json | 2 +- packages/alfa-cheerio/package.json | 8 ++--- packages/alfa-cheerio/src/tsconfig.json | 6 ++++ packages/alfa-cheerio/tsconfig.json | 2 +- .../alfa-command/config/api-extractor.json | 2 +- packages/alfa-command/package.json | 8 ++--- packages/alfa-command/src/tsconfig.json | 12 +++++++ packages/alfa-command/test/flag.spec.ts | 2 +- packages/alfa-command/test/text.spec.ts | 2 +- packages/alfa-command/test/tsconfig.json | 7 ++++ packages/alfa-command/tsconfig.json | 11 ++----- .../alfa-crawler/config/api-extractor.json | 2 +- packages/alfa-crawler/package.json | 8 ++--- packages/alfa-crawler/src/tsconfig.json | 10 ++++++ packages/alfa-crawler/test/crawler.spec.ts | 2 +- packages/alfa-crawler/test/tsconfig.json | 7 ++++ packages/alfa-crawler/tsconfig.json | 4 +-- .../alfa-cypress/config/api-extractor.json | 2 +- packages/alfa-cypress/package.json | 8 ++--- packages/alfa-cypress/src/tsconfig.json | 11 +++++++ packages/alfa-cypress/tsconfig.json | 7 +--- .../alfa-enzyme/config/api-extractor.json | 2 +- packages/alfa-enzyme/package.json | 8 ++--- packages/alfa-enzyme/src/tsconfig.json | 7 ++++ packages/alfa-enzyme/tsconfig.json | 3 +- .../config/api-extractor.json | 2 +- packages/alfa-formatter-earl/package.json | 8 ++--- .../alfa-formatter-earl/src/tsconfig.json | 10 ++++++ packages/alfa-formatter-earl/tsconfig.json | 8 +---- .../config/api-extractor.json | 2 +- packages/alfa-formatter-json/package.json | 8 ++--- .../alfa-formatter-json/src/tsconfig.json | 7 ++++ packages/alfa-formatter-json/tsconfig.json | 3 +- .../config/api-extractor.json | 2 +- packages/alfa-formatter-sarif/package.json | 8 ++--- .../alfa-formatter-sarif/src/tsconfig.json | 7 ++++ packages/alfa-formatter-sarif/tsconfig.json | 4 +-- .../alfa-formatter/config/api-extractor.json | 2 +- packages/alfa-formatter/package.json | 8 ++--- packages/alfa-formatter/src/tsconfig.json | 6 ++++ packages/alfa-formatter/tsconfig.json | 2 +- .../alfa-frontier/config/api-extractor.json | 2 +- packages/alfa-frontier/package.json | 8 ++--- packages/alfa-frontier/src/tsconfig.json | 6 ++++ packages/alfa-frontier/test/frontier.spec.ts | 2 +- packages/alfa-frontier/test/tsconfig.json | 7 ++++ packages/alfa-frontier/tsconfig.json | 3 +- .../config/api-extractor.json | 2 +- packages/alfa-interviewer/package.json | 8 ++--- packages/alfa-interviewer/src/tsconfig.json | 6 ++++ packages/alfa-interviewer/tsconfig.json | 2 +- .../alfa-jasmine/config/api-extractor.json | 2 +- packages/alfa-jasmine/package.json | 8 ++--- packages/alfa-jasmine/src/tsconfig.json | 7 ++++ packages/alfa-jasmine/tsconfig.json | 7 +--- packages/alfa-jest/config/api-extractor.json | 2 +- packages/alfa-jest/package.json | 8 ++--- packages/alfa-jest/src/tsconfig.json | 7 ++++ packages/alfa-jest/tsconfig.json | 3 +- .../alfa-jquery/config/api-extractor.json | 2 +- packages/alfa-jquery/package.json | 8 ++--- packages/alfa-jquery/src/tsconfig.json | 6 ++++ packages/alfa-jquery/tsconfig.json | 2 +- .../alfa-playwright/config/api-extractor.json | 2 +- packages/alfa-playwright/package.json | 8 ++--- packages/alfa-playwright/src/tsconfig.json | 6 ++++ packages/alfa-playwright/tsconfig.json | 3 +- .../alfa-puppeteer/config/api-extractor.json | 2 +- packages/alfa-puppeteer/package.json | 8 ++--- packages/alfa-puppeteer/src/tsconfig.json | 6 ++++ packages/alfa-puppeteer/tsconfig.json | 2 +- packages/alfa-react/config/api-extractor.json | 2 +- packages/alfa-react/package.json | 8 ++--- packages/alfa-react/src/tsconfig.json | 6 ++++ packages/alfa-react/test/react.spec.tsx | 2 +- packages/alfa-react/test/tsconfig.json | 7 ++++ packages/alfa-react/tsconfig.json | 4 +-- .../alfa-scraper/config/api-extractor.json | 2 +- packages/alfa-scraper/package.json | 8 ++--- packages/alfa-scraper/src/tsconfig.json | 14 ++++++++ packages/alfa-scraper/test/scraper.spec.ts | 4 +-- packages/alfa-scraper/test/tsconfig.json | 7 ++++ packages/alfa-scraper/tsconfig.json | 12 ++----- .../alfa-unexpected/config/api-extractor.json | 2 +- packages/alfa-unexpected/src/tsconfig.json | 7 ++++ packages/alfa-unexpected/tsconfig.json | 3 +- packages/alfa-vue/config/api-extractor.json | 2 +- packages/alfa-vue/package.json | 8 ++--- packages/alfa-vue/src/tsconfig.json | 7 ++++ packages/alfa-vue/test/tsconfig.json | 7 ++++ packages/alfa-vue/test/vue.spec.ts | 2 +- packages/alfa-vue/tsconfig.json | 4 +-- packages/alfa-webdriver/package.json | 8 ++--- packages/alfa-webdriver/src/tsconfig.json | 10 ++++++ packages/alfa-webdriver/tsconfig.json | 6 +--- scripts/api-extractor.mjs | 3 +- scripts/common/reporter.mjs | 13 ++++++-- tsconfig.json | 2 +- 115 files changed, 448 insertions(+), 224 deletions(-) create mode 100644 .changeset/warm-rocks-rush.md create mode 100644 packages/alfa-angular/src/tsconfig.json create mode 100644 packages/alfa-assert/src/tsconfig.json create mode 100644 packages/alfa-assert/test/tsconfig.json create mode 100644 packages/alfa-chai/src/tsconfig.json create mode 100644 packages/alfa-cheerio/src/tsconfig.json create mode 100644 packages/alfa-command/src/tsconfig.json create mode 100644 packages/alfa-command/test/tsconfig.json create mode 100644 packages/alfa-crawler/src/tsconfig.json create mode 100644 packages/alfa-crawler/test/tsconfig.json create mode 100644 packages/alfa-cypress/src/tsconfig.json create mode 100644 packages/alfa-enzyme/src/tsconfig.json create mode 100644 packages/alfa-formatter-earl/src/tsconfig.json create mode 100644 packages/alfa-formatter-json/src/tsconfig.json create mode 100644 packages/alfa-formatter-sarif/src/tsconfig.json create mode 100644 packages/alfa-formatter/src/tsconfig.json create mode 100644 packages/alfa-frontier/src/tsconfig.json create mode 100644 packages/alfa-frontier/test/tsconfig.json create mode 100644 packages/alfa-interviewer/src/tsconfig.json create mode 100644 packages/alfa-jasmine/src/tsconfig.json create mode 100644 packages/alfa-jest/src/tsconfig.json create mode 100644 packages/alfa-jquery/src/tsconfig.json create mode 100644 packages/alfa-playwright/src/tsconfig.json create mode 100644 packages/alfa-puppeteer/src/tsconfig.json create mode 100644 packages/alfa-react/src/tsconfig.json create mode 100644 packages/alfa-react/test/tsconfig.json create mode 100644 packages/alfa-scraper/src/tsconfig.json create mode 100644 packages/alfa-scraper/test/tsconfig.json create mode 100644 packages/alfa-unexpected/src/tsconfig.json create mode 100644 packages/alfa-vue/src/tsconfig.json create mode 100644 packages/alfa-vue/test/tsconfig.json create mode 100644 packages/alfa-webdriver/src/tsconfig.json diff --git a/.changeset/warm-rocks-rush.md b/.changeset/warm-rocks-rush.md new file mode 100644 index 00000000..d4bc3768 --- /dev/null +++ b/.changeset/warm-rocks-rush.md @@ -0,0 +1,32 @@ +--- +"@siteimprove/alfa-formatter-sarif": minor +"@siteimprove/alfa-formatter-earl": minor +"@siteimprove/alfa-formatter-json": minor +"@siteimprove/alfa-interviewer": minor +"@siteimprove/alfa-playwright": minor +"@siteimprove/alfa-unexpected": minor +"@siteimprove/alfa-formatter": minor +"@siteimprove/alfa-puppeteer": minor +"@siteimprove/alfa-webdriver": minor +"@siteimprove/alfa-frontier": minor +"@siteimprove/alfa-angular": minor +"@siteimprove/alfa-cheerio": minor +"@siteimprove/alfa-command": minor +"@siteimprove/alfa-crawler": minor +"@siteimprove/alfa-cypress": minor +"@siteimprove/alfa-jasmine": minor +"@siteimprove/alfa-scraper": minor +"@siteimprove/alfa-assert": minor +"@siteimprove/alfa-enzyme": minor +"@siteimprove/alfa-jquery": minor +"@siteimprove/alfa-react": minor +"@siteimprove/alfa-chai": minor +"@siteimprove/alfa-jest": minor +"@siteimprove/alfa-vue": minor +--- + +**Breaking:** The .js files are now built in the dist folder rather than in src. + +⚠️ This is the first of a series of changes on the internal structure and build process of distributed packages. It is probably better to not use this version and wait until more of these internal changes have been done to jump directly to the final result. We are internally releasing these changes for validation purpose only. + +This should not impact consumers, the package.json files should be set correctly to consume these files. diff --git a/config/api-extractor.json b/config/api-extractor.json index 186d6554..1f6b3fe0 100644 --- a/config/api-extractor.json +++ b/config/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "/src/index.d.ts", + "mainEntryPointFilePath": "/dist/index.d.ts", "apiReport": { "enabled": true, "reportFolder": "../docs/review/api/", diff --git a/docs/review/api/alfa-frontier.api.md b/docs/review/api/alfa-frontier.api.md index 987125db..0954b2f5 100644 --- a/docs/review/api/alfa-frontier.api.md +++ b/docs/review/api/alfa-frontier.api.md @@ -8,16 +8,16 @@ import { Equatable } from '@siteimprove/alfa-equatable'; import * as json from '@siteimprove/alfa-json'; import { Option } from '@siteimprove/alfa-option'; import { Serializable } from '@siteimprove/alfa-json'; -import { URL } from '@siteimprove/alfa-url'; +import { URL as URL_2 } from '@siteimprove/alfa-url'; // @public (undocumented) export class Frontier implements Equatable, Serializable { - complete(url: string | URL): boolean; - dequeue(): Option; - enqueue(url: string | URL): boolean; + complete(url: string | URL_2): boolean; + dequeue(): Option; + enqueue(url: string | URL_2): boolean; // (undocumented) equals(value: unknown): value is this; - error(url: string | URL): boolean; + error(url: string | URL_2): boolean; // (undocumented) static from(json: Frontier.JSON): Frontier; // (undocumented) @@ -27,21 +27,21 @@ export class Frontier implements Equatable, Serializable { // (undocumented) hasWaiting(): boolean; // (undocumented) - isCompleted(url: string | URL): boolean; + isCompleted(url: string | URL_2): boolean; // (undocumented) - isInProgress(url: string | URL): boolean; + isInProgress(url: string | URL_2): boolean; // (undocumented) - isInScope(url: string | URL): boolean; - isSeen(url: string | URL): boolean; - isUnseen(url: string | URL): boolean; + isInScope(url: string | URL_2): boolean; + isSeen(url: string | URL_2): boolean; + isUnseen(url: string | URL_2): boolean; // (undocumented) - isWaiting(url: string | URL): boolean; + isWaiting(url: string | URL_2): boolean; // (undocumented) - static of(scope: string | URL, seed?: Iterable): Frontier; - redirect(from: string | URL, to: string | URL): boolean; - retry(url: string | URL): boolean; + static of(scope: string | URL_2, seed?: Iterable): Frontier; + redirect(from: string | URL_2, to: string | URL_2): boolean; + retry(url: string | URL_2): boolean; // (undocumented) - get scope(): URL; + get scope(): URL_2; // (undocumented) toJSON(): Frontier.JSON; } diff --git a/packages/alfa-angular/config/api-extractor.json b/packages/alfa-angular/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-angular/config/api-extractor.json +++ b/packages/alfa-angular/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-angular/package.json b/packages/alfa-angular/package.json index 9cebcf04..a194ddb4 100644 --- a/packages/alfa-angular/package.json +++ b/packages/alfa-angular/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-angular" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@angular/core": "^11.0.0", diff --git a/packages/alfa-angular/src/tsconfig.json b/packages/alfa-angular/src/tsconfig.json new file mode 100644 index 00000000..fb0ab37a --- /dev/null +++ b/packages/alfa-angular/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./angular.ts", "./index.ts"] +} diff --git a/packages/alfa-angular/tsconfig.json b/packages/alfa-angular/tsconfig.json index 69d166b7..4da41a18 100644 --- a/packages/alfa-angular/tsconfig.json +++ b/packages/alfa-angular/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/angular.ts", "src/index.ts"] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-assert/config/api-extractor.json b/packages/alfa-assert/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-assert/config/api-extractor.json +++ b/packages/alfa-assert/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-assert/package.json b/packages/alfa-assert/package.json index 061999ab..9320cbff 100644 --- a/packages/alfa-assert/package.json +++ b/packages/alfa-assert/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-assert" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-assert/src/tsconfig.json b/packages/alfa-assert/src/tsconfig.json new file mode 100644 index 00000000..2969bdec --- /dev/null +++ b/packages/alfa-assert/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./asserter.ts", "./assertion.ts", "./handler.ts", "./index.ts"] +} diff --git a/packages/alfa-assert/test/asserter.spec.ts b/packages/alfa-assert/test/asserter.spec.ts index b500f056..746a65c8 100644 --- a/packages/alfa-assert/test/asserter.spec.ts +++ b/packages/alfa-assert/test/asserter.spec.ts @@ -3,7 +3,7 @@ import { Hashable } from "@siteimprove/alfa-hash"; import { Option } from "@siteimprove/alfa-option"; import { test } from "@siteimprove/alfa-test"; -import { Asserter } from "../src/asserter"; +import { Asserter } from "../dist/asserter"; import { CantTell, Fail, Pass } from "./fixture/rule"; diff --git a/packages/alfa-assert/test/tsconfig.json b/packages/alfa-assert/test/tsconfig.json new file mode 100644 index 00000000..46aaa8c0 --- /dev/null +++ b/packages/alfa-assert/test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "." }, + "files": ["./fixture/rule.ts", "./asserter.spec.ts"], + "references": [{ "path": "../src" }] +} diff --git a/packages/alfa-assert/tsconfig.json b/packages/alfa-assert/tsconfig.json index ae2c0a3f..398e0fba 100644 --- a/packages/alfa-assert/tsconfig.json +++ b/packages/alfa-assert/tsconfig.json @@ -1,12 +1,6 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": [ - "src/asserter.ts", - "src/assertion.ts", - "src/handler.ts", - "src/index.ts", - "test/fixture/rule.ts", - "test/asserter.spec.ts" - ] + "files": [], + "references": [{ "path": "./src" }, { "path": "./test" }] } diff --git a/packages/alfa-chai/config/api-extractor.json b/packages/alfa-chai/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-chai/config/api-extractor.json +++ b/packages/alfa-chai/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-chai/package.json b/packages/alfa-chai/package.json index f8192dd8..c513ed8d 100644 --- a/packages/alfa-chai/package.json +++ b/packages/alfa-chai/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-chai" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-chai/src/tsconfig.json b/packages/alfa-chai/src/tsconfig.json new file mode 100644 index 00000000..47a3a453 --- /dev/null +++ b/packages/alfa-chai/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./chai.ts", "./index.ts"], + "references": [{ "path": "../../alfa-assert" }] +} diff --git a/packages/alfa-chai/tsconfig.json b/packages/alfa-chai/tsconfig.json index 0180ab9f..4da41a18 100644 --- a/packages/alfa-chai/tsconfig.json +++ b/packages/alfa-chai/tsconfig.json @@ -1,6 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/chai.ts", "src/index.ts"], - "references": [{ "path": "../alfa-assert" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-cheerio/config/api-extractor.json b/packages/alfa-cheerio/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-cheerio/config/api-extractor.json +++ b/packages/alfa-cheerio/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-cheerio/package.json b/packages/alfa-cheerio/package.json index 4c924ddc..965fbddd 100644 --- a/packages/alfa-cheerio/package.json +++ b/packages/alfa-cheerio/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-cheerio" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-device": "^0.85.1", diff --git a/packages/alfa-cheerio/src/tsconfig.json b/packages/alfa-cheerio/src/tsconfig.json new file mode 100644 index 00000000..715f9cda --- /dev/null +++ b/packages/alfa-cheerio/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./cheerio.ts", "./index.ts"] +} diff --git a/packages/alfa-cheerio/tsconfig.json b/packages/alfa-cheerio/tsconfig.json index 7606be76..4da41a18 100644 --- a/packages/alfa-cheerio/tsconfig.json +++ b/packages/alfa-cheerio/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/cheerio.ts", "src/index.ts"] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-command/config/api-extractor.json b/packages/alfa-command/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-command/config/api-extractor.json +++ b/packages/alfa-command/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-command/package.json b/packages/alfa-command/package.json index 4adbc943..11ffe964 100644 --- a/packages/alfa-command/package.json +++ b/packages/alfa-command/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-command" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-functor": "^0.85.1", diff --git a/packages/alfa-command/src/tsconfig.json b/packages/alfa-command/src/tsconfig.json new file mode 100644 index 00000000..ba490112 --- /dev/null +++ b/packages/alfa-command/src/tsconfig.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": [ + "./argument.ts", + "./command.ts", + "./flag.ts", + "./index.ts", + "./text.ts" + ] +} diff --git a/packages/alfa-command/test/flag.spec.ts b/packages/alfa-command/test/flag.spec.ts index 90506d41..f3eeab3f 100644 --- a/packages/alfa-command/test/flag.spec.ts +++ b/packages/alfa-command/test/flag.spec.ts @@ -1,6 +1,6 @@ import { test } from "@siteimprove/alfa-test"; -import { Flag } from "../src/flag"; +import { Flag } from "../dist/flag"; test(".default() constructs a flag with a default value", (t) => { const flag = Flag.string("foo", "").default("hello"); diff --git a/packages/alfa-command/test/text.spec.ts b/packages/alfa-command/test/text.spec.ts index 1f7e5a0a..1a98b7d0 100644 --- a/packages/alfa-command/test/text.spec.ts +++ b/packages/alfa-command/test/text.spec.ts @@ -1,6 +1,6 @@ import { test } from "@siteimprove/alfa-test"; -import { Text } from "../src/text"; +import { Text } from "../dist/text"; test(".indent() indents all lines of text", (t) => { const text = `hello world\nhow are you?`; diff --git a/packages/alfa-command/test/tsconfig.json b/packages/alfa-command/test/tsconfig.json new file mode 100644 index 00000000..15546020 --- /dev/null +++ b/packages/alfa-command/test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "." }, + "files": ["./flag.spec.ts", "./text.spec.ts"], + "references": [{ "path": "../src" }] +} diff --git a/packages/alfa-command/tsconfig.json b/packages/alfa-command/tsconfig.json index 0d9a03f5..398e0fba 100644 --- a/packages/alfa-command/tsconfig.json +++ b/packages/alfa-command/tsconfig.json @@ -1,13 +1,6 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": [ - "src/argument.ts", - "src/command.ts", - "src/flag.ts", - "src/index.ts", - "src/text.ts", - "test/flag.spec.ts", - "test/text.spec.ts" - ] + "files": [], + "references": [{ "path": "./src" }, { "path": "./test" }] } diff --git a/packages/alfa-crawler/config/api-extractor.json b/packages/alfa-crawler/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-crawler/config/api-extractor.json +++ b/packages/alfa-crawler/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-crawler/package.json b/packages/alfa-crawler/package.json index 523c41c0..575f8ef4 100644 --- a/packages/alfa-crawler/package.json +++ b/packages/alfa-crawler/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-crawler" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-dom": "^0.85.1", diff --git a/packages/alfa-crawler/src/tsconfig.json b/packages/alfa-crawler/src/tsconfig.json new file mode 100644 index 00000000..a2e2f999 --- /dev/null +++ b/packages/alfa-crawler/src/tsconfig.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./crawler.ts", "./index.ts"], + "references": [ + { "path": "../../alfa-frontier" }, + { "path": "../../alfa-scraper" } + ] +} diff --git a/packages/alfa-crawler/test/crawler.spec.ts b/packages/alfa-crawler/test/crawler.spec.ts index dbfe743a..3f690b59 100644 --- a/packages/alfa-crawler/test/crawler.spec.ts +++ b/packages/alfa-crawler/test/crawler.spec.ts @@ -4,7 +4,7 @@ import { test } from "@siteimprove/alfa-test"; import { Frontier } from "@siteimprove/alfa-frontier"; -import { Crawler } from "../src/crawler"; +import { Crawler } from "../dist/crawler"; const fixture = `${url.pathToFileURL(__dirname).href}/fixture`; diff --git a/packages/alfa-crawler/test/tsconfig.json b/packages/alfa-crawler/test/tsconfig.json new file mode 100644 index 00000000..9120f7c4 --- /dev/null +++ b/packages/alfa-crawler/test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "." }, + "files": ["./crawler.spec.ts"], + "references": [{ "path": "../src" }] +} diff --git a/packages/alfa-crawler/tsconfig.json b/packages/alfa-crawler/tsconfig.json index e4b785b2..398e0fba 100644 --- a/packages/alfa-crawler/tsconfig.json +++ b/packages/alfa-crawler/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/crawler.ts", "src/index.ts", "test/crawler.spec.ts"], - "references": [{ "path": "../alfa-frontier" }, { "path": "../alfa-scraper" }] + "files": [], + "references": [{ "path": "./src" }, { "path": "./test" }] } diff --git a/packages/alfa-cypress/config/api-extractor.json b/packages/alfa-cypress/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-cypress/config/api-extractor.json +++ b/packages/alfa-cypress/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-cypress/package.json b/packages/alfa-cypress/package.json index 29c08a12..cb510eea 100644 --- a/packages/alfa-cypress/package.json +++ b/packages/alfa-cypress/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-cypress" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-cypress/src/tsconfig.json b/packages/alfa-cypress/src/tsconfig.json new file mode 100644 index 00000000..57ca7ef4 --- /dev/null +++ b/packages/alfa-cypress/src/tsconfig.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./cypress.ts", "./index.ts"], + "references": [ + { "path": "../../alfa-assert" }, + { "path": "../../alfa-formatter" }, + { "path": "../../alfa-formatter-earl" } + ] +} diff --git a/packages/alfa-cypress/tsconfig.json b/packages/alfa-cypress/tsconfig.json index 1a4d4656..4da41a18 100644 --- a/packages/alfa-cypress/tsconfig.json +++ b/packages/alfa-cypress/tsconfig.json @@ -1,10 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/cypress.ts", "src/index.ts"], - "references": [ - { "path": "../alfa-assert" }, - { "path": "../alfa-formatter" }, - { "path": "../alfa-formatter-earl" } - ] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-enzyme/config/api-extractor.json b/packages/alfa-enzyme/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-enzyme/config/api-extractor.json +++ b/packages/alfa-enzyme/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-enzyme/package.json b/packages/alfa-enzyme/package.json index cf82a49c..8223839b 100644 --- a/packages/alfa-enzyme/package.json +++ b/packages/alfa-enzyme/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-enzyme" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-react": "workspace:^", diff --git a/packages/alfa-enzyme/src/tsconfig.json b/packages/alfa-enzyme/src/tsconfig.json new file mode 100644 index 00000000..add15f8e --- /dev/null +++ b/packages/alfa-enzyme/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./enzyme.ts", "./index.ts"], + "references": [{ "path": "../../alfa-react" }] +} diff --git a/packages/alfa-enzyme/tsconfig.json b/packages/alfa-enzyme/tsconfig.json index ef17946d..4da41a18 100644 --- a/packages/alfa-enzyme/tsconfig.json +++ b/packages/alfa-enzyme/tsconfig.json @@ -1,6 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/enzyme.ts", "src/index.ts"], - "references": [{ "path": "../alfa-react" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-formatter-earl/config/api-extractor.json b/packages/alfa-formatter-earl/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-formatter-earl/config/api-extractor.json +++ b/packages/alfa-formatter-earl/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-formatter-earl/package.json b/packages/alfa-formatter-earl/package.json index e2e72be8..886ca023 100644 --- a/packages/alfa-formatter-earl/package.json +++ b/packages/alfa-formatter-earl/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-formatter-earl" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-formatter-earl/src/tsconfig.json b/packages/alfa-formatter-earl/src/tsconfig.json new file mode 100644 index 00000000..b0a012ee --- /dev/null +++ b/packages/alfa-formatter-earl/src/tsconfig.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { + "resolveJsonModule": true, + "outDir": "../dist" + }, + "files": ["./index.ts", "./earl.ts"], + "references": [{ "path": "../../alfa-formatter" }] +} diff --git a/packages/alfa-formatter-earl/tsconfig.json b/packages/alfa-formatter-earl/tsconfig.json index 4fc59611..4da41a18 100644 --- a/packages/alfa-formatter-earl/tsconfig.json +++ b/packages/alfa-formatter-earl/tsconfig.json @@ -1,11 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "compilerOptions": { - "resolveJsonModule": true - }, - "files": ["package.json", "src/index.ts", "src/earl.ts"], - "references": [ - { "path": "../alfa-formatter" } - ] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-formatter-json/config/api-extractor.json b/packages/alfa-formatter-json/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-formatter-json/config/api-extractor.json +++ b/packages/alfa-formatter-json/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-formatter-json/package.json b/packages/alfa-formatter-json/package.json index 468a551e..4208f4cb 100644 --- a/packages/alfa-formatter-json/package.json +++ b/packages/alfa-formatter-json/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-formatter-json" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-formatter-json/src/tsconfig.json b/packages/alfa-formatter-json/src/tsconfig.json new file mode 100644 index 00000000..3cc0dce6 --- /dev/null +++ b/packages/alfa-formatter-json/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./json.ts"], + "references": [{ "path": "../../alfa-formatter" }] +} diff --git a/packages/alfa-formatter-json/tsconfig.json b/packages/alfa-formatter-json/tsconfig.json index 806c98b2..4da41a18 100644 --- a/packages/alfa-formatter-json/tsconfig.json +++ b/packages/alfa-formatter-json/tsconfig.json @@ -1,6 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/index.ts", "src/json.ts"], - "references": [{ "path": "../alfa-formatter" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-formatter-sarif/config/api-extractor.json b/packages/alfa-formatter-sarif/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-formatter-sarif/config/api-extractor.json +++ b/packages/alfa-formatter-sarif/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-formatter-sarif/package.json b/packages/alfa-formatter-sarif/package.json index 4484de6f..f1b4b1ca 100644 --- a/packages/alfa-formatter-sarif/package.json +++ b/packages/alfa-formatter-sarif/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-formatter-sarif" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-formatter-sarif/src/tsconfig.json b/packages/alfa-formatter-sarif/src/tsconfig.json new file mode 100644 index 00000000..d0983c18 --- /dev/null +++ b/packages/alfa-formatter-sarif/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "resolveJsonModule": true, "outDir": "../dist" }, + "files": ["./index.ts", "./sarif.ts"], + "references": [{ "path": "../../alfa-formatter" }] +} diff --git a/packages/alfa-formatter-sarif/tsconfig.json b/packages/alfa-formatter-sarif/tsconfig.json index e728edd3..4da41a18 100644 --- a/packages/alfa-formatter-sarif/tsconfig.json +++ b/packages/alfa-formatter-sarif/tsconfig.json @@ -1,7 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "compilerOptions": { "resolveJsonModule": true }, - "files": ["package.json", "src/index.ts", "src/sarif.ts"], - "references": [{ "path": "../alfa-formatter" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-formatter/config/api-extractor.json b/packages/alfa-formatter/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-formatter/config/api-extractor.json +++ b/packages/alfa-formatter/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-formatter/package.json b/packages/alfa-formatter/package.json index 5bdd1e0f..02c1994b 100644 --- a/packages/alfa-formatter/package.json +++ b/packages/alfa-formatter/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-formatter" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-formatter/src/tsconfig.json b/packages/alfa-formatter/src/tsconfig.json new file mode 100644 index 00000000..a8d5c247 --- /dev/null +++ b/packages/alfa-formatter/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./formatter.ts", "./index.ts"] +} diff --git a/packages/alfa-formatter/tsconfig.json b/packages/alfa-formatter/tsconfig.json index ddbd471d..4da41a18 100644 --- a/packages/alfa-formatter/tsconfig.json +++ b/packages/alfa-formatter/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/formatter.ts", "src/index.ts"] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-frontier/config/api-extractor.json b/packages/alfa-frontier/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-frontier/config/api-extractor.json +++ b/packages/alfa-frontier/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-frontier/package.json b/packages/alfa-frontier/package.json index 71d874d3..0f03fea8 100644 --- a/packages/alfa-frontier/package.json +++ b/packages/alfa-frontier/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-frontier" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-equatable": "^0.85.1", diff --git a/packages/alfa-frontier/src/tsconfig.json b/packages/alfa-frontier/src/tsconfig.json new file mode 100644 index 00000000..f2a02b1c --- /dev/null +++ b/packages/alfa-frontier/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./frontier.ts", "./index.ts"] +} diff --git a/packages/alfa-frontier/test/frontier.spec.ts b/packages/alfa-frontier/test/frontier.spec.ts index 7a225757..e7dae283 100644 --- a/packages/alfa-frontier/test/frontier.spec.ts +++ b/packages/alfa-frontier/test/frontier.spec.ts @@ -1,6 +1,6 @@ import { test } from "@siteimprove/alfa-test"; -import { Frontier } from "../src/frontier"; +import { Frontier } from "../dist/frontier"; test(".of() constructs a frontier given a scope", (t) => { const frontier = Frontier.of("https://example.com/"); diff --git a/packages/alfa-frontier/test/tsconfig.json b/packages/alfa-frontier/test/tsconfig.json new file mode 100644 index 00000000..e4529288 --- /dev/null +++ b/packages/alfa-frontier/test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "." }, + "files": ["./frontier.spec.ts"], + "references": [{ "path": "../src" }] +} diff --git a/packages/alfa-frontier/tsconfig.json b/packages/alfa-frontier/tsconfig.json index e3684bfa..398e0fba 100644 --- a/packages/alfa-frontier/tsconfig.json +++ b/packages/alfa-frontier/tsconfig.json @@ -1,5 +1,6 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/frontier.ts", "src/index.ts", "test/frontier.spec.ts"] + "files": [], + "references": [{ "path": "./src" }, { "path": "./test" }] } diff --git a/packages/alfa-interviewer/config/api-extractor.json b/packages/alfa-interviewer/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-interviewer/config/api-extractor.json +++ b/packages/alfa-interviewer/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-interviewer/package.json b/packages/alfa-interviewer/package.json index 4eba7fe1..d3c7c5c3 100644 --- a/packages/alfa-interviewer/package.json +++ b/packages/alfa-interviewer/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-interviewer" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-interviewer/src/tsconfig.json b/packages/alfa-interviewer/src/tsconfig.json new file mode 100644 index 00000000..514c66b0 --- /dev/null +++ b/packages/alfa-interviewer/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./interviewer.ts"] +} diff --git a/packages/alfa-interviewer/tsconfig.json b/packages/alfa-interviewer/tsconfig.json index 219919a4..4da41a18 100644 --- a/packages/alfa-interviewer/tsconfig.json +++ b/packages/alfa-interviewer/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/index.ts", "src/interviewer.ts"] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-jasmine/config/api-extractor.json b/packages/alfa-jasmine/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-jasmine/config/api-extractor.json +++ b/packages/alfa-jasmine/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-jasmine/package.json b/packages/alfa-jasmine/package.json index e42b862d..bfca269a 100644 --- a/packages/alfa-jasmine/package.json +++ b/packages/alfa-jasmine/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-jasmine" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-jasmine/src/tsconfig.json b/packages/alfa-jasmine/src/tsconfig.json new file mode 100644 index 00000000..3a13e8e2 --- /dev/null +++ b/packages/alfa-jasmine/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./jasmine.ts", "./jasmine/add-async-matcher.ts"], + "references": [{ "path": "../../alfa-assert" }] +} diff --git a/packages/alfa-jasmine/tsconfig.json b/packages/alfa-jasmine/tsconfig.json index ae7d4a4e..4da41a18 100644 --- a/packages/alfa-jasmine/tsconfig.json +++ b/packages/alfa-jasmine/tsconfig.json @@ -1,10 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": [ - "src/index.ts", - "src/jasmine.ts", - "src/jasmine/add-async-matcher.ts" - ], - "references": [{ "path": "../alfa-assert" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-jest/config/api-extractor.json b/packages/alfa-jest/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-jest/config/api-extractor.json +++ b/packages/alfa-jest/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-jest/package.json b/packages/alfa-jest/package.json index 587bcc35..0e6b568f 100644 --- a/packages/alfa-jest/package.json +++ b/packages/alfa-jest/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-jest" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-act": "^0.85.1", diff --git a/packages/alfa-jest/src/tsconfig.json b/packages/alfa-jest/src/tsconfig.json new file mode 100644 index 00000000..1bd788d4 --- /dev/null +++ b/packages/alfa-jest/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./jest.ts"], + "references": [{ "path": "../../alfa-assert" }] +} diff --git a/packages/alfa-jest/tsconfig.json b/packages/alfa-jest/tsconfig.json index b4345265..4da41a18 100644 --- a/packages/alfa-jest/tsconfig.json +++ b/packages/alfa-jest/tsconfig.json @@ -1,6 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/index.ts", "src/jest.ts"], - "references": [{ "path": "../alfa-assert" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-jquery/config/api-extractor.json b/packages/alfa-jquery/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-jquery/config/api-extractor.json +++ b/packages/alfa-jquery/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-jquery/package.json b/packages/alfa-jquery/package.json index 22297e31..8c9d096d 100644 --- a/packages/alfa-jquery/package.json +++ b/packages/alfa-jquery/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-jquery" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-device": "^0.85.1", diff --git a/packages/alfa-jquery/src/tsconfig.json b/packages/alfa-jquery/src/tsconfig.json new file mode 100644 index 00000000..a392ca47 --- /dev/null +++ b/packages/alfa-jquery/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./jquery.ts"] +} diff --git a/packages/alfa-jquery/tsconfig.json b/packages/alfa-jquery/tsconfig.json index 21ade4d8..4da41a18 100644 --- a/packages/alfa-jquery/tsconfig.json +++ b/packages/alfa-jquery/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/index.ts", "src/jquery.ts"] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-playwright/config/api-extractor.json b/packages/alfa-playwright/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-playwright/config/api-extractor.json +++ b/packages/alfa-playwright/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-playwright/package.json b/packages/alfa-playwright/package.json index 7fadabcf..598527d1 100644 --- a/packages/alfa-playwright/package.json +++ b/packages/alfa-playwright/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-playwright" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-device": "^0.85.1", diff --git a/packages/alfa-playwright/src/tsconfig.json b/packages/alfa-playwright/src/tsconfig.json new file mode 100644 index 00000000..681ca3c3 --- /dev/null +++ b/packages/alfa-playwright/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "types": ["node"], "outDir": "../dist" }, + "files": ["./index.ts", "./playwright.ts"] +} diff --git a/packages/alfa-playwright/tsconfig.json b/packages/alfa-playwright/tsconfig.json index bbf166cb..4da41a18 100644 --- a/packages/alfa-playwright/tsconfig.json +++ b/packages/alfa-playwright/tsconfig.json @@ -1,6 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/index.ts", "src/playwright.ts"], - "compilerOptions": { "types": ["node"] } + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-puppeteer/config/api-extractor.json b/packages/alfa-puppeteer/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-puppeteer/config/api-extractor.json +++ b/packages/alfa-puppeteer/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-puppeteer/package.json b/packages/alfa-puppeteer/package.json index f9c64395..1504094c 100644 --- a/packages/alfa-puppeteer/package.json +++ b/packages/alfa-puppeteer/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-puppeteer" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-device": "^0.85.1", diff --git a/packages/alfa-puppeteer/src/tsconfig.json b/packages/alfa-puppeteer/src/tsconfig.json new file mode 100644 index 00000000..8447c7fc --- /dev/null +++ b/packages/alfa-puppeteer/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./puppeteer.ts"] +} diff --git a/packages/alfa-puppeteer/tsconfig.json b/packages/alfa-puppeteer/tsconfig.json index 9789ba88..4da41a18 100644 --- a/packages/alfa-puppeteer/tsconfig.json +++ b/packages/alfa-puppeteer/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/index.ts", "src/puppeteer.ts"] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-react/config/api-extractor.json b/packages/alfa-react/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-react/config/api-extractor.json +++ b/packages/alfa-react/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-react/package.json b/packages/alfa-react/package.json index 8cf90126..a5e4b527 100644 --- a/packages/alfa-react/package.json +++ b/packages/alfa-react/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-react" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-device": "^0.85.1", diff --git a/packages/alfa-react/src/tsconfig.json b/packages/alfa-react/src/tsconfig.json new file mode 100644 index 00000000..6ca49fe1 --- /dev/null +++ b/packages/alfa-react/src/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./react.ts"] +} diff --git a/packages/alfa-react/test/react.spec.tsx b/packages/alfa-react/test/react.spec.tsx index c60137e9..c7918402 100644 --- a/packages/alfa-react/test/react.spec.tsx +++ b/packages/alfa-react/test/react.spec.tsx @@ -5,7 +5,7 @@ import { h } from "@siteimprove/alfa-dom"; import { Request, Response } from "@siteimprove/alfa-http"; import { Page } from "@siteimprove/alfa-web"; -import { React } from "../src"; +import { React } from "../dist"; import { FunctionComponent } from "react"; diff --git a/packages/alfa-react/test/tsconfig.json b/packages/alfa-react/test/tsconfig.json new file mode 100644 index 00000000..6e6f23a0 --- /dev/null +++ b/packages/alfa-react/test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "jsx": "react-jsx", "outDir": "." }, + "files": ["./react.spec.tsx"], + "references": [{ "path": "../src" }] +} diff --git a/packages/alfa-react/tsconfig.json b/packages/alfa-react/tsconfig.json index 8c41f54c..398e0fba 100644 --- a/packages/alfa-react/tsconfig.json +++ b/packages/alfa-react/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "compilerOptions": { "jsx": "react-jsx" }, - "files": ["src/index.ts", "src/react.ts", "test/react.spec.tsx"] + "files": [], + "references": [{ "path": "./src" }, { "path": "./test" }] } diff --git a/packages/alfa-scraper/config/api-extractor.json b/packages/alfa-scraper/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-scraper/config/api-extractor.json +++ b/packages/alfa-scraper/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-scraper/package.json b/packages/alfa-scraper/package.json index f7cb2c7c..0f454139 100644 --- a/packages/alfa-scraper/package.json +++ b/packages/alfa-scraper/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-scraper" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-array": "^0.85.1", diff --git a/packages/alfa-scraper/src/tsconfig.json b/packages/alfa-scraper/src/tsconfig.json new file mode 100644 index 00000000..8749e37d --- /dev/null +++ b/packages/alfa-scraper/src/tsconfig.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": [ + "./archive.ts", + "./awaiter.ts", + "./credentials.ts", + "./index.ts", + "./scraper.ts", + "./screenshot.ts" + ], + "references": [{ "path": "../../alfa-puppeteer" }] +} diff --git a/packages/alfa-scraper/test/scraper.spec.ts b/packages/alfa-scraper/test/scraper.spec.ts index f4395482..3c5219cb 100644 --- a/packages/alfa-scraper/test/scraper.spec.ts +++ b/packages/alfa-scraper/test/scraper.spec.ts @@ -2,9 +2,9 @@ import { Node, Query } from "@siteimprove/alfa-dom"; import { test } from "@siteimprove/alfa-test"; import * as path from "path"; import * as url from "url"; -import { Awaiter } from "../src"; +import { Awaiter } from "../dist"; -import { Scraper } from "../src/scraper"; +import { Scraper } from "../dist/scraper"; const { getElementDescendants } = Query; diff --git a/packages/alfa-scraper/test/tsconfig.json b/packages/alfa-scraper/test/tsconfig.json new file mode 100644 index 00000000..5a164fc0 --- /dev/null +++ b/packages/alfa-scraper/test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "." }, + "files": ["./scraper.spec.ts"], + "references": [{ "path": "../src" }] +} diff --git a/packages/alfa-scraper/tsconfig.json b/packages/alfa-scraper/tsconfig.json index 5b6fcd6a..398e0fba 100644 --- a/packages/alfa-scraper/tsconfig.json +++ b/packages/alfa-scraper/tsconfig.json @@ -1,14 +1,6 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": [ - "src/archive.ts", - "src/awaiter.ts", - "src/credentials.ts", - "src/index.ts", - "src/scraper.ts", - "src/screenshot.ts", - "test/scraper.spec.ts" - ], - "references": [{ "path": "../alfa-puppeteer" }] + "files": [], + "references": [{ "path": "./src" }, { "path": "./test" }] } diff --git a/packages/alfa-unexpected/config/api-extractor.json b/packages/alfa-unexpected/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-unexpected/config/api-extractor.json +++ b/packages/alfa-unexpected/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-unexpected/src/tsconfig.json b/packages/alfa-unexpected/src/tsconfig.json new file mode 100644 index 00000000..e6fe57bc --- /dev/null +++ b/packages/alfa-unexpected/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": ["./index.ts", "./unexpected.ts"], + "references": [{ "path": "../../alfa-assert" }] +} diff --git a/packages/alfa-unexpected/tsconfig.json b/packages/alfa-unexpected/tsconfig.json index f91b9d60..4da41a18 100644 --- a/packages/alfa-unexpected/tsconfig.json +++ b/packages/alfa-unexpected/tsconfig.json @@ -1,6 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "files": ["src/index.ts", "src/unexpected.ts"], - "references": [{ "path": "../alfa-assert" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-vue/config/api-extractor.json b/packages/alfa-vue/config/api-extractor.json index 5956ed88..7c547d46 100644 --- a/packages/alfa-vue/config/api-extractor.json +++ b/packages/alfa-vue/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "../../../config/api-extractor.json", - "mainEntryPointFilePath": "/src/index.d.ts" + "mainEntryPointFilePath": "/dist/index.d.ts" } diff --git a/packages/alfa-vue/package.json b/packages/alfa-vue/package.json index 67d3d0da..5d800781 100644 --- a/packages/alfa-vue/package.json +++ b/packages/alfa-vue/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-vue" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-cheerio": "workspace:^", diff --git a/packages/alfa-vue/src/tsconfig.json b/packages/alfa-vue/src/tsconfig.json new file mode 100644 index 00000000..e374690e --- /dev/null +++ b/packages/alfa-vue/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "esModuleInterop": true, "outDir": "../dist" }, + "files": ["./index.ts", "./vue.ts"], + "references": [{ "path": "../../alfa-cheerio" }] +} diff --git a/packages/alfa-vue/test/tsconfig.json b/packages/alfa-vue/test/tsconfig.json new file mode 100644 index 00000000..92c32496 --- /dev/null +++ b/packages/alfa-vue/test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "esModuleInterop": true, "outDir": "." }, + "files": ["./vue.spec.ts"], + "references": [{ "path": "../src" }] +} diff --git a/packages/alfa-vue/test/vue.spec.ts b/packages/alfa-vue/test/vue.spec.ts index 9d0f9820..a4941d86 100644 --- a/packages/alfa-vue/test/vue.spec.ts +++ b/packages/alfa-vue/test/vue.spec.ts @@ -11,7 +11,7 @@ import { Page } from "@siteimprove/alfa-web"; import V from "vue"; import { mount } from "@vue/test-utils"; -import { Vue } from "../src"; +import { Vue } from "../dist"; export const Button = V.extend({ template: ` diff --git a/packages/alfa-vue/tsconfig.json b/packages/alfa-vue/tsconfig.json index 76b0d221..47c59102 100644 --- a/packages/alfa-vue/tsconfig.json +++ b/packages/alfa-vue/tsconfig.json @@ -1,7 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "compilerOptions": { "esModuleInterop": true }, - "files": ["src/index.ts", "src/vue.ts", "test/vue.spec.ts"], - "references": [{ "path": "../alfa-cheerio" }] + "references": [{ "path": "./src" }, { "path": "./test" }] } diff --git a/packages/alfa-webdriver/package.json b/packages/alfa-webdriver/package.json index 8f28a2f5..3985d5be 100644 --- a/packages/alfa-webdriver/package.json +++ b/packages/alfa-webdriver/package.json @@ -11,11 +11,11 @@ "directory": "packages/alfa-webdriver" }, "bugs": "https://github.com/siteimprove/alfa/issues", - "main": "src/index.js", - "types": "src/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ - "src/**/*.js", - "src/**/*.d.ts" + "dist/**/*.js", + "dist/**/*.d.ts" ], "dependencies": { "@siteimprove/alfa-device": "^0.85.1", diff --git a/packages/alfa-webdriver/src/tsconfig.json b/packages/alfa-webdriver/src/tsconfig.json new file mode 100644 index 00000000..c28ac12d --- /dev/null +++ b/packages/alfa-webdriver/src/tsconfig.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { + "lib": ["DOM"], + "esModuleInterop": true, + "outDir": "../dist" + }, + "files": ["./index.ts", "./web-element.ts"] +} diff --git a/packages/alfa-webdriver/tsconfig.json b/packages/alfa-webdriver/tsconfig.json index 61f8fb6f..4da41a18 100644 --- a/packages/alfa-webdriver/tsconfig.json +++ b/packages/alfa-webdriver/tsconfig.json @@ -1,9 +1,5 @@ { "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", - "compilerOptions": { - "lib": ["DOM"], - "esModuleInterop": true - }, - "files": ["src/index.ts", "src/web-element.ts"] + "references": [{ "path": "./src" }] } diff --git a/scripts/api-extractor.mjs b/scripts/api-extractor.mjs index 34890127..b64b1843 100644 --- a/scripts/api-extractor.mjs +++ b/scripts/api-extractor.mjs @@ -18,7 +18,8 @@ function extract(root = "packages") { const projects = system .readDirectory(root, ["tsconfig.json"], ["node_modules"]) .map(path.dirname) - .filter((x) => !exclude.includes(x)); + .filter((x) => !exclude.includes(x)) + .filter((x) => !x.endsWith("src") && !x.endsWith("test")); let code = 0; diff --git a/scripts/common/reporter.mjs b/scripts/common/reporter.mjs index 219acc36..4f9c127e 100644 --- a/scripts/common/reporter.mjs +++ b/scripts/common/reporter.mjs @@ -43,10 +43,19 @@ function minimalStatusReporter(system, _) { const frame = frames[frameIndex % frames.length]; const packageName = !first - ? diag.messageText.match(/.*(?:\/|')(.*)\/tsconfig\.json/)?.[1] ?? "" + ? diag.messageText + // Find tsconfig.json path in "Building 'path/to/alfa-integrations/packages/alfa-foo/tsconfig.json'..." + .split("'")[1] + // Find path segments + ?.split("/") + // Find package name + ?.find((name) => name.startsWith("alfa-") && name !== "alfa-integrations") ?? + // If none (e.g., scratches), output directory of tsconfig.json + diag.messageText.match(/.*(?:\/|')(.*)\/tsconfig\.json/)?.[1] ?? + "" : ""; - system.write(frame + ` building ${packageName}`); + system.write(frame + ` building ${packageName}...`); system.write(system.newLine); frameIndex++; first = false; diff --git a/tsconfig.json b/tsconfig.json index 1079c6cd..a1c0ecc4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "sourceMap": true, "strict": true, "target": "es2020", - "types": [] + "types": ["node"] }, "files": [], "references": [