Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
feat: run upkeep
Browse files Browse the repository at this point in the history
  • Loading branch information
sublimator committed Jun 29, 2023
1 parent 67cdee5 commit 699dbbc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 65 deletions.
21 changes: 13 additions & 8 deletions packages/niq-privacypass-noble/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FROM UPKEEP TEMPLATE
const path = require('path')
const path = require('node:path')

const displayName = path.basename(__dirname)
const rootConfig = { ...require('../../jest.config.cjs') }
Expand All @@ -9,15 +9,20 @@ delete rootConfig.rootDir
const coverage = {
coverageReporters: ['json', 'lcov', 'text', 'clover', 'html'],
coveragePathIgnorePatterns: ['/node_modules/'],
coverageDirectory: 'results/coverage',
coverageDirectory: 'results/coverage'
}

// Set this when invoked from a workspace, rather than root
const PROJECT_JEST = Boolean(process.env.PROJECT_JEST)
const E2E = Boolean(process.env.JEST_E2E)

const testFolder = E2E ? 'jest-e2e' : 'jest'
const testFolderTests = `<rootDir>/test/${testFolder}/**/*.test.{ts,mts}?(x)`
const srcFolderTests = '<rootDir>/src/**/*.test.{ts,mts}?(x)'

module.exports = {
...rootConfig,
displayName,
...(process.env.PROJECT_JEST === '1' ? coverage : undefined),
testMatch: [
'<rootDir>/test/jest/**/*.test.ts?(x)',
'<rootDir>/src/**/*.test.ts?(x)'
]
displayName: displayName,
...(PROJECT_JEST ? coverage : undefined),
testMatch: E2E ? [testFolderTests] : [testFolderTests, srcFolderTests]
}
64 changes: 8 additions & 56 deletions packages/niq-privacypass-noble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"homepage": "https://github.com/coilhq/web-monetization-projects/tree/main/packages/niq-privacypass-noble",
"repository": {
"type": "git",
"url": "git@github.com:coilhq/web-monetization-projects.git"
"url": "git@github.com:coilhq/web-monetization-projects.git",
"directory": "packages/niq-privacypass-noble"
},
"license": "Apache-2.0",
"author": "Coil Team <info@coil.com>",
Expand All @@ -22,13 +23,13 @@
"clean:build": "rimraf build",
"format": "pnpm prettier && LINT_FIX=1 pnpm lint:all --fix --quiet",
"lint": "eslint --cache --cache-location ../../node_modules/.cache/eslint",
"lint:all": "pnpm lint 'src/**/*.{ts,tsx}' 'test/**/*.{ts,tsx}'",
"lint:all": "pnpm lint 'src/**/*.{mts,ts,tsx}' 'test/**/*.{mts,ts,tsx}'",
"precommit": "echo lint-staged runs from root",
"prettier": "prettier --write '*.{ts,tsx,js,html,jsx,md}' '{src,test}/**/*.{ts,tsx,js,html,jsx,md}'",
"test": "PROJECT_JEST=1 jest --passWithNoTests",
"prettier": "prettier --write '*.{mts,ts,tsx,js,html,jsx,md}' '{src,test}/**/*.{mts,ts,tsx,js,html,jsx,md}'",
"test": "NODE_OPTIONS=--experimental-vm-modules PROJECT_JEST=1 jest --passWithNoTests",
"test:coverage": "pnpm run test --verbose --coverage",
"test:e2e": "pnpm run test --config jest-e2e.config.cjs",
"test:e2e:coverage": "pnpm test:coverage --config jest-e2e.config.cjs",
"test:e2e": "JEST_E2E=1 pnpm run test",
"test:e2e:coverage": "JEST_E2E=1 pnpm run test:coverage",
"tsnodeenv": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --require tsconfig-paths/register\" TS_NODE_PROJECT=\"../../tsconfig.cjs.json\"",
"upkeep": "cd ../.. && pnpm upkeep"
},
Expand All @@ -37,55 +38,6 @@
"@noble/hashes": "^1.3.0"
},
"devDependencies": {
"@abraham/reflection": "0.12.0",
"@babel/core": "7.21.4",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.21.0",
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/preset-env": "7.21.4",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.21.4",
"@commitlint/cli": "17.6.1",
"@commitlint/config-conventional": "17.6.1",
"@swc/core": "1.3.55",
"@swc/jest": "0.2.26",
"@types/jest": "29.5.1",
"@types/node": "18.16.1",
"@typescript-eslint/eslint-plugin": "5.59.1",
"@typescript-eslint/parser": "5.59.1",
"JSON2016": "1.0.0",
"babel-plugin-parameter-decorator": "1.0.16",
"babel-plugin-transform-typescript-metadata": "0.3.2",
"copy-webpack-plugin": "11.0.0",
"eslint": "8.39.0",
"eslint-config-prettier": "8.8.0",
"eslint-import-resolver-node": "0.3.7",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.1",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-standard": "5.0.0",
"husky": "8.0.3",
"jest": "29.5.0",
"jest-environment-jsdom": "29.5.0",
"lint-staged": "13.2.2",
"nodemon": "2.0.22",
"prettier": "2.8.8",
"regenerator-runtime": "0.13.11",
"rimraf": "5.0.0",
"ts-jest": "29.1.0",
"ts-loader": "9.4.2",
"ts-node": "10.9.1",
"tsconfig-paths": "4.2.0",
"typescript": "5.0.4",
"webpack": "5.81.0",
"webpack-bundle-analyzer": "4.8.0",
"webpack-cli": "5.0.2",
"webpack-dev-server": "4.13.3",
"webpack-merge": "5.8.0"
"@types/jest": "29.5.1"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"./packages/niq-ci/src"
],
"@niq/privacypass-noble": [
"packages/niq-privacypass-noble/src"
"./packages/niq-privacypass-noble/src"
],
"@stacktracejs/stacktrace-js": [
"./packages/stacktracejs-stacktrace-js/src"
Expand Down

0 comments on commit 699dbbc

Please sign in to comment.