@doors/codemods
Advanced tools
Comparing version 0.0.3 to 0.0.4
#! /usr/bin/env node | ||
const path = require("path") | ||
const { program } = require("commander") | ||
const execa = require("execa") | ||
const jscodeshiftExecutable = require.resolve(".bin/jscodeshift") | ||
const { spawn } = require("child_process") | ||
const transformerDirectory = path.join(__dirname, "../", "transforms") | ||
console.log(transformerDirectory) | ||
program | ||
@@ -23,3 +21,3 @@ .argument("<migrationFiles>", "Path of files to transform.") | ||
} | ||
spawn( | ||
execa( | ||
jscodeshiftExecutable, | ||
@@ -34,2 +32,3 @@ [ | ||
stdio: "inherit", | ||
stripEof: false, | ||
} | ||
@@ -36,0 +35,0 @@ ) |
# @doors/codemods | ||
## 0.0.4 | ||
### Patch Changes | ||
- Update import transforms | ||
## 0.0.3 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@doors/codemods", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"publishConfig": { | ||
@@ -14,7 +14,6 @@ "access": "public" | ||
"license": "ISC", | ||
"bin": { | ||
"migrate-imports": "./bin/run.update-imports.js" | ||
}, | ||
"bin": "./bin/run.update-imports.js", | ||
"dependencies": { | ||
"commander": "^9.0.0", | ||
"execa": "^6.1.0", | ||
"jscodeshift": "^0.13.1" | ||
@@ -21,0 +20,0 @@ }, |
@@ -1,3 +0,5 @@ | ||
import { Box } from "@rent_avail/core" | ||
import { Input } from "@rent_avail/controls" | ||
import Avatar, { AvatarGroup } from "@rent_avail/avatar" | ||
import React from "react"; | ||
import { Box } from "@rent_avail/core"; | ||
import { Input } from "@rent_avail/controls"; | ||
import Radio, { RadioGroup } from "@rent_avail/elements/radio"; | ||
import Avatar, { AvatarGroup as Thing } from "@rent_avail/avatar"; |
@@ -0,3 +1,5 @@ | ||
import React from "react"; | ||
import { Box } from "@doors/core"; | ||
import { Input } from "@doors/controls"; | ||
import { Avatar, AvatarGroup } from "@doors/display"; | ||
import { Radio, RadioGroup } from "@doors/controls"; | ||
import { Avatar, AvatarGroup as Thing } from "@doors/display"; |
@@ -38,3 +38,4 @@ function changePackage(source) { | ||
["card", "@doors/core"], | ||
["constants", "@doors/core"], | ||
// Don't do anything with constants, too complicated. | ||
["constants", "@rent_avail/elements/constants"], | ||
["button", "@doors/controls"], | ||
@@ -63,5 +64,7 @@ ["toggle", "@doors/controls"], | ||
importDeclarations.forEach((path) => { | ||
// Need to check for constants package and delete call expressions. | ||
const source = path.node.source.value | ||
const specifiers = path.node.specifiers.map((path) => { | ||
if (path.imported && path.imported.name !== path.local.name) { | ||
return j.importSpecifier(path.imported, path.local) | ||
} | ||
return j.importSpecifier(path.local, path.local) | ||
@@ -68,0 +71,0 @@ }) |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
4616
122
0
3
+ Addedexeca@^6.1.0
+ Addedcross-spawn@7.0.3(transitive)
+ Addedexeca@6.1.0(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedhuman-signals@3.0.1(transitive)
+ Addedis-stream@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@4.0.0(transitive)
+ Addednpm-run-path@5.3.0(transitive)
+ Addedonetime@6.0.0(transitive)
+ Addedpath-key@3.1.14.0.0(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedstrip-final-newline@3.0.0(transitive)
+ Addedwhich@2.0.2(transitive)