Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ api-extractor/**/*
dist/**/*
docs/**/*
temp/**/*
types/**/*
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cSpell.words": [
"destructure",
"heaslip",
"nodenext",
"Perso",
"rushstack",
"tsdoc",
Expand Down Expand Up @@ -42,8 +43,8 @@
"api-extractor/**/*": true,
"CHANGELOG": true,
"docs/**/*": true,
"LICENSE": true,
"types/**/*": true
"package-lock.json": true,
"LICENSE": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ npm run dev
If you add a new function or making a change to the arguments of an existing function (without this TypeScript won’t be aware of the changes, and the `build-lint-test` script will fail):

```sh
# Update api-extractor/* (metadata about code generated by api-extractor), docs/* (Markdown documentation generated by api-documenter using api-extractor metadata) and types/js-utils.d.ts (types generated by api-extractor)
# Update api-extractor/* (metadata about code generated by api-extractor) and docs/* (Markdown documentation generated by api-documenter using api-extractor metadata)
npm run api-extractor-update
```

Expand Down
19 changes: 1 addition & 18 deletions api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"reportFolder": "<projectFolder>/api-extractor"
},
"compiler": {
"tsconfigFilePath": "tsconfig.json"
"tsconfigFilePath": "tsconfig-dist.json"
},
"docModel": {
"enabled": true,
Expand All @@ -18,23 +18,6 @@
"dtsRollup": {
"enabled": false
},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
}
}
},
"tsdocMetadata": {
"enabled": false
}
Expand Down
24 changes: 12 additions & 12 deletions api-extractor/js-utils.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
"text": "T"
}
],
"fileUrlPath": "src/asType.ts",
"fileUrlPath": "dist/asType.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down Expand Up @@ -248,7 +248,7 @@
"text": "string"
}
],
"fileUrlPath": "src/cleanUrlQueryString.ts",
"fileUrlPath": "dist/cleanUrlQueryString.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down Expand Up @@ -316,7 +316,7 @@
"text": "`/${string}`"
}
],
"fileUrlPath": "src/constructUrl.ts",
"fileUrlPath": "dist/constructUrl.d.ts",
"returnTypeTokenRange": {
"startIndex": 9,
"endIndex": 10
Expand Down Expand Up @@ -357,7 +357,7 @@
"text": "string"
}
],
"fileUrlPath": "src/getAbsoluteUrl.ts",
"fileUrlPath": "dist/getAbsoluteUrl.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down Expand Up @@ -403,7 +403,7 @@
"text": "string | undefined"
}
],
"fileUrlPath": "src/getFirstStringOrString.ts",
"fileUrlPath": "dist/getFirstStringOrString.d.ts",
"returnTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
Expand Down Expand Up @@ -498,7 +498,7 @@
"text": "NormalizedQueryType"
}
],
"fileUrlPath": "src/getNormalizedQuery.ts",
"fileUrlPath": "dist/getNormalizedQuery.d.ts",
"returnTypeTokenRange": {
"startIndex": 15,
"endIndex": 16
Expand Down Expand Up @@ -566,7 +566,7 @@
"text": "<Leaf>"
}
],
"fileUrlPath": "src/getObjectValueByDotSeparatedKey.ts",
"fileUrlPath": "dist/getObjectValueByDotSeparatedKey.d.ts",
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 7
Expand Down Expand Up @@ -620,7 +620,7 @@
"text": "string"
}
],
"fileUrlPath": "src/getRootRelativeUrl.ts",
"fileUrlPath": "dist/getRootRelativeUrl.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down Expand Up @@ -661,7 +661,7 @@
"text": "boolean"
}
],
"fileUrlPath": "src/isNullOrWhitespace.ts",
"fileUrlPath": "dist/isNullOrWhitespace.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down Expand Up @@ -702,7 +702,7 @@
"text": "string"
}
],
"fileUrlPath": "src/replaceArabicNumeralsWithPersianNumerals.ts",
"fileUrlPath": "dist/replaceArabicNumeralsWithPersianNumerals.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down Expand Up @@ -743,7 +743,7 @@
"text": "void"
}
],
"fileUrlPath": "src/serverLog.ts",
"fileUrlPath": "dist/serverLog.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down Expand Up @@ -784,7 +784,7 @@
"text": "string"
}
],
"fileUrlPath": "src/underscoreCaseToCamelCase.ts",
"fileUrlPath": "dist/underscoreCaseToCamelCase.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
Expand Down
9 changes: 4 additions & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
// We should be able to remove the @ts-expect-error and eslint-disable-next-line
// once we fix the typing of @asl-19/eslint-config

