New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tobiastengler/create-relay-app

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tobiastengler/create-relay-app - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

4

dist/tasks/InstallNpmDependenciesTask.js
import { TaskBase } from "./TaskBase.js";
import { GRAPHQL_WS_PACKAGE, REACT_RELAY_PACKAGE } from "../consts.js";
import { GRAPHQL_WS_PACKAGE, REACT_RELAY_PACKAGE, RELAY_RUNTIME_PACKAGE } from "../consts.js";
import { bold } from "../utils/cli.js";

@@ -18,3 +18,3 @@ export class InstallNpmDependenciesTask extends TaskBase {

}
const packages = [REACT_RELAY_PACKAGE];
const packages = [REACT_RELAY_PACKAGE, RELAY_RUNTIME_PACKAGE];
if (this.context.args.subscriptions) {

@@ -21,0 +21,0 @@ packages.push(GRAPHQL_WS_PACKAGE, "graphql@15.x");

@@ -39,3 +39,14 @@ import traverse from "@babel/traverse";

const mainFilename = "_app" + (this.context.args.typescript ? ".tsx" : ".js");
const mainFile = this.context.env.rel(path.join("pages", mainFilename));
const possibleMainFileLocations = [path.join("pages", mainFilename), path.join("src", "pages", mainFilename)];
let mainFile = null;
for (const possibleMainFileLocation of possibleMainFileLocations) {
const file = this.context.env.rel(possibleMainFileLocation);
if (this.context.fs.exists(file.abs)) {
mainFile = file;
break;
}
}
if (!mainFile) {
throw new Error(`${mainFilename} could not be found`);
}
this.updateMessage(this.message + " in " + bold(mainFile.rel));

@@ -42,0 +53,0 @@ const code = await this.context.fs.readFromFile(mainFile.abs);

{
"name": "@tobiastengler/create-relay-app",
"version": "v2.1.0",
"version": "v2.1.1",
"description": "Easy configuration of Relay for existing projects",

@@ -47,3 +47,2 @@ "homepage": "https://github.com/tobias-tengler/create-relay-app#readme",

"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.2.0",
"@types/inquirer": "^9.0.0",

@@ -65,3 +64,2 @@ "@types/jest": "^29.2.4",

"fs-extra": "^10.1.0",
"glob": "^8.0.3",
"inquirer": "^9.1.0",

@@ -68,0 +66,0 @@ "ora": "^6.1.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc