fix: add module type to packages + fix running the packages tests

This commit is contained in:
Amin Yahyaabadi 2024-08-23 15:33:10 -07:00
parent f2d212e7ec
commit 0660ca7619
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
16 changed files with 27 additions and 12 deletions

View File

@ -8,6 +8,7 @@
"dev/cpp_vcpkg_project/**/*",
"**/.venv/",
"**/.*cache/",
"coverage/",
"**/coverage/"
],
"ignoreUnknown": true

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,7 @@
import type { Config } from "jest"
const jestConfig: Config = {
/**
* @type {import('jest').Config}
*/
const jestConfig = {
testMatch: ["**/*.test.ts"],
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"],

View File

@ -32,7 +32,7 @@
"build.babel": "babel ./dist --out-dir dist --plugins @upleveled/babel-plugin-remove-node-prefix --plugins @babel/plugin-transform-private-methods --compact --no-babelrc --source-maps true",
"build.modern": "shx cp -r ./dist/actions/* ./dist/modern",
"bump": "ncu -u -x numerous,execa,prettier,@types/node,eslint,@types/eslint && pnpm update && pnpx typesync && pnpm run clean",
"clean": "shx rm -rf ./dist ./exe ./.parcel-cache && shx mkdir -p ./dist/legacy ./dist/actions ./dist/modern ",
"clean": "shx rm -rf ./dist ./packages/*/dist ./exe ./.parcel-cache && shx mkdir -p ./dist/legacy ./dist/actions ./dist/modern ",
"copy.matchers": "run-p copy.matchers.legacy copy.matchers.actions",
"copy.matchers.legacy": "shx cp ./src/gcc/gcc_matcher.json ./dist/legacy/ && shx cp ./src/msvc/msvc_matcher.json ./dist/legacy/ && shx cp ./src/python/python_matcher.json ./dist/legacy/ && shx cp ./src/llvm/llvm_matcher.json ./dist/legacy/",
"copy.matchers.actions": "shx cp ./src/gcc/gcc_matcher.json ./dist/actions/ && shx cp ./src/msvc/msvc_matcher.json ./dist/actions/ && shx cp ./src/python/python_matcher.json ./dist/actions/ && shx cp ./src/llvm/llvm_matcher.json ./dist/actions/",
@ -54,7 +54,7 @@
"test.lint.root.eslint": "eslint ./{src,dev}/**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
"test.lint.biome": "biome check",
"test.lint.dprint": "dprint check",
"test": "jest --runInBand --forceExit --coverage",
"test": "turbo test && jest --runInBand --forceExit --coverage",
"build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs"
},
"devDependencies": {

View File

@ -8,6 +8,7 @@
"author": "Amin Yahyaabadi",
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",

View File

@ -8,6 +8,7 @@
"author": "Amin Yahyaabadi",
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",

View File

@ -1,3 +1,3 @@
export { addEnv } from "./add-env.js"
export { addPath } from "./add-path.js"
export { addEnv, AddEnvOptions } from "./add-env.js"
export { addPath, AddPathOptions } from "./add-path.js"
export { finalizeRC, sourceRCInRc as sourceRC } from "./rc-file.js"

View File

@ -8,6 +8,7 @@
"author": "Amin Yahyaabadi",
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",

View File

@ -8,6 +8,7 @@
"author": "Amin Yahyaabadi",
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",

View File

@ -0,0 +1,2 @@
import jestConfig from "../../jest.config.mjs"
export default jestConfig

View File

@ -8,12 +8,14 @@
"author": "Amin Yahyaabadi",
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",
"lint.tsc": "tsc --noEmit --pretty",
"lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
"prepublishOnly": "pnpm run build"
"prepublishOnly": "pnpm run build",
"test": "jest --coverage"
},
"dependencies": {
"@types/node": "^12",

View File

@ -8,6 +8,7 @@
"author": "Amin Yahyaabadi",
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",

View File

@ -35,6 +35,7 @@
"include": [
"./src",
"./dev/",
"./*.ts"
"./*.ts",
"jest.config.mjs"
]
}

View File

@ -18,6 +18,9 @@
},
"lint": {
"dependsOn": ["lint.tsc", "lint.eslint"]
},
"test": {
"dependsOn": ["build", "^test"]
}
},
"ui": "stream"