// @ts-expect-error (TODO: why is this happening?)
import asl19 from "@asl-19/eslint-config";
import { defineConfig } from "eslint/config";

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const typedAsl19 =
/** @type {import("@asl-19/eslint-config/types/index")["default"]} */ (asl19);
const typedAsl19 = /** @type {import("@asl-19/eslint-config")["default"]} */ (
asl19
);

const eslintConfig = defineConfig([
{
ignores: ["dist/", "types/", ".yalc/"],
ignores: ["dist/", ".yalc/"],
},
{
extends: [
Expand Down
8 changes: 0 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,27 @@
"api-extractor-check": "api-extractor run --verbose",
"api-extractor-update": "api-extractor run --local --verbose && api-documenter markdown --input-folder ./api-extractor --output-folder ./docs",
"build-lint-test": "npm-run-all -l -p tsc -s lint-test",
"rm-dist": "rm -rf dist",
"rm-dist": "rm -rf dist/*",
"dev": "npm-run-all -l -s package-changed -p tsc-watch",
"dev-build-update": "npm-run-all -l -p package-changed rm-dist -s tsc api-extractor-update",
"dev-lint-test": "run-s package-changed lint-test",
"eslint-check": "eslint . --ext='js,ts,tsx'",
"eslint-fix": "eslint . --ext='js,ts,tsx' --fix",
"lint-test": "run-p -l api-extractor-check eslint-check prettier-check tsc-check",
"package-changed": "package-changed",
"prepublishOnly": "run-s rm-dist build-lint-test",
"prettier-check": "prettier --config prettier.config.js --check .",
"prettier-fix": "prettier --config prettier.config.js --write .",
"prettier-check": "prettier --check .",
"prettier-fix": "prettier --write .",
"npm-check-updates": "npm-check-updates",
"tsc": "tsc --project tsconfig-esm.json",
"tsc-watch": "tsc --project tsconfig-esm.json --watch",
"tsc-check": "tsc --noEmit"
"tsc": "tsc --project tsconfig-dist.json",
"tsc-watch": "tsc --project tsconfig-dist.json --watch",
"tsc-check": "tsc --project tsconfig-dist.json --noEmit"
},
"dependencies": {
"ts-pattern": "^5.7.1"
},
"devDependencies": {
"@asl-19/eslint-config": "^0.9.0",
"@asl-19/shared-package-configs": "^0.3.0",
"@microsoft/api-documenter": "^7.26.29",
"@microsoft/api-extractor": "^7.52.8",
"@types/node": "^22.16.4",
Expand Down
1 change: 1 addition & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @type {import("prettier").Config} */
const prettierConfig = {
overrides: [
{
Expand Down
6 changes: 6 additions & 0 deletions tsconfig-dist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"include": [
"src/**/*.ts*"
]
}
9 changes: 0 additions & 9 deletions tsconfig-esm.json

This file was deleted.

10 changes: 8 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"extends": "@asl-19/shared-package-configs/tsconfig-base.json",
"compilerOptions": {
"outDir": "dist"
"allowJs": true,
"checkJs": true,
"declaration": true,
"incremental": true,
"module": "preserve",
"outDir": "dist",
"strict": true,
"target": "es2021"
},
"include": [
"*.mjs",
Expand Down