ModhiSathvik commited on
Commit
b319879
Β·
verified Β·
1 Parent(s): 1fb88d3

Add seeds/javascript_starter.py

Browse files
Files changed (1) hide show
  1. seeds/javascript_starter.py +278 -0
seeds/javascript_starter.py ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # JavaScript starter seeds for topic expansion.
2
+ # Mirrors python_starter structure; topics are JS-native.
3
+
4
+ STARTER = [
5
+ # ── BASICS ────────────────────────────────────────────────────────────────
6
+ "var, let, const: scoping rules and TDZ",
7
+ "primitive types vs reference types and the equality traps",
8
+ "type coercion rules: == vs ===, falsy values",
9
+ "template literals and tagged templates",
10
+ "destructuring objects and arrays with defaults",
11
+ "spread and rest operators in arguments and arrays",
12
+ "optional chaining (?.) and nullish coalescing (??)",
13
+ "logical assignment operators: ||=, &&=, ??=",
14
+ "block scope, function scope, and module scope",
15
+ "hoisting of var, let, const, and function declarations",
16
+ "the temporal dead zone explained",
17
+ "implicit type conversion in arithmetic and comparison",
18
+ "Number.isNaN, Number.isFinite vs the global versions",
19
+ "Number precision: 0.1 + 0.2 problem and BigInt",
20
+ "string methods: slice, substring, substr, split, trim",
21
+ "String.raw and escape sequences",
22
+ "Array.from, Array.of, Array.isArray",
23
+ "array methods: map, filter, reduce, flat, flatMap, find, findIndex",
24
+ "array methods: some, every, includes, indexOf",
25
+ "Array.sort: stable sort and locale comparison",
26
+ "for...of vs for...in vs forEach: when to use which",
27
+ "iterating Maps and Sets with for...of",
28
+ "the iterator protocol and Symbol.iterator",
29
+ "creating objects: literals, Object.create, class",
30
+ "object property shorthand and computed property names",
31
+ "Object.keys, Object.values, Object.entries, Object.fromEntries",
32
+ "object spread for shallow copy and merge",
33
+ "Object.assign vs spread for object copying",
34
+ "JSON.stringify with replacer and JSON.parse with reviver",
35
+ "JSON.stringify of dates, undefined, functions, BigInt",
36
+ "Map and Set: when to prefer them over object/array",
37
+ "WeakMap and WeakSet for memory-friendly caches",
38
+ "function declarations vs function expressions vs arrow functions",
39
+ "arrow functions and 'this' lexical binding",
40
+ "default parameter values and the arguments object",
41
+ "rest parameters in function signatures",
42
+ "named exports vs default exports in ESM",
43
+ "import statements: named, default, namespace, dynamic",
44
+ "CommonJS module.exports vs ESM export",
45
+ "ESM vs CJS interop pitfalls in Node.js",
46
+ "if/else, ternary, and logical operators for control flow",
47
+ "switch statements and the fall-through gotcha",
48
+ "try/catch/finally and the optional binding (3rd arg)",
49
+ "throwing errors: Error, TypeError, RangeError, custom Error subclasses",
50
+ "Error.cause for exception chaining (ES2022)",
51
+ "labeled statements and break/continue with labels",
52
+ "regular expressions: literal syntax vs RegExp constructor",
53
+ "regex flags: g, i, m, s, u, y and what each does",
54
+ "regex methods: test, exec, match, matchAll, replace, replaceAll",
55
+ "Date object basics and date arithmetic",
56
+ "Intl.DateTimeFormat and Intl.NumberFormat for i18n",
57
+
58
+ # ── INTERMEDIATE ──────────────────────────────────────────────────────────
59
+ "the event loop, call stack, microtask queue, macrotask queue",
60
+ "process.nextTick vs setImmediate vs setTimeout in Node",
61
+ "Promises: then, catch, finally, and chaining",
62
+ "Promise.all, Promise.race, Promise.allSettled, Promise.any",
63
+ "creating promises with the Promise constructor",
64
+ "async/await and the rules of error propagation",
65
+ "top-level await in ESM modules",
66
+ "for-await-of for async iteration",
67
+ "async generators with yield in async functions",
68
+ "AbortController and AbortSignal for cancellation",
69
+ "fetch API: basic GET, POST, headers, body",
70
+ "fetch with FormData and multipart uploads",
71
+ "fetch streaming responses with ReadableStream",
72
+ "fetch error handling: response.ok and try/catch",
73
+ "node:fs/promises vs callback fs",
74
+ "fs.createReadStream and pipe to writers",
75
+ "node:path utilities: join, resolve, parse, extname",
76
+ "node:url: URL class, URLSearchParams",
77
+ "node:stream: Readable, Writable, Transform, Duplex",
78
+ "node:events: EventEmitter, on, once, off, removeAllListeners",
79
+ "node:crypto: createHash, createHmac, randomBytes, scryptSync",
80
+ "node:child_process: spawn, exec, execFile, fork",
81
+ "node:worker_threads for parallelism",
82
+ "node:cluster for multi-core scaling",
83
+ "process.argv, process.env, process.exit",
84
+ "buffer module: Buffer.from, Buffer.alloc, encoding",
85
+ "TextEncoder and TextDecoder for Uint8Array <-> string",
86
+ "ArrayBuffer, DataView, and typed arrays",
87
+ "classes: constructor, methods, getters, setters",
88
+ "private class fields with # prefix",
89
+ "static class members and static blocks",
90
+ "extends and super: subclassing and method override",
91
+ "instanceof, Symbol.hasInstance, and prototype chain",
92
+ "Object.getPrototypeOf and Object.setPrototypeOf",
93
+ "Object.defineProperty and property descriptors",
94
+ "Proxy: get, set, has, deleteProperty traps",
95
+ "Reflect API parallels with Proxy traps",
96
+ "Symbol primitive type and well-known symbols",
97
+ "Symbol.iterator, Symbol.asyncIterator",
98
+ "generators with function*: yield and yield*",
99
+ "generator delegation patterns",
100
+ "closures and free variables",
101
+ "the IIFE pattern and module patterns pre-ES2015",
102
+ "currying and partial application in JS",
103
+ "function.prototype.bind, call, apply",
104
+ "WeakRef and FinalizationRegistry",
105
+ "structuredClone for deep cloning (ES2022)",
106
+ "Promise.withResolvers (ES2024)",
107
+ "Object.hasOwn vs hasOwnProperty",
108
+ "Array.prototype.at for negative indexing",
109
+ "Array.prototype.findLast and findLastIndex",
110
+ "Array grouping with Object.groupBy and Map.groupBy",
111
+ "Promise unhandled rejection handling",
112
+ "process.on('uncaughtException') for last-resort error handling",
113
+ "graceful shutdown patterns: SIGTERM, SIGINT handling",
114
+ "console: log, debug, info, warn, error, table, group, time",
115
+ "console.assert and console.dir",
116
+ "performance.now and performance marks/measures",
117
+ "Object freeze, seal, preventExtensions",
118
+ "deep equality: writing your own and using libraries",
119
+ "shallow copy vs deep copy semantics",
120
+
121
+ # ── TESTING / TOOLING (intermediate) ──────────────────────────────────────
122
+ "Jest test setup: describe, it, beforeEach, afterEach",
123
+ "Jest matchers: toBe, toEqual, toMatchObject, toHaveBeenCalled",
124
+ "Jest mocking: jest.fn, jest.mock, mockImplementation",
125
+ "Jest async tests with done, return promise, async/await",
126
+ "Vitest as a faster Jest alternative",
127
+ "node:test: built-in test runner",
128
+ "snapshot testing patterns",
129
+ "ESLint configuration with flat config (eslint.config.js)",
130
+ "Prettier integration with ESLint",
131
+ "TypeScript basics: types, interfaces, type aliases",
132
+ "TypeScript: union, intersection, literal, conditional types",
133
+ "TypeScript generics: Function, type, class generics",
134
+ "tsconfig.json key options: target, module, strict, paths",
135
+ "type narrowing with typeof, instanceof, in, type predicates",
136
+ "TypeScript utility types: Partial, Required, Pick, Omit, Record",
137
+ "package.json: dependencies, devDependencies, peerDependencies",
138
+ "package.json scripts and lifecycle hooks",
139
+ "npm vs pnpm vs yarn vs bun: when each matters",
140
+ "monorepo with pnpm workspaces",
141
+ "esbuild for fast bundling",
142
+ "tsup for library bundling",
143
+ "Vite for dev server and bundling",
144
+ "Webpack basics and tree shaking",
145
+ "Rollup for library bundling",
146
+
147
+ # ── ADVANCED ──────────────────────────────────────────────────────────────
148
+ "V8 hidden classes and inline caches",
149
+ "V8 garbage collection: young generation vs old generation",
150
+ "memory leaks in JS: closures, listeners, detached DOM",
151
+ "performance profiling with Chrome DevTools Performance tab",
152
+ "Node.js --inspect flag and Chrome DevTools debugging",
153
+ "writing C++ addons with N-API",
154
+ "the V8 engine architecture overview",
155
+ "JIT compilation in V8: Ignition, TurboFan, Sparkplug",
156
+ "WeakRef use cases and pitfalls",
157
+ "FinalizationRegistry semantics",
158
+ "shared memory with SharedArrayBuffer and Atomics",
159
+ "thread safety and Atomics.wait/notify",
160
+ "reactive patterns with Observables (RxJS introduction)",
161
+ "Web Workers: dedicated, shared, and service workers",
162
+ "service worker lifecycle and caching strategies",
163
+ "the Cache API and offline-first patterns",
164
+ "WebSockets: client-side ws lifecycle and reconnection",
165
+ "ws library for Node.js WebSocket servers",
166
+ "Server-Sent Events vs WebSockets vs polling",
167
+ "HTTP/2 and HTTP/3 in Node.js",
168
+ "TLS/SSL: https module, custom CAs, mutual TLS",
169
+ "Node.js cluster mode and graceful reload",
170
+ "process management with PM2",
171
+ "writing native ESM packages with .mjs and 'type: module'",
172
+ "dual-package CJS+ESM with package.json exports field",
173
+ "package.json exports for conditional resolution",
174
+ "subpath imports with package.json imports field",
175
+ "import maps in browsers",
176
+ "tree shaking and sideEffects in package.json",
177
+ "bundling for browser: Vite, Webpack, esbuild, Rollup",
178
+ "code splitting: dynamic import() boundaries",
179
+ "lazy loading routes with React.lazy or Vue defineAsyncComponent",
180
+ "React: function components and hooks (useState, useEffect)",
181
+ "React: useMemo, useCallback, and avoiding unnecessary renders",
182
+ "React: useContext for state sharing",
183
+ "React: useReducer vs useState",
184
+ "React: Suspense for data fetching boundaries",
185
+ "React Server Components vs client components in Next.js",
186
+ "Next.js App Router: server actions and form handling",
187
+ "Vue 3: Composition API with ref, reactive, computed",
188
+ "Vue 3: provide/inject for cross-component state",
189
+ "Svelte 5 runes: $state, $derived, $effect",
190
+ "SolidJS fine-grained reactivity",
191
+ "Express middleware patterns and order of execution",
192
+ "Express error-handling middleware (4-arg signature)",
193
+ "Fastify schema validation and serialization",
194
+ "Hono for edge runtimes",
195
+ "Koa middleware with async/await",
196
+ "request validation with zod or joi",
197
+ "JSON Web Tokens: signing, verifying, refresh patterns",
198
+ "OAuth 2.0 authorization code flow in Node",
199
+ "session-based auth with express-session",
200
+ "rate limiting with express-rate-limit or in-memory leaky bucket",
201
+ "CORS configuration: origins, credentials, preflight",
202
+ "CSRF protection patterns with SameSite cookies",
203
+ "bcrypt vs argon2 for password hashing",
204
+ "constant-time comparison with crypto.timingSafeEqual",
205
+ "input validation and SQL injection prevention",
206
+ "node:sqlite3 and better-sqlite3 patterns",
207
+ "Postgres with pg: pool, transactions, prepared statements",
208
+ "Postgres with postgres.js (porsager/postgres)",
209
+ "Drizzle ORM: schema, queries, migrations",
210
+ "Prisma: schema, generated client, migrations",
211
+ "MongoDB with the official driver: connection, queries, indexes",
212
+ "Redis with ioredis: pub/sub, scripts, pipelines",
213
+ "BullMQ for Redis-backed job queues",
214
+ "Kafka client (kafkajs): producers, consumers, transactions",
215
+ "gRPC in Node with @grpc/grpc-js",
216
+ "GraphQL: Apollo Server, schema-first vs code-first",
217
+ "GraphQL DataLoader for batching",
218
+ "URQL or Apollo Client on the frontend",
219
+ "MSW (Mock Service Worker) for testing",
220
+ "Playwright for browser automation and E2E tests",
221
+ "Cypress component and E2E testing",
222
+ "Lighthouse and Web Vitals monitoring",
223
+ "OpenTelemetry tracing in Node services",
224
+ "structured logging with pino",
225
+ "Winston logger with custom transports",
226
+ "Sentry error tracking integration",
227
+ "feature flags with environment variables and unleash",
228
+ "edge runtimes: Cloudflare Workers, Vercel Edge",
229
+ "Deno-specific APIs: Deno.serve, Deno.permissions",
230
+ "Bun-specific APIs: Bun.serve, Bun.write",
231
+ "WebAssembly modules in JS: instantiate, import",
232
+ "Node.js permission model (--experimental-permission)",
233
+ "Node.js single executable applications (SEA)",
234
+ "diagnostic_channel for instrumentation hooks",
235
+ "async hooks for context propagation",
236
+ "AsyncLocalStorage for request-scoped data",
237
+ "PerformanceObserver for runtime metrics",
238
+ "cluster module: master/worker IPC patterns",
239
+ "child_process IPC: send and message events",
240
+ "worker_threads with MessageChannel for transferable objects",
241
+ "Iterator helpers proposal: .map, .filter, .take on iterators",
242
+ "Records and Tuples proposal (#{} and #[])",
243
+ "Pipeline operator proposal (|>)",
244
+ "decorators (Stage 3): class and method decorators",
245
+ "Temporal API: PlainDate, ZonedDateTime, Duration",
246
+ "ECMAScript modules in browsers: import maps, integrity",
247
+ "import attributes for JSON/CSS modules",
248
+ "private methods and accessors with # syntax",
249
+ "weakly-held references in event listeners",
250
+ "DOM event delegation patterns",
251
+ "MutationObserver and IntersectionObserver",
252
+ "ResizeObserver for responsive components",
253
+ "the History API: pushState, replaceState, popstate",
254
+ "Storage APIs: localStorage, sessionStorage, IndexedDB",
255
+ "IndexedDB with idb library for ergonomic API",
256
+ "the Fetch + AbortController pattern for cancelable requests",
257
+ "Streams API: ReadableStream, WritableStream, TransformStream",
258
+ "the File System Access API",
259
+ "Web Locks API for cross-tab coordination",
260
+ "BroadcastChannel for tab-to-tab messaging",
261
+ "the Clipboard API and permissions",
262
+ "navigator.permissions and the Permissions API",
263
+ "Page Visibility API and Idle Detection",
264
+ "WebAuthn for passkey-based authentication",
265
+ "Subresource Integrity for script tags",
266
+ "Content Security Policy (CSP) headers",
267
+ "Trusted Types for DOM XSS prevention",
268
+ "service worker for push notifications",
269
+ "background sync API",
270
+ "WebRTC: peer connection, data channels, media streams",
271
+ "MediaDevices API: getUserMedia, getDisplayMedia",
272
+ "Web Audio API: AudioContext, nodes, scheduling",
273
+ "Canvas 2D and WebGL basics in JS",
274
+ "Animation API: requestAnimationFrame patterns",
275
+ "Web Animations API for declarative animations",
276
+ "passive event listeners for scroll performance",
277
+ "the Beacon API for analytics on unload",
278
+ ]