environment-setup-guide
Guide developers through setting up development environments with proper tools, dependencies, and configurations
lokalise-upgrade-migration
Analyze, plan, and execute Lokalise SDK upgrades with breaking change detection. Use when upgrading Lokalise SDK versions, detecting deprecations, or migrating to new API versions. Trigger with phrases like "upgrade lokalise", "lokalise migration", "lokalise breaking changes", "update lokalise SD...
Full skill instructions
Guide for upgrading Lokalise SDK versions and handling breaking changes.
# Check installed version
npm list @lokalise/node-api
# Check latest available version
npm view @lokalise/node-api version
# View all available versions
npm view @lokalise/node-api versions --json | jq '.[-10:]'
# Check CLI version
lokalise2 --version
# View changelog
open https://github.com/lokalise/node-lokalise-api/releases
# Or check npm
npm view @lokalise/node-api repository.url
| SDK Version | Breaking Changes |
|---|---|
| v9.x (2024+) | ESM only - no CommonJS require() |
| v8.x | Last CommonJS support |
| v7.x | New pagination API |
| v6.x | TypeScript strict mode |
# Create branch for upgrade
git checkout -b upgrade/lokalise-sdk-v9
# Update SDK
npm install @lokalise/node-api@latest
# Run tests
npm test
// BEFORE (v8 - CommonJS)
const { LokaliseApi } = require("@lokalise/node-api");
// AFTER (v9 - ESM)
import { LokaliseApi } from "@lokalise/node-api";
// If you must use CommonJS, use dynamic import:
async function getClient() {
const { LokaliseApi } = await import("@lokalise/node-api");
return new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN });
}
{
"type": "module",
"scripts": {
"start": "node --experimental-specifier-resolution=node dist/index.js"
}
}
// tsconfig.json for ESM
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "NodeNext",
"target": "ES2022",
"esModuleInterop": true
}
}
| SDK Version | Node.js | Key Changes |
|---|---|---|
| 9.x | 18+ | Pure ESM, no require() |
| 8.x | 14+ | Last CommonJS support |
| 7.x | 14+ | Cursor pagination |
| 6.x | 12+ | TypeScript improvements |
// Monitor for deprecation warnings during development
if (process.env.NODE_ENV === "development") {
process.on("warning", (warning) => {
if (warning.name === "DeprecationWarning") {
console.warn("[Lokalise Deprecation]", warning.message);
// Log to tracking for proactive updates
trackDeprecation({
message: warning.message,
stack: warning.stack,
timestamp: new Date(),
});
}
});
}
// utils/lokalise.ts - Works with both v8 and v9
let LokaliseApiClass: any;
async function getLokaliseApi() {
if (!LokaliseApiClass) {
try {
// Try ESM import first (v9+)
const module = await import("@lokalise/node-api");
LokaliseApiClass = module.LokaliseApi;
} catch {
// Fall back to CommonJS (v8)
LokaliseApiClass = require("@lokalise/node-api").LokaliseApi;
}
}
return new LokaliseApiClass({
apiKey: process.env.LOKALISE_API_TOKEN!,
});
}
// BEFORE (v6 - offset pagination only)
const keys = await client.keys().list({
project_id: projectId,
page: 1,
limit: 100,
});
// AFTER (v7+ - cursor pagination available)
const keys = await client.keys().list({
project_id: projectId,
pagination: "cursor", // New option
limit: 500,
});
// Iterate with cursor
let cursor: string | undefined;
do {
const result = await client.keys().list({
project_id: projectId,
pagination: "cursor",
cursor,
limit: 500,
});
processKeys(result.items);
cursor = result.hasNextCursor() ? result.nextCursor : undefined;
} while (cursor);
# If upgrade causes issues, rollback immediately
npm install @lokalise/[email protected] --save-exact
# Revert ESM changes if needed
git checkout HEAD~1 -- tsconfig.json package.json
# Verify rollback
npm test
async function validateUpgrade(): Promise<{
success: boolean;
issues: string[];
}> {
const issues: string[] = [];
try {
const { LokaliseApi } = await import("@lokalise/node-api");
const client = new LokaliseApi({
apiKey: process.env.LOKALISE_API_TOKEN!,
});
// Test basic operations
await client.projects().list({ limit: 1 });
console.log("Project list: OK");
// Test cursor pagination (v7+)
const keys = await client.keys().list({
project_id: process.env.LOKALISE_PROJECT_ID!,
pagination: "cursor",
limit: 10,
});
if (typeof keys.hasNextCursor !== "function") {
issues.push("Cursor pagination not available - SDK may be outdated");
}
console.log("Cursor pagination: OK");
} catch (error: any) {
issues.push(`SDK validation failed: ${error.message}`);
}
return {
success: issues.length === 0,
issues,
};
}
# macOS
brew upgrade lokalise2
# Linux - download latest release
curl -sL https://github.com/lokalise/lokalise-cli-2-go/releases/latest/download/lokalise2_linux_x86_64.tar.gz | tar xz
# Verify
lokalise2 --version
For CI integration during upgrades, see lokalise-ci-integration.
Guide developers through setting up development environments with proper tools, dependencies, and configurations
Implement Exa lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Exa integrations, implementing pre-commit hooks, or configuring CI policy checks for Exa best practices. Trigger with phrases like "exa policy", "exa lint", "exa guardrails", "exa be...
Configure CI/CD pipelines for Documenso integrations. Use when setting up automated testing, deployment pipelines, or continuous integration for Documenso projects. Trigger with phrases like "documenso CI", "documenso GitHub Actions", "documenso pipeline", "documenso automated testing".
Build check model availability and implement fallback chains. Use when building resilient systems or handling model outages. Trigger with phrases like 'openrouter availability', 'openrouter fallback', 'openrouter model down', 'openrouter health check'.
Configure Langfuse enterprise organization management and access control. Use when implementing team access controls, configuring organization settings, or setting up role-based permissions for Langfuse projects. Trigger with phrases like "langfuse RBAC", "langfuse teams", "langfuse organization"...
Execute compliance and security auditing for Cursor usage. Triggers on "cursor compliance", "cursor audit", "cursor security review", "cursor soc2", "cursor gdpr". Use when analyzing or auditing cursor compliance audit. Trigger with phrases like "cursor compliance audit", "cursor audit", "cursor".
Configure Apollo.io CI/CD integration. Use when setting up automated testing, continuous integration, or deployment pipelines for Apollo integrations. Trigger with phrases like "apollo ci", "apollo github actions", "apollo pipeline", "apollo ci/cd", "apollo automated tests".
Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.
Configure PostHog across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific PostHog configurations. Trigger with phrases like "posthog environments", "posthog staging", "po...
Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling.
Validate insecure deserialization checker operations. Auto-activating skill for Security Fundamentals. Triggers on: insecure deserialization checker, insecure deserialization checker Part of the Security Fundamentals skill category. Use when working with insecure deserialization checker functiona...
Manage path traversal finder operations. Auto-activating skill for Security Fundamentals. Triggers on: path traversal finder, path traversal finder Part of the Security Fundamentals skill category. Use when working with path traversal finder functionality. Trigger with phrases like "path traversa...
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience