Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sweep: Fix issues in package.json #88

Open
1 task done
munawar-js opened this issue Sep 26, 2023 · 1 comment · May be fixed by #89
Open
1 task done

Sweep: Fix issues in package.json #88

munawar-js opened this issue Sep 26, 2023 · 1 comment · May be fixed by #89
Labels
sweep Sweep your software chores

Comments

@munawar-js
Copy link
Contributor

munawar-js commented Sep 26, 2023

Checklist
@sweep-ai sweep-ai bot added the sweep Sweep your software chores label Sep 26, 2023
@sweep-ai
Copy link

sweep-ai bot commented Sep 26, 2023

Here's the PR! #89.

⚡ Sweep Free Trial: I'm creating this ticket using GPT-4. You have 4 GPT-4 tickets left for the month and 2 for the day. For more GPT-4 tickets, visit [our payment portal.](https://buy.stripe.com/6oE5npbGVbhC97afZ4)

Actions (click)

  • ↻ Restart Sweep

Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description.

{
"name": "@stackrole/gatsby-starter-foundation",
"description": "A starter to launch your blazing fast personal website and a blog, Built with Gatsby and Netlify CMS. Made with ❤ by Stackrole",
"version": "2.0.0",
"author": "Stackrole <stackrole@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/stackrole/gatsby-starter-foundation.git"
},
"bugs": {
"url": "https://github.com/stackrole/gatsby-starter-foundation/issues"
},
"scripts": {
"build": "gatsby build --log-pages",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
},
"dependencies": {
"@gatsby-contrib/gatsby-plugin-elasticlunr-search": "^3.0.2",
"@theme-ui/color": "^0.6.0",
"gatsby": "^4.7.1",
"gatsby-plugin-google-analytics": "^4.7.0",
"gatsby-plugin-image": "^2.7.0",
"gatsby-plugin-manifest": "^4.7.0",
"gatsby-plugin-netlify-cms": "^6.25.0",
"gatsby-plugin-netlify-cms-paths": "^1.3.0",
"gatsby-plugin-offline": "^5.7.0",
"gatsby-plugin-react-helmet": "^5.7.0",
"gatsby-plugin-sass": "^5.7.0",
"gatsby-plugin-sharp": "^4.7.0",
"gatsby-plugin-sitemap": "^5.7.0",
"gatsby-plugin-theme-ui": "^0.6.2",
"gatsby-remark-images": "^6.7.0",
"gatsby-remark-prismjs": "^6.7.0",
"gatsby-remark-responsive-iframe": "^5.7.0",
"gatsby-source-filesystem": "^4.7.0",
"gatsby-transformer-remark": "^5.7.0",
"gatsby-transformer-sharp": "^4.7.0",
"netlify-cms-app": "^2.14.32",
"prismjs": "^1.27.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-helmet": "^6.1.0",
"react-icons": "^4.10.1",
"sass": "^1.49.7",
"theme-ui": "^0.6.2"
},
"devDependencies": {
"gatsby-plugin-netlify": "^4.1.0"
}

