![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@shiyuhang0/serverless-js
Advanced tools
A Fetch API-compatible TiDB Cloud database driver based on planetscale-serverless-driver. Thanks for their great work!
This driver is for serverless and edge compute platforms that require HTTP external connections, such as Cloudflare Workers or Vercel Edge Functions.
npm install @shiyuhang0/serverless
import { connect } from '@shiyuhang0/serverless'
const config = {
host: '<host>',
username: '<user>',
password: '<password>'
}
const conn = connect(config)
const results = await conn.execute('select 1 from sample_data.github_events')
console.log(results)
Use the transaction
function to safely perform database transactions.
Use different client ip to execute transaction may lead to error.
import { connect } from '@shiyuhang0/serverless'
const conn = connect(config)
const tx = await conn.begin()
await tx.execute('insert into test.test values (6,"test6")')
console.log(await tx.execute('select * from test.test'))
console.log(await conn.execute('select * from test.test'))
await tx.commit()
console.log(await conn.execute('select * from test.test'))
The following configurations are supported in connection level:
A single database URL value can be used to configure the host
, username
, and password
values.
const config = {
url: process.env['DATABASE_URL'] || 'mysql://user:pass@host/dbname'
}
const conn = connect(config)
Node.js version 18 includes a built-in global fetch
function. When using an older version of Node.js, you can provide a custom fetch function implementation. We recommend the undici
package on which Node's built-in fetch is based.
import { connect } from '@shiyuhang0/serverless'
import { fetch } from 'undici'
const config = {
fetch,
host: '<host>',
username: '<user>',
password: '<password>'
}
const conn = connect(config)
const results = await conn.execute('select 1 from sample_data.github_events')
console.log(results)
The following options are supported in SQL level:
FAQs
A Fetch API-compatible PlanetScale database driver
The npm package @shiyuhang0/serverless-js receives a total of 1 weekly downloads. As such, @shiyuhang0/serverless-js popularity was classified as not popular.
We found that @shiyuhang0/serverless-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.