- Initial pre-release build.
- Update README.md.
- Added GitHub urls.
- Updated README.md.
- Added more sample data.
- Added samples for Students and Countries.
- Implemented REST API call.
- Added Fetch REST API method wrapper. The method accepts the same parameters as the native fetch api and returns the response object.
- This allows more flexibility in making API calls.
- Minor bug fixes.
- Minor bug fixes.
- Minor bug fixes.
- Refactored KeyCodes object to reduce the depth.
- After import use KeyCodes.ArrowKeys.Up instead of KeyCodes.KeyCodes.ArrowKeys.Up.
- There is no backward compatibility.
- Added States to object collection.
- State information can be accessed using SampleData.Objects.States.Michigan syntax.
- Minor bug fixes.
- Added album collection to objects.
- Minor bug fixes.
- Added daily weather sample.
- Added movie list.
- Added comprehensive TypeScript support with full type definitions for all datasets.
- Exported 18+ TypeScript interfaces covering all collections, objects, and dictionaries.
- Consumers can now import types:
import { type Book, type TriviaQuestion, SampleData } from 'i45-sample-data' - Full IntelliSense and autocomplete support in TypeScript projects.
- Type definitions include: Book, TriviaQuestion, Album, Song, Player, Recipe, Student, State, Country, DailyWeather, KeyCodes, Movie, and more.
- Properly typed optional and nullable fields for accurate data modeling.
- Generic type support for
SampleData.fetch<T>()method.
- 100% backward compatible - No breaking changes for existing JavaScript or TypeScript consumers.
- All type declarations automatically included in package distribution.
- Updated README.md with comprehensive TypeScript usage examples.
- Added TypeScript import examples with type annotations.
- Documented all available type interfaces.
- Updated React component example with proper TypeScript syntax.
- Replaced deprecated property references with current recommended APIs (Collections/Dictionaries).
- Added backward compatibility section for deprecated properties.
- Included feature highlights (TypeScript support, ESM, tree-shakeable).
- Fixed fetch API example to show generic type parameter usage.
BREAKING CHANGES:
-
Error handling behavior changes may affect consumers not properly handling errors.
-
HTTP non-2xx responses now throw errors instead of attempting to parse.
-
Invalid content types now throw errors before parsing attempts.
-
Added Node.js compatibility for isomorphic package support.
- Replaced
window.fetchwithglobalThis.fetchfor cross-environment compatibility. - Package now works in Node.js 18+ (with native fetch) and all modern browsers.
- Added helpful error messages when fetch is unavailable in older environments.
- Improved error handling - both
from()andfetch()methods now properly throw errors.
- Replaced
-
Enhanced package.json metadata for better tooling support.
- Added explicit
mainfield for CommonJS/Node.js compatibility. - Added explicit
modulefield for ES module bundlers. - Added explicit
typesfield for TypeScript definition discovery. - Enhanced
exportsfield with explicitimportandtypesconditions.
- Added explicit
-
Added .npmignore to exclude development files from published package.
- Excludes test files, build configs, and documentation not needed by consumers.
- Reduces package size and improves install times.
-
Significantly improved error handling in
from()andfetch()methods.- Added input validation for URI parameter with clear error messages.
- Added HTTP status code validation with detailed error messages including status code, status text, and URI.
- Added Content-Type validation to ensure responses are JSON before parsing.
- Improved error propagation - preserves Error instances and stack traces.
- Better error context - all error messages now include the failing URI for easier debugging.
- Removed console.error calls to let consumers handle logging appropriately.
-
Made
apiKeyparameter optional infrom()method.- API key is no longer required - only provide it when calling authenticated endpoints.
- The
x-api-keyheader is only included when an API key is provided. - Supports both public and authenticated API calls.
- Added tree-shakeable individual imports for optimized bundle sizes.
- New subpath exports:
i45-sample-data/collections,i45-sample-data/lists,i45-sample-data/dictionaries,i45-sample-data/objects,i45-sample-data/helpers. - Import only the specific datasets you need instead of the entire library.
- Example:
import { Books, TriviaQuestions } from 'i45-sample-data/collections' - Reduces bundle size significantly when using modern bundlers (webpack, Vite, Rollup).
- All types are re-exported from subpath imports for full TypeScript support.
- New subpath exports:
- Added helper methods to SampleData class for working with sample data.
SampleData.random<T>(dataset)- Get a random item from any array dataset.SampleData.randomMultiple<T>(dataset, count)- Get multiple random items.SampleData.shuffle<T>(dataset)- Randomly shuffle an array (returns new array).- Methods include input validation with clear error messages.
- All methods are fully typed with TypeScript generics.
- Added DataHelpers class for generic data manipulation (
i45-sample-data/helpers).filterBy()- Filter items by property value.search()- Search across multiple string properties.filterWhere()- Filter by custom predicate function.groupBy()- Group items by property value.countBy()- Count items by property value.sortBy()- Sort array by property (asc/desc).paginate()- Paginate array data with metadata.unique()- Get unique values for a property.pluck()- Extract specific properties from objects.- All methods work with any array data, not just sample data.
- Tree-shakeable - only imported when explicitly needed.
- Updated README.md with comprehensive usage examples.
- Added examples showing both standard and tree-shakeable import patterns.
- Documented helper methods with practical examples.
- Included TypeScript examples with tree-shakeable imports.
- Documented bundle size optimization benefits.
- 100% backward compatible - No breaking changes, pure feature additions.
- Added range() method to DataHelpers
range()- Filter items by property based on a range of values.
- Updated Test Methods
- Added test methods to support the
filterWhere()and the newrange()methods.
- Added test methods to support the
- Updated README.md
- Documented updates to helper methods with examples.