Skip to content

First Release

Choose a tag to compare

@nyxb nyxb released this 13 May 19:44
· 6 commits to main since this release

Changelog

v0.0.2

πŸš€ Enhancements

  • config.ts): add config file support and normalize options πŸŽ‰ feat(index.ts): add defineConfig function to define configuration options πŸŽ‰ feat(log.ts): add TableLogger and createMultiProgresBar functions to log progress and errors πŸŽ‰ feat(render.ts): add visualLength, visualPadStart, visualPadEnd, formatTable, and colorizeVersionDiff functions to format output πŸŽ‰ chore(tsconfig.json: Rename taze path to fresh The config.ts file now supports loading configuration options from a file. The options are normalized to ensure that they are in the correct format. The index.ts file now has a defineConfig function that allows the user to define configuration options. The log.ts file now has a TableLogger and createMultiProgresBar functions to log progress and errors. The render.ts file now has visualLength, visualPadStart, visualPadEnd, formatTable, and colorizeVersionDiff functions to (5d11359)
  • api: Add CheckPackages and CheckSingleProject functions to check packages and their dependencies for updates The CheckPackages function loads packages and their dependencies, filters out private dependencies, and checks each package for updates. The CheckSingleProject function checks a single package for updates and writes the updated package to the package.json file if the write option is set to true. These functions are used in the check command to check for updates in packages and their dependencies. (e945b89)
  • io): add functions to read, write and load package.json files, and resolve dependencies ✨ feat(io: Add functions to read, write and load package.json files, and resolve dependencies This commit adds new functions to read, write and load package.json files, and resolve dependencies. The readJSON and writeJSON functions are used to read and write package.json files respectively. The loadPackage function is used to load a package.json file and parse its dependencies. The loadPackages function is used to load all package.json files in a directory and its subdirectories. The resolveDependency function is used to resolve a dependency and determine if it needs to be updated. The resolveDependencies function is used to resolve all dependencies of a package. The resolvePackage function is used to resolve all dependencies of a package and sort them by their update status. The getPackageMode function is used to get (e07f90e)
  • utils: Add new files dependenciesFilter.ts, diff.ts, npm.ts, npmcliConfig.d.ts The dependenciesFilter.ts file contains utility functions to filter dependencies based on include and exclude patterns. The diff.ts file contains a map of semantic versioning strings to numbers. The npm.ts file contains a function to get the npm configuration. The npmcliConfig.d.ts file contains the type definitions for the npmcliConfig module. (286ac60)
  • versions.ts: Add utility functions for version range prefixing, changing version range, and getting the maximum satisfying version This commit adds utility functions for version range prefixing, changing version range, and getting the maximum satisfying version. These functions are useful for managing dependencies and ensuring that the correct version is installed. The functions are getVersionRangePrefix, changeVersionRange, applyVersionRangePrefix, getPrefixedVersion, and getMaxSatisfying. (d3ea861)
  • sort.ts: Add utility functions to sort dependency changes by time, diff, or name This commit adds a new file sort.ts that contains utility functions to sort dependency changes by time, diff, or name. The sortDepChanges function takes an array of ResolvedDepChange objects and a SortOption string, which is parsed to determine the sort key and order. The function then sorts the array based on the specified key and order and returns the sorted array. The parseSortOption function is used to split the SortOption string into its key and order components. (94d00a8)
  • toArray.ts: Add utility function toArray to convert a value to an array The new utility function toArray takes a value and returns an array containing the value if it is not already an array. If the value is undefined or null, an empty array is returned. This function can be used to ensure that a value is always an array, which can be useful in cases where an array is expected but a single value may be passed. (605cabf)
  • time.ts: Add timeDifference and toDate functions to calculate time difference and convert date string to number The timeDifference function calculates the time difference between two dates and returns a string representation of the difference in days, months, or years. The toDate function converts a date string to a number. These functions are useful for displaying relative time in a user-friendly way. (ffcf523)
  • pnpm-workspace.yaml): add pnpm-workspace.yaml file to exclude test directories from packages πŸš€ feat(filter.test.ts): add tests for filterToRegex and createDependenciesFilter functions πŸš€ feat(package.json): add package.json files to test/fixtures/monorepo/packages/bar, test/fixtures/monorepo/packages/foo, test/fixtures/pkgmode, and test/fixtures/single directories πŸš€ feat(french.config.ts): add french.config.ts file to test/fixtures/pkgmode directory πŸš€ feat(packageConfig.test.ts): add tests for CheckPackages function with different options πŸš€ feat(render.test.ts: Add tests for formatTable function The changes add new files and tests to the project. The pnpm-workspace.yaml file is added to exclude test directories from packages. The filterToRegex and createDependenciesFilter functions are tested in filter.test.ts. package.json files are added to test/fixtures/monorepo/packages (2990bc4)
  • karium.config.ts): add build configuration file for Karium πŸš€ chore(package.json): add build and release scripts, add files field πŸ”§ chore(tsconfig.json: Change path for freshdeps (b293c41)
  • cli): rename scriptName from 'fresh' to 'freshdeps' to improve clarity πŸ› fix(config.ts: Change debug namespace from 'fresh:config' to 'freshdeps:config' to match new scriptName The scriptName has been changed from 'fresh' to 'freshdeps' to improve clarity and avoid confusion with other similarly named packages. The debug namespace has also been updated to match the new scriptName. (fb14f37)
  • fresh.config.ts: Add configuration file for fresh package mode This commit adds a new configuration file for the fresh package mode. The configuration file is written in TypeScript and uses the configerium library to load the configuration. The configuration file sets the defaults for the exclude and packageMode options. The packageMode option is used to specify the version of certain packages to be installed. (34635ad)
  • config: Add fresh.config.json to exclude lodash from the build The fresh.config.json file is added to the project to exclude the lodash library from the build process. This is done to reduce the size of the final build and improve performance. (9961667)

🩹 Fixes

  • packages.ts): fix indentation in functions readJSON and writeJSON ✨ feat(packages.ts): add support for packageManager field in package.json files ✨ feat(packages.ts): add support for options.prod and options.dev to filter dependencies ✨ feat(packages.ts): add support for options.include and options.exclude to filter dependencies ✨ feat(packages.ts): add support for options.recursive to search for package.json files recursively πŸ› fix(resolves.ts): fix debug messages prefix πŸ› fix(resolves.ts: Fix cache directory name The indentation in the readJSON and writeJSON functions has been fixed to improve code readability. The packageManager field in package.json files is now supported, and the dependencies can be filtered by options.prod and options.dev. The options.include and options.exclude can also be used to filter dependencies. The option options.recursive has been added to search for package.json files recursively. The debug (56c8fe6)
  • versions.ts): fix indentation and add missing spaces to improve code readability ✨ feat(versions.ts: Add support for 'default' mode in getMaxSatisfying function The changes in versions.ts fix the indentation and add missing spaces to improve code readability. The getMaxSatisfying function now supports the 'default' mode, which returns undefined if the current version is '*' or an empty string. The changes in packageConfig.test.ts are just a result of the formatting changes in versions.ts. (46bc801)

πŸ’… Refactors

  • diff-sorter.ts): fix indentation and whitespace πŸ”¨ refactor(dependencies.ts: Fix indentation and whitespace The changes in these files are purely cosmetic, fixing indentation and whitespace to improve code readability. (e397363)
  • config.ts, dependenciesFilter.ts: Improve code readability and formatting The changes in this commit are purely cosmetic and aim to improve the code's readability and formatting. The changes include indentation, whitespace, and line breaks. The code is now easier to read and understand. (63175e1)
  • utils: Improve code readability and consistency The changes in this commit include formatting and indentation changes to improve code readability and consistency. The changes include adding whitespace and aligning code blocks. The changes also include renaming variables and functions to improve semantics. (da44449)

🏑 Chore

  • .eslintignore): add ignore rules for dist, test fixtures, package.json, tsconfig.json, vscode, github, and README.md πŸ†• chore(.eslintrc: Add eslint configuration file with rules and settings The .eslintignore file now includes rules to ignore the dist directory, test fixtures, package.json, tsconfig.json, vscode, github, and README.md files. The .eslintrc file is a new configuration file that extends the "@nyxb" configuration, sets a rule to ignore the "@next/next/no-html-link-for-pages" rule, and sets the react version to 16.0. (a81dc12)
  • .gitignore): add coverage directory to .gitignore πŸŽ‰ feat(.npmrc): add ignore-workspace-root-check=true to .npmrc πŸŽ‰ feat(fresh.config.json: Add empty JSON object to fresh.config.json The coverage directory is now ignored by git. The ignore-workspace-root-check=true flag is added to the .npmrc file to ignore workspace root check when running npm commands. An empty JSON object is added to the fresh.config.json file. (b152aea)
  • index.ts): fix indentation in defineConfig function 🎨 style(render.ts): update picocolors import to use scoped package πŸ”¨ refactor(render.ts): extract ansiRegex and stripAnsi functions for reusability πŸ”¨ refactor(render.ts): extract visualLength, visualPadStart, and visualPadEnd functions for reusability πŸ”¨ refactor(render.ts): extract formatTable function for reusability πŸ”¨ refactor(render.ts): extract colorizeVersionDiff function for reusability πŸ”¨ refactor(types.ts: Update type definitions to improve readability The changes in index.ts are purely cosmetic, fixing the indentation in the defineConfig function. In render.ts, the picocolors import is updated to use the scoped package. Several functions are extracted from render.ts for reusability, including ansiRegex, stripAnsi, visualLength, visualPadStart, visualPadEnd, formatTable (cb23d8a)
  • interactive.ts: Update dependencies and fix imports This commit updates the dependencies and fixes the imports in the interactive.ts file. The picocolors and @antfu/utils packages were replaced with @nyxb/picocolors and @nyxb/utils respectively. This was done to ensure that the dependencies are up-to-date and to fix the imports that were causing errors. (c85a33b)
  • render.ts: Update picocolors import to use @nyxb scope This commit updates the import statement for the picocolors package to use the @nyxb scope. This is done to reflect the new package name and scope. (4f4f504)
  • utils): update picocolors package import πŸ› fix(utils: Add whitespace to improve code readability The picocolors package import has been updated to use the new package name '@nyxb/picocolors'. The whitespace has been added to improve code readability. (ef7f12f)
  • monorepo: Rename package names to use @freshdeps instead of @fresh The package names have been updated to use the @freshdeps scope instead of @fresh. This change was made to better reflect the naming conventions used by the organization. (ce9eb67)
  • package.json: Update package names to reflect new organization name The package names have been updated to reflect the new organization name "@freshdeps". This change was made to ensure consistency with the new organization name. (0fde524)
  • package.json): add consolji package to dependencies ✨ feat(check): add consolji package to log messages instead of console.log and console.error πŸ› fix(resolves.ts: Import consolji package instead of destructuring it The consolji package is added to the dependencies to improve the logging of messages. The console.log and console.error statements in the check command are replaced with consolji.log and consolji.error respectively. In the resolves.ts file, the consolji package is imported instead of destructuring it to fix the issue of the package not being found. (c0b5ca5)

🎨 Styles

  • check: Format check command files with prettier This commit only includes formatting changes to the check command files using prettier. No functional changes were made. (e5241f6)
  • api: Fix indentation and whitespace in check.ts and usage.ts The changes in this commit are purely cosmetic, fixing indentation and whitespace in the check.ts and usage.ts files to improve readability and consistency. (93b46ce)
  • check: Replace prompts package with confirm function from @tyck/prompts This change replaces the prompts package with the confirm function from @tyck/prompts package. The confirm function is used to ask the user for confirmation before writing to package.json or installing dependencies. This change improves the code readability and reduces the package size. (16d4ead)

❀️ Contributors