
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@arximughal/bigquery-orm
Advanced tools
A Mongoose-like ORM for Google BigQuery, providing a familiar interface for Node.js developers to interact with BigQuery.
npm install bigquery-orm
import { Schema, model, connect } from 'bigquery-orm';
// Connect to BigQuery
const connection = await connect({
projectId: 'your-project-id',
keyFilename: 'path/to/keyfile.json'
});
// Define a schema
interface IUser {
name: string;
email: string;
age?: number;
isActive: boolean;
createdAt: Date;
}
const userSchema = new Schema<IUser>({
name: { type: String, required: true },
email: { type: String, required: true, unique: true },
age: { type: Number },
isActive: { type: Boolean, default: true },
createdAt: { type: Date, default: Date.now }
});
// Create a model
const User = model<IUser>('User', userSchema);
// Create a document
const user = await User.create({
name: 'John Doe',
email: 'john@example.com',
age: 30
});
// Query documents
const users = await User.find({ isActive: true })
.sort({ createdAt: -1 })
.limit(10);
// Update documents
await User.updateMany(
{ age: { $lt: 18 } },
{ isActive: false }
);
// Delete documents
await User.deleteOne({ email: 'john@example.com' });
The ORM supports schema versioning to handle schema evolution:
import { Schema, model, SchemaVersioning, SchemaVersion } from 'bigquery-orm';
// Define the current schema
const userSchema = new Schema({
name: { type: String, required: true },
email: { type: String, required: true },
age: { type: Number },
isActive: { type: Boolean, default: true }
});
// Create versioning
const versioning = new SchemaVersioning(userSchema);
// Define previous schema versions
const v1Schema = new Schema({
name: { type: String, required: true },
email: { type: String, required: true }
});
// Add version with migration function
versioning.addVersion({
version: 1,
schema: v1Schema,
migrate: (doc) => {
// Add missing fields for v1 documents
return {
...doc,
age: null,
isActive: true
};
}
});
// Documents will be automatically migrated when retrieved
The ORM supports discriminators for schema inheritance:
import { Schema, model } from 'bigquery-orm';
// Base schema
const eventSchema = new Schema({
name: { type: String, required: true },
date: { type: Date, default: Date.now }
});
// Create base model
const Event = model('Event', eventSchema);
// Create discriminator for ClickEvent
const clickSchema = new Schema({
element: { type: String, required: true },
position: {
x: { type: Number, required: true },
y: { type: Number, required: true }
}
});
const ClickEvent = Event.discriminator('ClickEvent', clickSchema);
// Create discriminator for PageViewEvent
const pageViewSchema = new Schema({
url: { type: String, required: true },
referrer: { type: String }
});
const PageViewEvent = Event.discriminator('PageViewEvent', pageViewSchema);
// You can query all events or specific types
const allEvents = await Event.find();
const clickEvents = await ClickEvent.find();
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Mongoose-like ORM for Google BigQuery
The npm package @arximughal/bigquery-orm receives a total of 1 weekly downloads. As such, @arximughal/bigquery-orm popularity was classified as not popular.
We found that @arximughal/bigquery-orm demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.