Skip to content

Commit 15c3fc3

Browse files
committed
changed package name to include npm org
1 parent 17dec63 commit 15c3fc3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const escomplex = require('escomplex')
44
const path = require('path')
5+
const read = require('read-file')
56

67
function sanitize (fileName, filePath, result) {
78
return {
@@ -35,7 +36,9 @@ module.exports.analyze = (source) => {
3536

3637
if (Array.isArray(source)) {
3738
source.forEach((filePath) => {
38-
result = escomplex.analyse(filePath)
39+
let fullPath = path.resolve(filePath)
40+
let content = read.sync(fullPath, 'utf8')
41+
result = escomplex.analyse(content)
3942
report = sanitize(path.basename(filePath), filePath, result)
4043
reports.push(report)
4144
})

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "inspekter-plugin-javascript",
3-
"version": "0.0.2",
2+
"name": "@inspekter/inspekter-plugin-javascript",
3+
"version": "1.0.0",
44
"description": "Inspekter JavaScript reporter",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)