/** @jsx jsx */
import { jsx } from "theme-ui"
import { graphql } from "gatsby"
import { RiSendPlane2Line } from "react-icons/ri"
import Layout from "../components/layout"
import Seo from "../components/seo"
export const pageQuery = graphql`
query ContactQuery($id: String!) {
markdownRemark(id: { eq: $id }) {
id
html
excerpt(pruneLength: 140)
frontmatter {
title
}
}
site {
siteMetadata {
title
}
}
}
`
const Contact = ({ data }) => {
const { markdownRemark, site } = data // data.markdownRemark holds your post data
const { frontmatter, html } = markdownRemark
return (
<Layout className="contact-page" sx={contactStyles.contactPage}>
<Seo
title={frontmatter.title}
description={frontmatter.title + " " + site.siteMetadata.title}
/>
<div className="wrapper">
<h1>{frontmatter.title}</h1>
<div
className="description"
dangerouslySetInnerHTML={{ __html: html }}
/>
<form
className="contact-form"
action="/thanks"
name="contact"
method="POST"
data-netlify="true"
data-netlify-honeypot="bot-field"
>
<input type="hidden" name="form-name" value="contact" />
<p>
<label>
Name
<input type="text" name="name" required />
</label>
</p>
<p>
<label>
Email
<input type="email" name="email" required />
</label>
</p>
<p>
<label>
Subject
<input type="text" name="subject" required />
</label>
</p>
<p>
<label>
Message<textarea name="message" required></textarea>
</label>
</p>
<p className="text-align-right">
<button
className="button"
sx={{
variant: "variants.button",
}}
type="submit"
>
Send Message{" "}
<span className="icon -right">
<RiSendPlane2Line />
</span>
</button>
</p>
</form>
</div>
</Layout>
)
}
export default Contact
const contactStyles = {
contactPage: {
input: {
border: "6px solid",
borderColor: "inputBorder",
bg: "inputBackground",
outline: "none",
},
textarea: {
border: "6px solid",
borderColor: "inputBorder",
bg: "inputBackground",
outline: "none",
},
},

import React from "react"
import PropTypes from "prop-types"
import { Helmet } from "react-helmet"
import { useLocation } from "@reach/router"
import { useStaticQuery, graphql } from "gatsby"
const SEO = ({ title, description, image, article }) => {
const { pathname } = useLocation()
const { site } = useStaticQuery(query)
const {
defaultTitle,
titleTemplate,
defaultDescription,
siteUrl,
defaultImage,
twitterUsername,
} = site.siteMetadata
const seo = {
title: title || defaultTitle,
description: description || defaultDescription,
image: `${siteUrl}${image || defaultImage}`,
url: `${siteUrl}${pathname}`,
}
return (
<Helmet title={seo.title} titleTemplate={titleTemplate}>
<html lang="en-US" />
<link rel="alternate" href={seo.url} hreflang="en-us" />
<link rel="alternate" href={seo.url} hreflang="en" />
<link rel="alternate" href={seo.url} hreflang="x-default" />
<meta name="description" content={seo.description} />
<meta name="image" content={seo.image} />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
{seo.url && <meta property="og:url" content={seo.url} />}
{(article ? true : null) && <meta property="og:type" content="article" />}
{seo.title && <meta property="og:title" content={seo.title} />}
{seo.description && (
<meta property="og:description" content={seo.description} />
)}
{seo.image && <meta property="og:image" content={seo.image} />}
<meta name="twitter:card" content="summary_large_image" />
{twitterUsername && (
<meta name="twitter:creator" content={twitterUsername} />
)}
{seo.title && <meta name="twitter:title" content={seo.title} />}
{seo.description && (
<meta name="twitter:description" content={seo.description} />
)}
{seo.image && <meta name="twitter:image" content={seo.image} />}
</Helmet>
)
}
export default SEO
SEO.propTypes = {
title: PropTypes.string,
description: PropTypes.string,
image: PropTypes.string,
article: PropTypes.bool,
}
SEO.defaultProps = {
title: null,
description: null,
image: null,
article: false,
}
const query = graphql`
query SEO {
site {
siteMetadata {
defaultTitle: title
titleTemplate
defaultDescription: description
siteUrl: siteUrl
defaultImage: image
twitterUsername
}
}
}


Step 2: ⌨️ Coding

• Check the "dependencies" and "devDependencies" fields. Update any outdated dependencies to their latest stable versions. Remove any deprecated or unused dependencies. • Check the "scripts" field. Ensure all scripts are working as expected. Fix any scripts that are failing or not working as expected. • Check for any missing or incorrect fields. Ensure that all necessary fields such as "name", "version", "description", "main", "scripts", "repository", "keywords", "author", and "license" are present and correctly filled.

Step 3: 🔁 Code Review

Here are my self-reviews of my changes at sweep/fix-package-json-issues.

Here is the 1st review

Hi @munawar-js,

Thanks for your contribution. You've done a good job updating the versions of "react" and "react-dom" dependencies in the package.json file. However, the issue also requires checking the "scripts" field and ensuring there are no missing or incorrect fields in the package.json file.

Here's what needs to be done:

  • Please check the "scripts" field in the package.json file and ensure all scripts are working as expected.
  • Also, verify that all necessary fields such as "name", "version", "description", "main", "scripts", "repository", "keywords", "author", and "license" are present and correctly filled.

Once these changes are made, we can move forward with merging your pull request.

Keep up the good work!

I finished incorporating these changes.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.
Join Our Discord

@sweep-ai sweep-ai bot linked a pull request Sep 26, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Sweep your software chores
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant