Skip to content

Commit

Permalink
Merge branch 'feature/add-ignore-files' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
msudgh committed Mar 2, 2024
2 parents 249e0ad + 3341dee commit a0d021e
Show file tree
Hide file tree
Showing 22 changed files with 1,178 additions and 871 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dist
pnpm-lock.yaml
coverage
docs
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import("prettier").Config} */
const config = {
trailingComma: 'es5',
useTabs: false,
tabWidth: 2,
semi: false,
singleQuote: true,
printWidth: 80,
}

export default config
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ plugins:
custom:
syncCloudStorage:
- name: my-bucket
localPath: ./assets
patterns:
- assets/*
actions:
- upload
- delete
Expand Down
23 changes: 16 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
// jest.config.js
export default {
testEnvironment: 'node',
roots: ['<rootDir>/test'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
testRegex: '(/test/.*\\.test\\.ts)$',
moduleFileExtensions: ['ts', 'js', 'json'],
maxConcurrency: 20,
testTimeout: 600000,
coverageReporters: ['lcov', 'cobertura', 'html', 'text', 'text-summary'],
coveragePathIgnorePatterns: [
'/node_modules/',
'./test/setupEnvs.ts',
'./test/mocks',
],
maxConcurrency: 20,
testTimeout: 600000,
transform: {
'^.+\\.ts$': [
'ts-jest',
{ tsconfig: '<rootDir>/tsconfig.test.json', useESM: true },
],
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
extensionsToTreatAsEsm: ['.ts'],
transformIgnorePatterns: ['node_modules/(?!(globby)/)'],
setupFiles: ['<rootDir>/test-setup.js'],
}
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"name": "sync-cloud-storage",
"version": "1.0.0-rc.3",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"main": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"author": {
"name": "Masoud Ghorbani <contact@mgh.space>",
"url": "https://mgh.space"
Expand All @@ -25,9 +26,9 @@
"build": "rm -rf ./dist && tsc -p tsconfig.build.json",
"build:watch": "tsc -p tsconfig.build.json -w",
"build:type-check": "tsc -p tsconfig.build.json --noEmit",
"test": "jest . --verbose",
"test:watch": "jest . --watch",
"test:coverage": "jest . --no-cache --coverage",
"test": "node --trace-warnings --experimental-vm-modules 'node_modules/jest/bin/jest.js'",
"test:watch": "node --trace-warnings --experimental-vm-modules 'node_modules/jest/bin/jest.js' --watch",
"test:coverage": "node --trace-warnings --experimental-vm-modules 'node_modules/jest/bin/jest.js' --no-cache --coverage",
"format": "prettier --write \"**/*.{ts,js,md,json,yaml,yml}\"",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
Expand All @@ -37,9 +38,10 @@
},
"devDependencies": {
"@faker-js/faker": "8.4.1",
"@jest/globals": "^29.7.0",
"@smithy/shared-ini-file-loader": "2.3.1",
"@types/jest": "^29.5.12",
"@types/node": "20.11.17",
"@types/node": "20.11.20",
"@types/serverless": "3.12.22",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
Expand All @@ -51,7 +53,7 @@
"http-server": "14.1.1",
"husky": "9.0.10",
"is-ci": "3.0.1",
"jest": "29.7.0",
"jest": "v30.0.0-alpha.3",
"jest-mock-extended": "3.0.5",
"jsdoc": "4.0.2",
"prettier": "3.2.5",
Expand All @@ -62,19 +64,19 @@
"dependencies": {
"@aws-sdk/client-s3": "3.511.0",
"@aws-sdk/lib-storage": "3.511.0",
"globby": "^14.0.1",
"mrmime": "2.0.0",
"winston": "^3.11.0",
"zod": "3.22.4"
},
"lint-staged": {
"*.ts": [
"(/test/.*\\.test\\.ts)$": [
"npm run test"
],
"*.{ts,js}": [
"npm run lint",
"npm run format"
"npm run lint"
],
"*.{json,md,yaml}": [
"*.{ts,js,json,md,yaml}": [
"npm run format"
]
}
Expand Down
Loading

0 comments on commit a0d021e

Please sign in to comment.