Comparing version 0.0.1 to 0.0.2
@@ -76,3 +76,3 @@ #! /usr/bin/env node | ||
}; | ||
const requireRegex = /require\(['"]([^'"]*)['"]\)/g; | ||
const requireRegex = /(?:import|require)\(['"]([^'"]*)['"]\)/g; | ||
const importRegex = /from ['"]([^'"]*)['"]/g; | ||
@@ -79,0 +79,0 @@ const replaceImportStatement = (orig, matched, outFile) => { |
@@ -5,11 +5,15 @@ module.exports = { | ||
tsConfigFile: 'tsconfig.json', | ||
skipBabel: true, | ||
}, | ||
}, | ||
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json'], | ||
moduleNameMapper: { | ||
'src/(.*)': '<rootDir>/src/$1', | ||
}, | ||
testEnvironment: 'node', | ||
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', | ||
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$', | ||
transform: { | ||
'^.+\\.(ts|tsx)$': 'ts-jest', | ||
'^.+\\.(js|jsx)$': 'babel-jest', | ||
}, | ||
transformIgnorePatterns: ['/node_modules/'], | ||
}; |
@@ -74,3 +74,3 @@ #! /usr/bin/env node | ||
}; | ||
const requireRegex = /require\(['"]([^'"]*)['"]\)/g; | ||
const requireRegex = /(?:import|require)\(['"]([^'"]*)['"]\)/g; | ||
const importRegex = /from ['"]([^'"]*)['"]/g; | ||
@@ -77,0 +77,0 @@ const replaceImportStatement = (orig, matched, outFile) => { |
{ | ||
"name": "tscpaths", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Replace absolute paths to relative paths after typescript compilation", | ||
@@ -16,3 +16,3 @@ "main": "cjs/index.js", | ||
"clear": "rm -rf ./lib ./cjs ./coverage", | ||
"format": "prettier --write \"./src/**/*.{js,jsx,ts,tsx}\"", | ||
"format": "prettier --write \"./*.{js,jsx,ts,tsx}\" \"./src/**/*.{js,jsx,ts,tsx}\"", | ||
"lint": "tslint -c ./tslint.json \"src/**/*\"", | ||
@@ -19,0 +19,0 @@ "lint:fix": "tslint --fix -c ./tslint.json \"src/**/*\"", |
@@ -6,3 +6,3 @@ module.exports = { | ||
singleQuote: true, | ||
trailingComma: 'es5' | ||
trailingComma: 'es5', | ||
}; |
@@ -118,3 +118,3 @@ #! /usr/bin/env node | ||
const requireRegex = /require\(['"]([^'"]*)['"]\)/g; | ||
const requireRegex = /(?:import|require)\(['"]([^'"]*)['"]\)/g; | ||
const importRegex = /from ['"]([^'"]*)['"]/g; | ||
@@ -121,0 +121,0 @@ |
{ | ||
"compilerOptions": { | ||
"allowJs": false, | ||
"allowSyntheticDefaultImports": true, | ||
"allowSyntheticDefaultImports": false, | ||
"alwaysStrict": true, | ||
@@ -6,0 +6,0 @@ "baseUrl": ".", |
{ | ||
"compilerOptions": { | ||
"allowJs": false, | ||
"allowSyntheticDefaultImports": true, | ||
"allowSyntheticDefaultImports": false, | ||
"alwaysStrict": true, | ||
@@ -6,0 +6,0 @@ "baseUrl": ".", |
{ | ||
"compilerOptions": { | ||
"allowJs": false, | ||
"allowSyntheticDefaultImports": true, | ||
"allowSyntheticDefaultImports": false, | ||
"alwaysStrict": true, | ||
@@ -6,0 +6,0 @@ "baseUrl": ".", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29796
529