Skip to content

Commit

Permalink
Merge pull request #27 from cpcwood/dependency-updates-2021-09-24-2
Browse files Browse the repository at this point in the history
Dependency Updates 2021-09-24 #2
  • Loading branch information
cpcwood committed Sep 24, 2021
2 parents 2c7ab5d + 4c8b910 commit 0109514
Show file tree
Hide file tree
Showing 3 changed files with 1,571 additions and 2,457 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ function erbTransformer (fileContent, filePath, config) {
function processFile (fileContent, filePath, config) {
let processedContent = String(erbTransformer(fileContent, filePath, config))
if (config.babelConfig) {
const babelTransformer = babelJest.createTransformer(config.babelConfig)
processedContent = babelTransformer.process(processedContent, filePath, {}).code
const babelTransformer = babelJest.default.createTransformer(config.babelConfig)
const transformOptions = { config: process.cwd() }
processedContent = babelTransformer.process(processedContent, filePath, transformOptions).code
}
return processedContent
}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-erb-transformer",
"version": "1.2.5",
"version": "1.2.6",
"description": "Jest transformer for Embedded Ruby (`.erb`) files in Ruby projects",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -28,19 +28,19 @@
},
"homepage": "https://github.com/cpcwood/jest-erb-transformer#readme",
"dependencies": {
"@babel/core": "^7.12.3",
"babel-jest": "^26.6.3"
"@babel/core": "^7.15.5",
"babel-jest": "^27.2.1"
},
"devDependencies": {
"@babel/preset-env": "^7.12.1",
"@babel/preset-env": "^7.15.6",
"coveralls": "^3.1.0",
"eslint": "^7.2.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.21.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"jest": "^27.0.6",
"jest": "^27.2.1",
"jest-erb-transformer": "./"
}
}

0 comments on commit 0109514

Please sign in to comment.