mirror of https://github.com/aminya/setup-cpp
fix: add module type to packages + fix running the packages tests
This commit is contained in:
parent
f2d212e7ec
commit
0660ca7619
|
@ -8,6 +8,7 @@
|
||||||
"dev/cpp_vcpkg_project/**/*",
|
"dev/cpp_vcpkg_project/**/*",
|
||||||
"**/.venv/",
|
"**/.venv/",
|
||||||
"**/.*cache/",
|
"**/.*cache/",
|
||||||
|
"coverage/",
|
||||||
"**/coverage/"
|
"**/coverage/"
|
||||||
],
|
],
|
||||||
"ignoreUnknown": true
|
"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
|
@ -1,6 +1,7 @@
|
||||||
import type { Config } from "jest"
|
/**
|
||||||
|
* @type {import('jest').Config}
|
||||||
const jestConfig: Config = {
|
*/
|
||||||
|
const jestConfig = {
|
||||||
testMatch: ["**/*.test.ts"],
|
testMatch: ["**/*.test.ts"],
|
||||||
testEnvironment: "node",
|
testEnvironment: "node",
|
||||||
extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"],
|
extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"],
|
|
@ -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.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",
|
"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",
|
"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": "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.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/",
|
"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.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.biome": "biome check",
|
||||||
"test.lint.dprint": "dprint 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"
|
"build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"author": "Amin Yahyaabadi",
|
"author": "Amin Yahyaabadi",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --pretty",
|
"build": "tsc --pretty",
|
||||||
"dev": "tsc --watch --pretty",
|
"dev": "tsc --watch --pretty",
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"author": "Amin Yahyaabadi",
|
"author": "Amin Yahyaabadi",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --pretty",
|
"build": "tsc --pretty",
|
||||||
"dev": "tsc --watch --pretty",
|
"dev": "tsc --watch --pretty",
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
export { addEnv } from "./add-env.js"
|
export { addEnv, AddEnvOptions } from "./add-env.js"
|
||||||
export { addPath } from "./add-path.js"
|
export { addPath, AddPathOptions } from "./add-path.js"
|
||||||
export { finalizeRC, sourceRCInRc as sourceRC } from "./rc-file.js"
|
export { finalizeRC, sourceRCInRc as sourceRC } from "./rc-file.js"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"author": "Amin Yahyaabadi",
|
"author": "Amin Yahyaabadi",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --pretty",
|
"build": "tsc --pretty",
|
||||||
"dev": "tsc --watch --pretty",
|
"dev": "tsc --watch --pretty",
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"author": "Amin Yahyaabadi",
|
"author": "Amin Yahyaabadi",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --pretty",
|
"build": "tsc --pretty",
|
||||||
"dev": "tsc --watch --pretty",
|
"dev": "tsc --watch --pretty",
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
import jestConfig from "../../jest.config.mjs"
|
||||||
|
export default jestConfig
|
|
@ -8,12 +8,14 @@
|
||||||
"author": "Amin Yahyaabadi",
|
"author": "Amin Yahyaabadi",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --pretty",
|
"build": "tsc --pretty",
|
||||||
"dev": "tsc --watch --pretty",
|
"dev": "tsc --watch --pretty",
|
||||||
"lint.tsc": "tsc --noEmit --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",
|
"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": {
|
"dependencies": {
|
||||||
"@types/node": "^12",
|
"@types/node": "^12",
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"author": "Amin Yahyaabadi",
|
"author": "Amin Yahyaabadi",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --pretty",
|
"build": "tsc --pretty",
|
||||||
"dev": "tsc --watch --pretty",
|
"dev": "tsc --watch --pretty",
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
"include": [
|
"include": [
|
||||||
"./src",
|
"./src",
|
||||||
"./dev/",
|
"./dev/",
|
||||||
"./*.ts"
|
"./*.ts",
|
||||||
|
"jest.config.mjs"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"dependsOn": ["lint.tsc", "lint.eslint"]
|
"dependsOn": ["lint.tsc", "lint.eslint"]
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"dependsOn": ["build", "^test"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ui": "stream"
|
"ui": "stream"
|
||||||
|
|
Loading…
Reference in New Issue