Changelog

v0.0.216

Changes
  • build(deps): bump @aws-sdk/client-s3 from 3.168.0 to 3.171.0 (#2067)
  • build(deps): bump @aws-sdk/lib-storage from 3.168.0 to 3.171.0 (#2065)
  • build(deps): bump @babel/core from 7.19.0 to 7.19.1 (#2068)
  • build(deps): bump @babel/eslint-parser from 7.18.9 to 7.19.1 (#2066)
  • build(deps): bump eslint from 8.23.0 to 8.23.1 (#2060)
  • feat(code-gen): accept full axios config in api client (#2070)
  • fix(store): swallow fileVerifyAccessToken validation errors and always return 'invalidToken'.

v0.0.215

Changes
  • build(deps): bump @aws-sdk/client-s3 from 3.163.0 to 3.168.0 (#2051)
  • build(deps): bump @aws-sdk/lib-storage from 3.163.0 to 3.168.0 (#2045 , #2053)
  • examples(with-auth): create with-auth example (#2050)
  • feat(code-gen): openAPI import fixes for file uploads and string types (#2056)

v0.0.214

Changes
  • build(deps): bump @aws-sdk/client-s3 from 3.161.0 to 3.163.0 (#2030, #2034)
  • build(deps): bump @aws-sdk/lib-storage from 3.161.0 to 3.163.0 (#2031, #2033)
  • build(deps): bump @babel/core from 7.18.13 to 7.19.0 (#2043)
  • build(deps): bump pino from 8.4.2 to 8.5.0 (#2038)
  • build(deps): bump sharp from 0.30.7 to 0.31.0 (#2040)
  • chore(release): add package-lock to commit
  • feat(cli): add docker and graphviz checks to 'compas check-env' (#2044)
  • feat(create-compas): check template existence, always use pretty logger (#2037)
  • feat(create-compas): disable output of initial generate
  • feat(create-compas): run 'compas check-env' when creating a project
  • fix(store): explicit error on empty access token in fileVerifyAccessToken (#2036)
Breaking changes
  • deps: bump sharp from 0.30.7 to 0.31.0
    • Major version bump

v0.0.213

Changes
  • build(deps): bump @aws-sdk/client-s3 from 3.145.0 to 3.161.0
  • build(deps): bump @aws-sdk/lib-storage from 3.145.0 to 3.161.0
  • build(deps): bump @babel/core from 7.18.10 to 7.18.13 (#2003)
  • build(deps): bump dotenv from 16.0.1 to 16.0.2 (#2025)
  • build(deps): bump eslint from 8.21.0 to 8.23.0 (#1991, #2013)
  • build(deps): bump file-type from 17.1.6 to 18.0.0 (#2007)
  • build(deps): bump pino from 8.4.0 to 8.4.2 (#1988, #2000)
  • build(deps): bump vite from 2.9.8 to 2.9.15 (#2022)
  • chore: fix type issues after Typescript bump
  • chore: update package-lock.json
  • docs: simplify the README's of all the packages
  • docs(getting-started): use create-compas
  • examples(default): add code-gen setup (#1982)
  • examples(default): add migrations, services, entrypoints, tests (#1984)
  • examples(default): update README.md
  • feat(cli): add threadId to test runner logs (#2029)
  • feat(code-gen): add response data to response validator errors (#2021)
  • feat(code-gen): add user input to oneOf errors
  • feat(create-compas): generate on template init (#1983)
  • feat(store): disable notices by default in test database connections
Breaking changes
  • deps: bump file-type from 17.1.6 to 18.0.0
    • Major version bump

v0.0.212

Changes
  • build(deps): bump @babel/core from 7.18.9 to 7.18.10 (#1950)
  • build(deps): bump cron-parser from 4.5.0 to 4.6.0 (#1955)
  • build(deps): bump eslint from 8.20.0 to 8.21.0 (#1949)
  • build(deps): bump eslint-plugin-jsdoc from 39.3.3 to 39.3.6 (#1947, #1975)
  • build(deps): bump file-type from 17.1.4 to 17.1.6 (#1954)
  • build(deps): bump pino from 8.3.1 to 8.4.0 (#1958)
  • build(deps): bump recast from 0.21.1 to 0.21.2 (#1956)
  • chore: various housekeeping tasks (#1974)
  • chore(tests): improve stability of SQL time-based tests
  • chore(tests): remove unnecessary offset added to sql time offset (#1959)
  • feat(create-compas): init package (#1963)
  • feat(create-compas): add args parser (#1970)
  • feat(create-compas): determine and check the output directory (#1971)
  • feat(create-compas): download github repo support (#1973)
  • feat(docs): add Compas visuals (#1948)
  • feat(docs): readme visual update (#1952)
  • feat(store): replace minio with objectStorage and refactor file (#1951)
  • fix(code-gen): add content type headers for react native when uploading files (#1944)
  • internal(store): simplify postgres type usage (#1960)
Breaking changes
  • store: replace minio with objectStorage and refactor file
    • The Minio SDK is switched for the AWS SDK. All deployments using S3 compatible storage must be revalidated.
    • See the release notes for a comprehensive list of breaking changes.

For a detailed description and more details about this release, please read the release notes.

v0.0.211

Changes
  • build(deps): bump file-type from 17.1.2 to 17.1.4 (#1927 , #1936)
  • build(deps): bump pino from 8.2.0 to 8.3.1 (#1925 , #1941)
  • feat(cli): suppress info logs by default while running compas test. (#1937)
  • feat(stdlib): cleanup logger, more transparently use pino transports and destination (#1933)
  • feat(store): improve sessionStore signingKey validation error (#1938)
  • feat(store): support Postgres native environment variables (#1939)
Breaking changes
  • cli: suppress info logs by default.
    • When tests are executed via compas test, the info logs are suppressed by default. To enable all info logs, either use compas test --with-logs or run a specific test file with mainTestFn via compas run ./file.test.js .
  • stdlib: cleanup logger, more transparently use pino transports and destination
    • newLogger now only accepts a ctx. For stream, disableInfoLogger and disableErrorLogger please use loggerSetGlobalDestination.
    • printer can't be passed to newLogger, either use COMPAS_LOG_PRINTER to force one of the build-in printers, or use a custom destination via loggerSetGlobalDestination.
    • extendGlobalLoggerContext is renamed to loggerExtendGlobalContext.
    • setGlobalLoggerOptions is replaced with loggerSetGlobalDestination. This can be called before mainFn to make sure that even the initial logger is using your custom destination. Note that before mainFn, the .env files are not loaded yet.
    • mainFn will now determine the default printer (or destination) to be used if none is set already. It uses COMPAS_LOG_PRINTER, NODE_ENV and GITHUB_ACTIONS environment variables to switch between ndjson and pretty modes.
  • store: support Postgres native environment variables
    • process.env.PGDATABASE is used before process.env.APP_NAME as the database name for Postgres connections.

v0.0.210

Changes
  • build(deps): bump @babel/core from 7.18.6 to 7.18.9 (#1916)
  • build(deps): bump @babel/eslint-parser from 7.18.2 to 7.18.9 (#1918)
  • build(deps): bump c8 from 7.11.3 to 7.12.0 (#1920)
  • build(deps): bump eslint from 8.19.0 to 8.20.0 (#1915)
  • build(deps): bump pino from 8.1.0 to 8.2.0 (#1917)
  • chore(deps): update to @tanstack/react-query v4 and rename import references (#1924)
  • feat: add package.json exports (#1922)
  • feat(code-gen): add T.extendNamedObject() to add fields to named objects (#1923)
  • feat(compas): use sub entrypoints (compas/cli) instead of a single entrypoint (#1909)
  • feat(store): add placeholder image support & response type StoreFileResponse (#1912)
  • fix(code-gen): correctly generate types and api client for file uploads via React Native (#1910)
Breaking changes
  • deps: update to @tanstack/react-query v4 and rename import references
    • Dropped support for react-query, please install and update your usages with @tanstack/react-query.
  • compas: use sub entrypoints
    • Change any direct compas import to compas/pkg or @compas/pkg.

v0.0.209

Changes
  • build(deps): bump @types/koa from 2.13.4 to 2.13.5 (#1903)
  • build(deps): bump minio from 7.0.28 to 7.0.29 (#1900)
  • chore(ci): expand on matrix combinations for test and coverage runs (#1898)
  • feat(code-gen): create fetch, prefetch, etc extension on generated hooks (#1901)
  • feat(store): add jobFileCleanup (#1896)
  • feat(store): add jobSessionStoreCleanup (#1897)
  • feat(store): add jobSessionStoreProcessLeakedSession (#1899)
  • feat(store): support interpolating dates in stringifyQueryPart (#1890)

v0.0.208

Changes
  • build(deps): bump eslint from 8.18.0 to 8.19.0 (#1883)
  • fix(code-gen): correctly prioritze existing named items in the structure (#1885)

v0.0.207

Changes
  • build(deps): bump @babel/core from 7.18.5 to 7.18.6 (#1877)
  • build(deps): bump cron-parser from 4.4.0 to 4.5.0 (#1878)
  • chore: update README's
  • chore(cli): remove bench command (#1874)
  • feat(bench): detect flaky bench results
  • feat(bench): remove support for writing bench results to a file
  • feat(code-gen): add support for filters on crud list routes (#1880)
  • feat(code-gen): only select primary key in CRUD count builder (#1882)
  • feat(code-gen): support selecting a set of fields in the query builder (#1876)
  • feat(compas): initialize Compas package
  • perf(cli): only import chokidar and axios when used
  • perf(code-gen): improve performance of generated string and object validators
  • perf(code-gen): small speedups while generating
  • perf(stdlib): skip context merge for the logger
  • refactor(code-gen): format error strings inline (#1873)
Breaking changes
  • cli: remove bench command
    • Removed compas bench, use compas run ./path/to/file.bench.js to run your benchmarks.
  • bench: remove support for writing bench results to a file
    • The benchmark_output.txt is not created anymore when running benchmarks on CI.
  • stdlib: skip context merge for the logger
    • The ctx provided to newLogger and the values passed to extendGlobalLoggerContext are now longer deeply merged, but are shallowly merged.

v0.0.206

Changes
  • fix(server): check correct err status (#1872)

v0.0.205

Changes
  • build(deps): bump pino from 8.0.0 to 8.1.0 (#1870)
  • build(deps): bump sharp from 0.30.6 to 0.30.7 (#1869)
  • fix(server): ensure log level is inherited from AppError (#1868)
  • fix(server): more explicit conversion to AppError.serverError on unknown errors (#1871)

v0.0.204

Changes
  • fix(code-gen): import and use correct response validator (#1867)

v0.0.203

Changes
  • build(deps): bump eslint from 8.17.0 to 8.18.0 (#1863)
  • build(deps): bump eslint-plugin-jsdoc from 39.3.2 to 39.3.3 (#1864)
  • chore(docs): fix small nits related to crud
  • fix(code-gen): resolve out of group refs in router generator (#1866)

v0.0.202

Changes
  • build(deps): bump @babel/core from 7.18.2 to 7.18.5 (#1852)
  • build(deps): bump actions/setup-node from 3.2.0 to 3.3.0 (#1844)
  • build(deps): bump eslint from 8.16.0 to 8.17.0 (#1841)
  • build(deps): bump file-type from 17.1.1 to 17.1.2 (#1834)
  • build(deps): bump pino from 7.11.0 to 8.0.0 (#1833)
  • build(deps): bump prettier from 2.6.2 to 2.7.1 (#1854 , #1860)
  • chore(changelog): ignore @types/node updates
  • feat(code-gen): implement T.crud() (#1824)
  • chore(code-gen): add e2e tests for basic crud generation (#1846)
  • chore(code-gen): test crud inline + various fixes (#1847)
  • chore(code-gen): test crud nested + various fixes (#1848)
  • feat(code-gen): add check to prevent double oneToOne creation in crud (#1859)
  • feat(code-gen): add crud order by support (#1857)
  • feat(code-gen): add route invalidations to crud routes in a single group (#1850)
  • feat(code-gen): full dynamic primary key support in the crud generator (#1856)
  • feat(code-gen): support crud modifiers (#1862)
  • feat(docs): add CRUD docs
  • chore(types): fix type issues, let CI fail on the types
  • feat(cli): improve printing of 'actual' values in t.ok and t.notOk (#1837)
  • feat(cli): support ignoreDirectories in the loaded test/config.js
  • feat(code-gen): generalize compas order by types
  • feat(server): return stack and cause of errors when not in production (#1838)
  • fix(cli): don't load .test.js files when resolving CLI commands
  • fix(code-gen): correctly output invalidations using multiple params (#1851)
  • fix(code-gen): satisfy tsc
Breaking changes
  • deps: bump pino from 7.11.0 to 8.0.0
    • Major version bump
  • code-gen: generalize compas order by types
    • CompasSqlOrderBy and CompasSqlOrderByOptionalField are respectively named CompasOrderBy and CompasOrderByOptional
Documentation updates

v0.0.201

Changes
Breaking changes
  • code-gen: remove validator.anyOf errors
    • validator.anyOf is not an error key anymore. See #1827 for more information.
  • code-gen: return foundKeys and expectedKeys in `validator.o…
    • info.extraKey is replaced by info.expectedKeys and info.foundKeys in validator.object.strict errors. See #1828 for more information.

v0.0.200

Changes
  • build(deps): bump @types/node from 17.0.31 to 17.0.33 (#1798 , #1802)
  • build(deps): bump c8 from 7.11.2 to 7.11.3 (#1807)
  • build(deps): bump dotenv from 16.0.0 to 16.0.1 (#1799)
  • build(deps): bump postgres from 3.1.0 to 3.2.2 (#1806)
  • chore(changelog): support keywords with and without trailing S (#1805)
  • feat(store,code-gen): support image/avif in sendTransformedImage (#1804)
  • fix(code-gen): support numbers in group names like before (#1803)

v0.0.199

Changes
  • fix(cli): correctly use new code-gen structure helpers

v0.0.198

Changes
  • feat(code-gen): remove type as a reserved group name

v0.0.197

Changes
  • build(deps): bump @babel/core from 7.17.9 to 7.17.10 (#1780)
  • build(deps): bump @types/formidable from 2.0.4 to 2.0.5 (#1784)
  • build(deps): bump @types/node from 17.0.25 to 17.0.31 (#1754 , #1762, #1768 , #1774, #1782)
  • build(deps): bump cron-parser from 4.3.0 to 4.4.0 (#1781)
  • build(deps): bump eslint from 8.13.0 to 8.15.0 (#1753 , #1794)
  • build(deps): bump eslint-plugin-jsdoc from 39.2.7 to 39.2.9 (#1751 , #1759)
  • build(deps): bump github/codeql-action from 1 to 2 (#1763)
  • build(deps): bump minio from 7.0.26 to 7.0.28 (#1760)
  • build(deps): bump pino from 7.10.0 to 7.11.0 (#1766)
  • build(deps): bump postgres from 2.0.0-beta.11 to 3.1.0 (#1750)
  • build(deps): bump recast from 0.20.5 to 0.21.1 (#1772)
  • chore: migrate from Yarn to NPM workspaces (#1779)
  • chore: support Node.js 18 (#1778)
  • chore: update author + contributor fields
  • chore(code-gen): refactor internal structure helpers (#1789 ,#1790,#1791)
  • chore(code-gen): skip generating empty type for defined routes
  • feat(code-gen): add explicit error for empty T.string().oneOf() values (#1773)
  • feat(code-gen): explicit error on invalid group and type names (#1787)
  • feat(code-gen): hard error on duplicate route param (#1796)
  • feat(code-gen): only report first error in 'anyOf' validators (#1770)
  • feat(code-gen): support references in T.pick and T.omit (#1788)
  • feat(server): remove leakError support (#1769)
  • feat(stdlib): support COMPAS_LOG_PRINTER env variable to select a log printer (#1785)
  • feat(store): refactor job queue worker (#1776)
  • fix(docs): fix syntax error in initial migration
Breaking changes
  • deps: bump postgres from 2.0.0-beta.11 to 3.1.0
  • all: support Node.js 18
    • POSTGRES_HOST and MINIO_URI should use 127.0.0.1 instead of localhost when using Node.js 18+
    • Axios will use the global FormData, resulting in a one time process warning which is automatically logged as an error. Since Axios also includes its own form-data package for older Node.js versions, you can remove the explicit the dependency on it.
  • code-gen: move comment formatter and internal field remove to structure helpers
    • type is now a reserved group name
  • code-gen: support references in T.pick and T.omit
    • T.omit() and T.pick() now only copy or remove object keys and further use their own options for things like .optional(), .default() and .loose()
  • server: remove leakError support
    • The stack and cause properties are never sent to the client.
    • Error responses should have a requestId property, referencing to the logs for the stack and cause properties.
  • store: refactor job queue worker
    • All of addJobToQueue, addEventToQueue and addJobWithCustomTimeoutToQueue are replaced with queueWorkerAddJob
    • new JobQueueWorker() including the start & stop methods are replaced by queueWorkerCreate
    • JobQueueWorker#clean no longer exists, see jobQueueCleanup for a replacement
    • JobQueueWorker#pendingQueueSize no longer exists, see jobQueueInsights
    • addRecurringJobToQueue is removed, and replaced with cron based scheduler, see queueWorkerRegisterCronJobs
    • Remove all existing recurring jobs and their created jobs with the following migration:
WITH
  recurring_jobs AS (
    SELECT DISTINCT data ->> 'name' AS "recurringName" FROM "job" WHERE "name" = 'compas.job.recurring'
  ),
  removed_recurring_jobs AS (DELETE FROM "job" WHERE "name" = 'compas.job.recurring'
  )
DELETE
FROM "job"
WHERE
    "name" IN (
    SELECT "recurringName"
    FROM recurring_jobs
  );

v0.0.196

Changes
  • build(deps): bump @babel/core from 7.17.8 to 7.17.9 (#1709)
  • build(deps): bump @types/minio from 7.0.12 to 7.0.13 (#1724)
  • build(deps): bump @types/node from 17.0.22 to 17.0.25 (#1670, #1730, #1737)
  • build(deps): bump actions/setup-node from 3.0.0 to 3.1.1 (#1698, #1723)
  • build(deps): bump c8 from 7.11.0 to 7.11.2 (#1742)
  • build(deps): bump codecov/codecov-action from 2.1.0 to 3 (#1703)
  • build(deps): bump crc from 4.1.0 to 4.1.1 (#1718)
  • build(deps): bump eslint from 8.11.0 to 8.13.0 (#1679, #1720)
  • build(deps): bump eslint-plugin-import from 2.25.4 to 2.26.0 (#1701)
  • build(deps): bump eslint-plugin-jsdoc from 38.0.6 to 39.2.7 (#1681, #1682, #1683, #1697, #1710, #1717, #1722, #1726, #1727, #1732, #1738, #1740, #1741, #1745)
  • build(deps): bump minimist from 1.2.5 to 1.2.6 (#1672)
  • build(deps): bump pino from 7.9.2 to 7.10.0 (#1716)
  • build(deps): bump prettier from 2.6.0 to 2.6.2 (#1677, #1696)
  • build(deps): bump sharp from 0.30.3 to 0.30.4 (#1736)
  • chore(eslint-plugin): better suggestion message for check-event-name
  • chore(store): drop fileGroup support (#1714)
  • feat(cli): remove enforceSingleAssertion option from test config (#1690)
  • feat(code-gen): cleanup soft delete support (#1691)
  • feat(eslint-plugin): add check-event-name rule (#1734)
  • feat(server): handle file upload size limit errors (#1748)
  • feat(stdlib): supported already formatted error in AppError#format (#1749)
  • feat(store): drop soft deletes on file and file group (#1693)
  • fix(cli): include failing assertions of subtests in failing test (#1689)
  • fix(code-gen): import structure without cache in generateTypes and generateOpenAPI (#1715)
  • fix(eslint-plugin): only error enforce-event-stop if eventStart is called (#1729)
  • fix(eslint-plugin): register enforce-event-stop as the correct rule type
  • fix(store): correct type partial for newMinioClient
Breaking changes
  • deps: bump eslint-plugin-jsdoc from 38.0.6 to 39.2.7
    • Major version bump
  • store: drop soft deletes on file and file group
    • File and fileGroup are no longer soft deletable. If you need this, you should reference them via a custom entity that is soft deletable.
    • To drop the columns, create the following migration:
    ALTER TABLE "file" DROP COLUMN "deletedAt" CASCADE;
    ALTER TABLE "fileGroup" DROP COLUMN "deletedAt" CASCADE;
    
  • store: drop fileGroup support
    • Any reference to fileGroup should be removed. If you need the exact behaviour that it had, please check the removed code via its pull request link above. Most notably: gen/store.js and packages/store/src/file-group.js.
    • Run the following SQL in a migration:
    DROP TABLE "fileGroup" CASCADE;
    
  • cli: remove enforceSingleAssertion option from test config
    • All tests now require at least a single assertion or registration of a subtest
  • code-gen: cleanup soft delete support
    • Entities that use soft delete should use queries.entityUpdate(sql, { update: { deletedAt: new Date() }, where, }) instead of queries.entityDelete
    • The generated queries.entityDeletePermanent is removed, and instead queries.entityDelete will always permanently delete a record, even if it was soft deleted.
  • eslint-plugin: add check-event-name rule
    • Enabled the @compas/check-event-name rule in @compas/full ESLint config. It validates that the second argument passed to eventStart can be derived from the function name.

v0.0.195

Changes
  • build(deps): bump @types/node from 17.0.21 to 17.0.22 (#1667)
  • build(deps): bump pino from 7.9.1 to 7.9.2 (#1668)
  • feat(code-gen): ensure route path trailing slash is correctly taken over from OpenAPI import (#1669)

v0.0.194

Changes
  • build(deps): bump @babel/core from 7.17.7 to 7.17.8 (#1665)
  • build(deps): bump eslint-plugin-jsdoc from 38.0.4 to 38.0.6 (#1664)
  • fix(eslint-plugin): skip blocks outside functions in enforce-event-stop

v0.0.193

Changes
  • fix(eslint-plugin): don't suggest enforce-event-stop after code paths that can leave a function (#1663)

v0.0.192

Changes
  • build(deps): bump @babel/core from 7.17.5 to 7.17.7 (#1655)
  • build(deps): bump actions/checkout from 2 to 3 (#1639)
  • build(deps): bump EndBug/add-and-commit from 8 to 9 (#1651)
  • build(deps): bump eslint from 8.10.0 to 8.11.0 (#1649)
  • build(deps): bump eslint-config-prettier from 8.4.0 to 8.5.0 (#1642)
  • build(deps): bump eslint-plugin-jsdoc from 37.9.4 to 38.0.4 (#1637, #1638, #1643, #1647, #1650, #1653)
  • build(deps): bump mime-types from 2.1.34 to 2.1.35 (#1648)
  • build(deps): bump pino from 7.8.0 to 7.9.1 (#1645, #1658)
  • build(deps): bump prettier from 2.5.1 to 2.6.0 (#1657)
  • build(deps): bump sharp from 0.30.1 to 0.30.3 (#1641, #1654)
  • chore: add LICENSE to packages (#1656)
  • example(session-handling-frontend): minor fixes from real project usage
  • feat(cli): add lint-config-to-eslint-plugin code-mod (#1660)
  • feat(eslint-plugin): turn lint-config into working eslint-plugin (#1659)
  • fix(cli): export correct command definition type
  • fix(code-gen): correctly shake out unused types in dumped api structure (#1652)
Breaking changes
  • deps: bump eslint-plugin-jsdoc from 37.9.4 to 38.0.4
    • Major version bump
  • eslint-plugin: turn lint-config into working eslint-plugin
    • Removed the @compas/lint-config package. Use compas code-mod exec --name lint-config-to-eslint-plugin to fix your configurations.
    • Added a default rule to enforce calling eventStop in async functions that accept event as their first parameter. This can be disabled via rules: { "@compas/enforce-event-stop": "off" } in your eslint configuration.

v0.0.191

Changes
  • build(deps): bump eslint from 8.9.0 to 8.10.0 (#1635)
  • build(deps): bump prismjs from 1.25.0 to 1.27.0 (#1629)
  • chore: add initial example and sync job for docs (#1630)
  • example(session-handling-frontend): cleanup function signatures
  • feat(cli,stdlib,store): remove cookie and proxy support (#1634)
  • feat(example): add session handling example (#1632)
  • feat(example): add session handling frontend example (#1633)
  • feat(store): add support for file access tokens (#1631)
Breaking changes
  • cli,stdlib,store: remove cookie and proxy support
    • Remove the compas proxy command
    • Remove calculateCorsUrlFromAppUrl and calculateCookieUrlFromAppUrl from @compas/stdlib
    • Remove cookie support from sessionTransport* functions. Including the options on sessionTransportOptions and sessionTransportAddAsCookiesToContext
Documentation updates
  • Improved file-handling docs, and added information about singed file urls.
  • Add an examples page, auto updated with examples that are added to the Compas repo.

v0.0.190

Changes
  • fix(store): localhost cookies should work now

v0.0.189

Changes
  • build(deps): bump @types/node from 17.0.19 to 17.0.21 (#1627)
  • build(deps): bump actions/setup-node from 2 to 3.0.0 (#1628)
  • fix(store): set cookie on origin 'host' instead of 'hostname' in the session-transport

v0.0.188

Changes
  • fix(store): correctly handle generated array columns in update helper

v0.0.187

Changes
  • build(deps): bump @types/node from 17.0.18 to 17.0.19 (#1624)
  • build(deps): bump eslint-config-prettier from 8.3.0 to 8.4.0 (#1622)
  • chore(ci): add permissions to CodeQL job
  • chore(docs): remove last updated from pages (#1620)
  • docs(migrate): move docs to the migrate command and reference it (#1621)
  • fix(code-gen): handle 'undefined' keys and update objects coming from the validators correctly (#1626)

v0.0.186

Changes
  • build(deps): bump @babel/core from 7.17.2 to 7.17.5 (#1612, #1615)
  • build(deps): bump @types/node from 17.0.16 to 17.0.18 (#1598, #1609)
  • build(deps): bump eslint from 8.8.0 to 8.9.0 (#1605)
  • build(deps): bump eslint-plugin-jsdoc from 37.8.0 to 37.9.4 (#1596, #1607, #1613, #1614, #1617)
  • build(deps): bump follow-redirects from 1.14.7 to 1.14.8 (#1603)
  • build(deps): bump pino from 7.6.5 to 7.8.0 (#1611)
  • build(deps): bump sharp from 0.30.0 to 0.30.1 (#1597)
  • chore(types): remove a bunch of file global type imports (#1618)
  • feat(code-gen): support atomic updates and dynamic return types in generated update queries (#1601)
  • fix(cli): make sure that --serial runs tests without worker threads (#1599)
  • test(code-gen): jsonb null insert behavior (#1602)
Breaking changes
  • code-gen: support atomic updates and dynamic return types in generated update queries
    • Various keys starting with $ are recursively reserved in T.object() types with .enableQueries().
    • Updated signature for queries.entityUpdate. Providing better intent and less prone to bugs by naming the keys. See compas code-mod list for the update-queries-signature-change code-mod which can automatically fix most cases. Note that it may add some extra whitespace, this needs to be cleaned up manually.
    • queries.entityUpdate by default does not return any values anymore. See the docs for more information.
    • Removed xxxUpdateSet functions from the generator output.
    • Stricter checks on update queries if both where and update are specified
Documentation updates
  • Added more docs to Code generator SQL with examples for where-clauses, atomic updates and docs about relations.

v0.0.185

Changes
  • build(deps): bump @babel/core from 7.17.0 to 7.17.2 (#1592)
  • build(deps): bump @types/node from 17.0.14 to 17.0.16 (#1582 , #1589)
  • build(deps): bump eslint-plugin-jsdoc from 37.7.1 to 37.8.0 (#1590)
  • chore(dependabot): add default reviewer (#1583)
  • feat(cli): add compas watch [..sub-commands] and --watch (#1587)
  • feat(code-gen): support for reference types in query and params in openApi exporter (#1580)
  • feat(lint-config): disable labels and optional function parameters should be last (#1584)
  • fix(cli): add completions for all commands under 'help' (#1585)
  • fix(cli): remove error log if command directory is not found (#1593)
  • fix(test): catch errors from global setup and teardown (#1594)
Breaking changes
  • lint-config: disable labels and optional functionn parameters last
  • store: disable labels and optional functionn parameters last
    • Changed parameter order of createTestPostgresDatabase, and nested verboseSql in to an object.
Documentation updates

v0.0.184

Changes
  • build(deps): bump @babel/core from 7.16.10 to 7.17.0 (#1550, #1569)
  • build(deps): bump @babel/eslint-parser from 7.16.5 to 7.17.0 (#1571)
  • build(deps): bump @types/formidable from 2.0.3 to 2.0.4 (#1560)
  • build(deps): bump @types/minio from 7.0.11 to 7.0.12 (#1558)
  • build(deps): bump @types/node from 17.0.10 to 17.0.14 (#1554, #1559, #1567)
  • build(deps): bump dotenv from 14.2.0 to 16.0.0 (#1552, #1556, #1566, #1570)
  • build(deps): bump eslint from 8.7.0 to 8.8.0 (#1564)
  • build(deps): bump eslint-plugin-jsdoc from 37.6.3 to 37.7.1 (#1557, #1576)
  • build(deps): bump pino from 7.6.4 to 7.6.5 (#1565)
  • build(deps): bump sharp from 0.29.3 to 0.30.0 (#1568)
  • build(deps): bump simple-get from 4.0.0 to 4.0.1 (#1561)
  • feat(cli): improve lint performance (#1579)
  • feat(code-gen): print docs consistently (#1563)
  • fix(cli): add '--lint-config' to '--all'
  • fix(cli): migrate keep-alive should use connection-settings (#1574)
  • fix(server): update docs on 'disableHeaders'
  • test(store): fix flaky session-store tests (#1573)
Breaking changes
  • deps: bump dotenv from 14.2.0 to 16.0.0
    • Major version bump
  • deps: bump sharp from 0.29.3 to 0.30.0
    • Major version bump
  • cli: improve lint performance
    • node_modules are not automatically ignored by ESLint, but should be added to your .eslintignore
    • The default .eslintignore has been changed to ignore files in generated directories. Run compas init --lint-config to update the file.

v0.0.183

Changes
  • build(deps): bump @babel/core from 7.16.7 to 7.16.10 (#1538)
  • build(deps): bump @types/node from 17.0.9 to 17.0.10 (#1537)
  • build(deps): bump eslint-plugin-jsdoc from 37.6.1 to 37.6.3 (#1542, #1546)
  • build(deps): bump nanoid from 3.1.30 to 3.2.0 (#1544)
  • build(deps): bump pino from 7.6.3 to 7.6.4 (#1541)
  • feat(cli): add compas completions (#1526)
  • feat(code-gen): generate errors on too much inserts (#1547)
  • feat(lint-config): add preferredTypes for primitives, objects and records (#1548)
  • feat(stdlib): add setGlobalLoggerOptions and extendGlobalLoggerContext (#1549)
Breaking changes
  • lint-config: add preferredTypes for primitives, objects and records
    • Linter prefers object over Object, boolean over Boolean, Record<string,number>[] over Array<Object<string, number>> etc. The linter will try to autofix this, but may require multiple runs.
  • stdlib: add setGlobalLoggerOptions and 'extendGlobalLoggerContext'
    • Removed support for pinoOption via newLogger. Pass these to setGlobalLoggerOptions as pinoTransport and pinoDestination.

v0.0.182

Changes
  • build(deps): bump @types/node from 17.0.8 to 17.0.9 (#1532)
  • build(deps): bump dotenv from 10.0.0 to 14.2.0 (#1514, #1527, #1533)
  • build(deps): bump eslint from 8.6.0 to 8.7.0 (#1529)
  • build(deps): bump follow-redirects from 1.14.6 to 1.14.7 (#1521)
  • build(deps): bump is-animated from 2.0.1 to 2.0.2 (#1522)
  • build(deps): bump minio from 7.0.25 to 7.0.26 (#1519)
  • build(deps): bump pino from 7.6.2 to 7.6.3 (#1513)
  • docs(route-invalidation): add route-invalidation documentation (#1531)
  • feat(cli): add --gitignore and --all support to compas init (#1530)
  • feat(cli): add informational logs to lint output (#1524)
  • feat(code-gen): openApi generator more strict and extend (#1523)
  • feat(code-gen): support route invalidations (#1515, #1534)
Breaking changes
  • deps: bump dotenv from 10.0.0 to 14.2.0
    • Major version bump
  • code-gen: openApi generator more strict and extend
    • app.generateOpenApi accepts openApiExtensions and routeExtensions instead of openApiOptions

v0.0.181

Changes
  • build(deps): bump eslint-plugin-jsdoc from 37.5.1 to 37.6.1 (#1511)
  • chore(create-release): fix cliDefinition
  • feat(cli): use ESLint cache, default enable JSDoc rules for compas lint (#1510)
  • fix(cli): catch import errors when loading project level commands (#1512)
Breaking changes
  • cli: use ESLint cache, default enable JSDoc rules for compas lint
    • JSDoc related ESLint rules are enabled by default locally now, they were already enabled on CI=true (which is set by most CI platforms).
    • Add .cache to your .gitignore. Or specify another ESLint cache directory via --eslint-cache-location.

v0.0.180

Changes
  • build(deps): bump @babel/core from 7.16.0 to 7.16.7 (#1418 , #1482)
  • build(deps): bump @babel/eslint-parser from 7.16.3 to 7.16.5 (#1417)
  • build(deps): bump @types/formidable from 2.0.0 to 2.0.3 (#1455 , #1475, #1494)
  • build(deps): bump @types/node from 16.11.12 to 17.0.8 (#1427 , #1430, #1445 , #1447, #1450 , #1454, #1458 , #1495, #1496 , #1498)
  • build(deps): bump c8 from 7.10.0 to 7.11.0 (#1481)
  • build(deps): bump crc from 3.8.0 to 4.1.0 (#1449 , #1491)
  • build(deps): bump eslint from 8.4.1 to 8.6.0 (#1439 , #1492)
  • build(deps): bump eslint-plugin-import from 2.25.3 to 2.25.4 (#1493)
  • build(deps): bump eslint-plugin-jsdoc from 37.2.0 to 37.5.1 (#1423 , #1431, #1440 , #1444, #1446 , #1487, #1497)
  • build(deps): bump file-type from 17.0.0 to 17.1.1 (#1425 , #1436, #1471)
  • build(deps): bump pino from 7.5.1 to 7.6.2 (#1448 , #1452, #1470)
  • chore(code-gen,store): let sql generator tests use e2e infra (#1505)
  • chore(code-gen): let benchmarks use e2e infra for code-gen (#1502)
  • chore(code-gen): let server, client and open api generator tests use e2e infra for code-gen (#1504)
  • chore(code-gen): move validator tests to e2e tests (#1501)
  • chore(docs): remove api reference generator (#1480)
  • docs(features): add extending the cli docs
  • docs(releases): start with 0.0.180 release notes
  • feat(cli): refactor CLI (#1456, #1459, #1460, #1467, #1468, #1469, #1474, #1476, #1477, #1479, #1484) #1485) #1486)
  • feat(cli): add '--lint-config' to compas init (#1490)
  • feat(cli): add 'compas check-env' command (#1483)
  • feat(code-gen,store): migrate query builder to generator helper (#1499)
  • feat(code-gen): add check to unique relation references (#1442)
  • feat(code-gen): make reactQuery generator compatible with react-query@v4 (#1435)
  • feat(code-gen): support date / time only types (#1500)
  • feat(code-gen): use primary key type in query-result union types (#1506)
  • feat(docs): add CLI reference to the docs (#1489)
  • feat(server): add options to log middleware to log event name, query and param objects (#1488)
  • fix(store): sendTransformedImage requires width higher than zero (#1434)
  • fix(store): short circuit image transformer on empty files (#1420)
Breaking changes
  • deps: bump @types/node from 16.11.12 to 17.0.8
    • Major version bump
  • deps: bump crc from 3.8.0 to 4.1.0
    • Major version bump
  • cli: promote new cli to be used
    • See the release notes for more information
  • code-gen,store: migrate query builder to generator helper
    • queryXxx().execRaw has some output differences, verify your usages.
  • code-gen: make reactQuery generator compatible with react-query@v4
    • The useFooBar.baseKey() functions now returns an array, and is spread when used in useFooBar.queryKey()

For a detailed description and more details about this release, please read the release notes.

v0.0.179

Changes
  • build(deps): bump @types/node from 16.11.11 to 16.11.12 (#1407)
  • build(deps): bump eslint from 8.3.0 to 8.4.1 (#1400, #1403)
  • build(deps): bump eslint-plugin-jsdoc from 37.1.0 to 37.2.0 (#1410)
  • build(deps): bump minio from 7.0.18 to 7.0.25 (#1406)
  • build(deps): bump prettier from 2.5.0 to 2.5.1 (#1399)
  • chore(server): remove koa-session as dependency
  • feat(stdlib): add config loader (#1415)
  • feat(store): skip eventStop on Compas internal handled jobs (#1411)
  • fix(store): fix spacing of 'where' generator helper when working with 'via'. (#1416)

v0.0.178

Changes
  • chore(changelog): fix matcher for subject and message
  • chore(ci): remove bench action from PR's
  • chore(cli,server,store): remove old session setup
  • chore(code-gen): remove @compas/cli as a dependency
  • feat(code-gen,store): remove generated where.exists (#1396)
  • feat(code-gen,store): support viaXxx in where clause (#1395)
  • feat(code-gen): remove 'via' traversers from the query builders (#1397)
  • feat(store): infer and validate content-type support in createOrUpdateFile (#1392)
Breaking changes
  • cli,server,store: remove old session setup
    • Removed both the session middleware and newSessionStore. And should be replaced with the new session-store and session-transport. See the docs for more information.
    • Create the following migration to clean up the old table:
    DROP TABLE IF EXISTS "session" CASCADE;
    
  • code-gen,store: remove generated where.exists
    • Removed xxxExists from being generated with the sql where clause generator. They can be replaced with viaXxx now available in the where clause generator.
  • code-gen: remove 'via' traversers from the query builders
    • This should be done in the new where.viaXxx. Giving more flexibility by combining it with where.$or and allowed usage in update and delete queries.
    • Note that the query builder functions validate their inputs, so if you have decent test coverage, your tests should be able to catch most of your usages for you.

v0.0.177

Changes
  • build(deps): bump @types/node from 16.11.10 to 16.11.11 (#1385)
  • build(deps): bump eslint-plugin-jsdoc from 37.0.3 to 37.1.0 (#1390)
  • build(deps): bump pino from 7.4.1 to 7.5.1 (#1384, #1388)
  • docs(session-handling): mention default of 'enableCookieTransport'
  • feat(code-gen): add SessionTransportSettings to dumpCompasTypes
  • feat(code-gen): validate defaultGroup when extending with OpenAPI (#1391)
  • fix(code-gen): don't report leaked sessions if the complete session is invalidated (#1387)

v0.0.176

Changes
  • build(deps): bump @types/node from 16.11.7 to 16.11.10 (#1362, #1369, #1375)
  • build(deps): bump eslint from 8.2.0 to 8.3.0 (#1371)
  • build(deps): bump pino from 7.2.0 to 7.4.1 (#1363, #1374, #1377)
  • build(deps): bump postgres from 2.0.0-beta.10 to 2.0.0-beta.11 (#1358)
  • build(deps): bump prettier from 2.4.1 to 2.5.0 (#1381)
  • chore(code-gen): remove unnecessary logs in react-query generator (#1364)
  • feat(code-gen): rename loadFromRemote to loadApiStructureFromRemote (#1365)
  • feat(code-gen): support declareGlobalTypes: false as generate option for packages (#1367)
  • feat(store): add session transports (#1380)
  • fix(code-gen): fix types of validated files in the router (#1366)
  • fix(code-gen): openapi exporter support for multiple methods within the same path (#1361)
  • fix(code-gen): pickType error typo fix (#1357)
Breaking changes
  • code-gen: rename loadFromRemote to loadApiStructureFromRemote

Read more on session transports in the docs.

Thanks to @tjonger and @kaliumxyz for their contributions!

v0.0.175

Changes
  • feat(code-gen): replace whole structure with api subset (#1353)
  • fix(code-gen): fix issue with references (and resolve references within structure) (#1355)

v0.0.174

Changes
  • build(deps): bump sharp from 0.29.2 to 0.29.3 (#1349)
  • feat(store): add JobQueueWorker.clean() method (#1347)
  • feat(store): add unsafeIgnoreSorting as a queue worker option (#1345)
  • feat(store): add index on job.updatedAt
  • feat(store): remove averageTimeToCompletion from JobQueueWorker (#1346)
Breaking changes
  • store: add index on job.updatedAt
    • Add the following index in a sql migration:
    CREATE INDEX IF NOT EXISTS "jobIsCompleteUpdatedAt" ON "job" ("isComplete", "updatedAt") WHERE "isComplete" IS TRUE;
    
  • store: remove averageTimeToCompletion from JobQueueWorker

v0.0.173

Changes
  • build(deps): bump @babel/eslint-parser from 7.16.0 to 7.16.3 (#1340)
  • build(deps): bump @types/node from 16.11.6 to 16.11.7 (#1339)
  • build(deps): bump eslint-plugin-import from 2.25.2 to 2.25.3 (#1342)
  • build(deps): bump pino from 7.1.0 to 7.2.0 (#1341)
  • chore(docs): add release v0.0.172 to the sidebar
  • fix(store): saving of transforms in sendTransformedImage (#1343)

v0.0.172

Changes
  • build(deps): bump @types/formidable from 1.2.4 to 2.0.0 (#1332)
  • build(deps): bump eslint from 8.1.0 to 8.2.0 (#1331)
  • build(deps): bump pino from 7.0.5 to 7.1.0 (#1329)
  • code-gen: replace includeReferenceTypes with non recursive one (#1327)
  • docs(migrations): add session store to store migrations
  • feat(lint-config): change env from es2020 to es2021 (#1333)
  • feat(stdlib): support formatting Aggregate errors (#1334)
  • feat(store): add JWT based session store support (#1302)
  • fix(store): fix types of session-store functions (#1336)
Breaking changes
  • deps: bump @types/formidable from 1.2.4 to 2.0.0
    • Major version bump
  • stdlib: support formatting Aggregate errors
    • Renamed AppError#originalError to AppError#cause
    • Format also uses cause as the key when formatting AppError instead of originalError
  • store: add JWT based session store support
    • Includes a migration, see the release notes

For a detailed description and more details about this release, please read the release notes.

v0.0.171

Changes
  • build(deps): bump @babel/core from 7.15.8 to 7.16.0 (#1314)
  • build(deps): bump @babel/eslint-parser from 7.15.8 to 7.16.0 (#1315)
  • build(deps): bump @types/node from 16.11.1 to 16.11.6 (#1285 , #1291, #1299)
  • build(deps): bump eslint from 8.0.1 to 8.1.0 (#1292)
  • build(deps): bump eslint-plugin-jsdoc from 36.1.1 to 37.0.3 (#1290 , #1298, #1303)
  • build(deps): bump formidable from 2.0.0-canary.20200504.1 to 2.0.1 (#1318)
  • build(deps): bump pino from 7.0.3 to 7.0.5 (#1297)
  • build(deps): bump sharp from 0.29.1 to 0.29.2 (#1284)
  • chore(ci): run tests on Node.js 17 (#1295)
  • chore(docs): fix Node.js version in README's
  • chore(docs): fix typo in command on getting started page (#1287)
  • feat(code-gen): implement openApi spec exporter (#1283)
  • feat(code-gen): throw error on unused group name (#1288)
  • feat(code-gen): use abort signal in api clients (#1319)
  • feat(stdlib): add AppError#format support for various primitives (#1325)
  • fix(code-gen): add React import to reactQuery template (#1320)
  • fix(code-gen): handle optional object values that are references (#1311)
  • fix(code-gen): throw early error on missing arguments to T.reference() (#1310)
  • fix(stdlib): fix TS error on logger destination usage
Breaking changes
  • deps: bump eslint-plugin-jsdoc from 36.1.1 to 37.0.3
    • Major version bump
  • deps: bump formidable from 2.0.0-canary.20200504.1 to 2.0.1
    • Renamed properties on ctx.validatedFiles.
    • ctx.validatedFiles.xxx.path -> ctx.validatedFiles.xxx.filepath
    • ctx.validatedFiles.xxx.name -> ctx.validatedFiles.xxx.originalFilename
    • ctx.validatedFiles.xxx.type -> ctx.validatedFiles.xxx.mimetype
  • code-gen: use abort signal in api clients
    • Removed the cancelToken support that where passed via react-query options.
    • Generated hooks automatically pass the react-query based signal to the api client functions.
    • Requires react-query 3.30.0 or higher

For a detailed description and more details about this release, please read the release notes.

Thanks to @tjonger and @bjarn for their contributions!

v0.0.170

Changes
  • build(deps): bump @types/minio from 7.0.10 to 7.0.11 (#1277)
  • build(deps): bump koa from 2.13.3 to 2.13.4 (#1279)
  • build(deps): bump pino from 7.0.2 to 7.0.3 (#1278)
  • fix(store): matcher name for iLike was incorrect in where generator

v0.0.169

Changes
  • fix(store): fix interpolation after where.includeNotNull (#1276)

v0.0.168

Changes
  • bench(stdlib): add better logger benchmarks
  • build(deps): bump @babel/core from 7.15.5 to 7.15.8 (#1249)
  • build(deps): bump @babel/eslint-parser from 7.15.7 to 7.15.8 (#1250)
  • build(deps): bump @types/node from 16.10.2 to 16.11.1 (#1245, #1262, #1266, #1268, #1272)
  • build(deps): bump c8 from 7.9.0 to 7.10.0 (#1248)
  • build(deps): bump eslint from 7.32.0 to 8.0.1 (#1265)
  • build(deps): bump eslint-plugin-import from 2.24.2 to 2.25.2 (#1263)
  • build(deps): bump eslint-plugin-jsdoc from 36.1.0 to 36.1.1 (#1252)
  • chore(changelog): fix matcher on multiple git commit subjects
  • feat(code-gen,store): use a runtime helper to build the where clause (#1273)
  • feat(docs): add router & api client generator documents (#1254)
  • feat(docs): add some more body to the code-gen api doc.
  • feat(stdlib): use Pino as ndjson logger (#1274)
  • fix(code-gen): limit body() usage on R.delete() (#1256)
  • fix(server): redo leakError in de error handler middleware (#1267)
Breaking changes
  • deps: bump eslint from 7.32.0 to 8.0.1
    • Major version bump
  • stdlib: use Pino as ndjson logger
    • The production log writer is replaced.
    • ndjson log lines contain a time field with milliseconds since epoch instead of a timestamp field with an ISO-8601 string.
  • server: redo leakError in de error handler middleware
    • leakError: true is ignored if a custom onAppError is provided

v0.0.167

Changes
  • feat(code-gen): make date validator more flexible (#1241)
  • feat(server): log middleware also handles Koa error events (#1239)
  • test(server): add more e2e tests for sendFile (#1238)

v0.0.166

Changes
  • build(deps): bump @types/node from 16.10.1 to 16.10.2 (#1233)
  • build(deps): bump postgres from 2.0.0-beta.9 to 2.0.0-beta.10 (#1232)
  • chore(deps): revert minio from 7.0.19 to 7.0.18
  • feat(code-gen,server): change requestId behaviour (#1235)
Breaking changes
  • code-gen: change requestId behaviour
    • Removed addRequestIdInterceptors from $generatedDir/common/apiClient

v0.0.165

Changes
Breaking changes
  • store: add job name filter to JobQueueWorker
    • Removed support for specifying a specific job name in the JobQueueWorker constructor. Please migrate to the { includedNames: ["job.name"] } syntax.

v0.0.164

Changes
  • fix(cli,server): access-control-request-headers is not always set in a cors preflight (#1201)

v0.0.163

Changes
  • build(deps): bump @types/formidable from 1.2.3 to 1.2.4 (#1195)
  • fix(code-gen): correct reuse of any validators (#1199)

v0.0.162

Changes
  • build(deps): bump @types/node from 16.7.12 to 16.9.1 (#1173, #1179, #1186)
  • build(deps): bump c8 from 7.8.0 to 7.9.0 (#1187)
  • build(deps): bump eslint-plugin-jsdoc from 36.0.8 to 36.1.0 (#1174)
  • build(deps): bump prettier from 2.3.2 to 2.4.0 (#1184)
  • build(deps): bump sharp from 0.29.0 to 0.29.1 (#1171)
  • feat(code-gen): don't output params & data if not used in the api client (#1193)
  • feat(code-gen): redo options.enabled of react-query generator (#1194)
  • fix(code-gen): error when multiple relations use the same ownKey (#1192)
  • fix(code-gen): throw explicit error on empty sql update clause (#1191)
  • fix(docs): typo in session handling
  • fix(store): syncDeletedFiles permanently delete transformed (#1182)

v0.0.161

Changes
  • fix(code-gen): validation of optional references in object types (#1169)

v0.0.160

Changes
  • build(deps): bump @types/node from 16.7.10 to 16.7.12 (#1167)
  • fix(server): use correct condition for session renew behavior

v0.0.159

Changes
  • feat(server): support renewing sessions every x seconds (#1166)

v0.0.158

Changes
  • build(deps): bump @babel/core from 7.15.0 to 7.15.5 (#1160, #1163)
  • build(deps): bump @babel/eslint-parser from 7.15.0 to 7.15.4 (#1159)
  • build(deps): bump @types/minio from 7.0.9 to 7.0.10 (#1121)
  • build(deps): bump @types/node from 16.6.0 to 16.7.10 (#1104, #1122, #1127, #1152, #1156)
  • build(deps): bump eslint-plugin-import from 2.24.0 to 2.24.2 (#1112, #1117)
  • build(deps): bump eslint-plugin-jsdoc from 36.0.7 to 36.0.8 (#1118)
  • build(deps): bump minio from 7.0.18 to 7.0.19 (#1114)
  • build(deps): bump postgres from 2.0.0-beta.6 to 2.0.0-beta.8 (#1107,#1123)
  • build(deps): bump sharp from 0.28.3 to 0.29.0 (#1108)
  • chore: fix issues after Typescript 4.4 update (#1124)
  • chore(ci): add syncMetadata & docs build to PR's (#1154)
  • docs: revamp docs in to more feature based (#1151)
  • feat(all): support and recommend using the Typescript language server (#1055)
  • feat(code-gen): add support for Postgres default values (#1130)
  • feat(code-gen): always collect as much validator issues as possible (#1161)
  • feat(code-gen): sort imports in generated files before writing (#1125)
  • feat(docs): add http server document (#1157)
  • feat(docs): add TS setup & logger and events (#1153)
  • feat(docs): queue, migration, postgres, session and test docs
  • fix(code-gen): allow searchable on references (#1128)
  • fix(code-gen): nullable types on sql insert partials (#1129)
Breaking changes
  • deps: bump sharp from 0.28.3 to 0.29.0
    • Major version bump
  • code-gen: always collect as much validator issues as possible
    • No TypeScript file support anymore in the 'validator' generator
    • Removed the 'throwingValidator' option, every validator returns a { error }|{, value } result, where the error is an AppError or the value key containing the validation result
    • The AppError key is now always validator.error. Errors by path are now put on error.info["$.xxx"].key

For a detailed description and more details about this release, please read the release notes.

v0.0.157

Changes
  • build(deps): bump @types/node from 16.4.13 to 16.6.0 (#1101)
  • build(deps): bump eslint-plugin-import from 2.23.4 to 2.24.0 (#1088)
  • build(deps): bump eslint-plugin-jsdoc from 36.0.6 to 36.0.7 (#1102)
  • feat(code-gen): support 'schema' in 'queryOptions' (#1103)
  • feat(store): add support for JS migration files (#1097)
  • feat(store): better PG connection handling (#1096)
Breaking changes
  • store: better PG connection handling

    • setPostgresDatabaseTemplate requires a connection created by createTestPostgresDatabase
    // test/config.js
    export async function setup() {
      const sql = await createTestPostgresDatabase();
      await setPostgresDatabaseTemplate(sql);
      await sql.end({ timeout: 0 });
    }
    
    export async function teardown() {
      await cleanupPostgresDatabaseTemplate();
    }
    
    • cleanupTestPostgresDatabase is not guaranteed to delete the provided database.
    • Changed logic around checking options passed to newPostgresConnection. This shouldn't affect any existing usage, but is more flexible when connecting to many databases.
    • Default connection pool is 15 instead of unspecified.

v0.0.156

Changes

v0.0.155

Changes
  • build(deps): bump @types/node from 16.4.6 to 16.4.8 (#1074)
  • build(deps): bump eslint from 7.31.0 to 7.32.0 (#1075)
  • chore(release): fix release script
  • chore: lint JSDoc blocks
  • chore(release): fix release of code-gen and linting

v0.0.154

Changes
Breaking changes
  • deps: bump eslint-plugin-jsdoc from 35.5.0 to 36.0.6
    • Major version bump

v0.0.153

Changes
  • build(deps): bump @babel/core from 7.14.6 to 7.14.8 (#1044)
  • build(deps): bump @types/node from 16.3.1 to 16.4.0 (#1033, #1041, #1043)
  • build(deps): bump eslint from 7.30.0 to 7.31.0 (#1039)
  • build(deps): bump eslint-plugin-jsdoc from 35.4.3 to 35.5.0 (#1038, #1045)
  • feat(cli): remove newTestEvent options (#1031)
  • feat(docs): integrate docs from compasjs/docs and move to Vitepress (#1036)
  • fix(code-gen): fix jsdoc return type for query builders (#1034)
  • fix(code-gen): handle convert when generating types. (#1048)
  • fix(store): add Buffer to types of source for createOrUpdateFile (#1049)
  • test(code-gen): add e2e tests for handled errors (#1032)
  • test(store): fix flaky tests by increasing timeouts (#1037)
Breaking changes
  • cli: remove newTestEvent options
    • Removed the options argument on newTestEvent. This was more confusing than a few extra logs in the test output.

v0.0.152

Changes
  • build(deps): bump @types/node from 16.0.1 to 16.3.1 (#1018, #1026)
  • build(deps): bump eslint-plugin-jsdoc from 35.4.1 to 35.4.3 (#1019, #1025)
  • chore(ci): disable setup-node auto cache for sync-docs
  • chore(codecov): make patch informational as well
  • feat(cli): change default worker count of test to 4 instead of number of cpus
  • feat(cli): run tests in parallel by default while collecting coverage (#1024)
  • feat(code-gen): error when relation key is a reserved query builder key (#1020)
  • feat(code-gen): add 'as' and 'limit' as reserved query builder keys
Breaking changes
  • cli: run tests in parallel by default while collecting coverage
    • compas coverage by defaults executes tests with the default settings (parallel)
    • compas coverage now also accepts all arguments of compas test like --serial and --parallel-count. To get the old behaviour run compas coverage --serial

v0.0.151

Changes
  • build(deps): bump @types/minio from 7.0.7 to 7.0.8 (#1012)
  • build(deps): bump @types/node from 15.12.5 to 16.0.1 (#1008, #1010, #1014)
  • build(deps): bump eslint from 7.29.0 to 7.30.0 (#1011)
  • build(deps): bump postgres from 2.0.0-beta.5 to 2.0.0-beta.6 (#1015)
  • chore: only support Node.js v16 and higher
  • chore(ci): disable auto-merge of dependabot PR's
  • chore(ci): use setup-node@v2 with built-in cache support
  • feat(code-gen): rename ctx.event in matched handlers with a router. prefix (#1017)
  • fix(stdlib): replace TimeoutError with AppError, fix formatting of info object (#1016)
Breaking changes
  • deps: bump @types/node from 15.12.5 to 16.0.1
    • Major version bump
  • all: only support Node.js v16 and higher
    • Bump your local project to use Node.js v16, which should go in to LTS in a few months

v0.0.150

Changes
  • build(deps): bump eslint-plugin-jsdoc from 35.4.0 to 35.4.1 (#1006)
  • chore(create-release): fix changelog parsing
  • feat(server): sendFile support If-Modified-Since (#1003)
  • feat(store): add must-revalidate to default cacheControlHeader in FileCache (#1004)
Breaking changes
  • store: add must-revalidate to default cacheControlHeader in FileCache
    • The default cache-control value has changed from max-age=1200 to max-age=120, must-revalidate. Provide your own as the last argument of new FileCache() if necessary.

v0.0.149

Changes
  • build(deps): bump @types/node from 15.12.4 to 15.12.5 (#998)
  • build(deps): bump prettier from 2.3.1 to 2.3.2 (#999)
  • chore(changelog): improve changelog with breaking change handling (#1000)
  • feat(store): remove file group view (#1001)
Breaking changes
  • store: remove file group view
    • Removed usages and code generation of fileGroupView. Replace with queryFileGroup calls.
    • Add the following migration:
    DROP VIEW IF EXISTS "fileGroupView" CASCADE;
    

v0.0.148

  • build(deps): bump @babel/eslint-parser from 7.14.5 to 7.14.7 (#989)
  • build(deps): bump eslint-plugin-jsdoc from 35.3.2 to 35.4.0 (#990)
  • feat(cli): support --parallel-count n in the test runner (#996)
  • feat(store): createTestPostgresDatabase accepts sql connection options (#995)
  • fix(code-gen): react-query should work for routes without a response (#994)

v0.0.147

  • fix(cli): let newTestEvent use 'newEvent' from stdlib (#988)

v0.0.146

  • build(deps): bump @types/node from 15.12.2 to 15.12.4 (#987)
  • build(deps): bump eslint from 7.28.0 to 7.29.0 (#986)
  • build(deps): bump eslint-plugin-jsdoc from 35.3.0 to 35.3.2 (#985)
  • feat(cli): add code-mod for v0.0.146 (#983)
  • feat(code-gen): remove entitySelect generation (#984)
  • feat(stdlib): calculate event duration on abort or eventStop (#982)
  • fix(code-gen): resolve primary key for correct type when adding fields for relations (#980)
  • fix(store): fix return values of addJobToQueue and equivalents (#981)

Breaking change where the generated select sql queries where removed. Use yarn compas code-mod exec v0.0.146 --verbose, before generating, to convert these to use the query builder.

v0.0.145

  • build(deps): bump @babel/core from 7.14.5 to 7.14.6 (#969)
  • build(deps): bump c8 from 7.7.2 to 7.7.3 (#963)
  • build(deps): bump chokidar from 3.5.1 to 3.5.2 (#970)
  • build(deps): bump eslint-plugin-jsdoc from 35.1.3 to 35.3.0 (#964, #971)
  • feat(cli): spawn 'docker pull' when container needs to be created (#967)
  • feat(code-gen): add sql support for where.relationExists (#973)
  • fix(code-gen): resolve typescript union on compas reference object (#974)
  • fix(store): require ssl by default for the postgres connection in production (#972)

Breaking change: by default ssl is required for Postgres connections created in production.

v0.0.144

  • build(deps): bump @babel/core from 7.14.3 to 7.14.5 (#955)
  • build(deps): bump @babel/eslint-parser from 7.14.4 to 7.14.5 (#956)
  • build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#953)
  • feat(cli): add hash to visualise output to prevent unnecessary diffs (#952)
  • feat(code-gen): add 'routerClearMemoizedHandlers' to router output (#960)
  • fix(cli): prevent 'caughtException' overwriting by 'enforceSingleAssertion' (#961)

v0.0.143

  • build(deps): bump @types/node from 15.12.1 to 15.12.2 (#949)
  • fix(cli): import @babel/parser dynamically

v0.0.142

  • chore(cli): rename code-mod v0.0.141 to v0.0.142
  • fix(code-gen): make react-query options optional

v0.0.141

  • build(deps): bump @types/node from 15.12.0 to 15.12.1 (#942)
  • build(deps): bump eslint from 7.27.0 to 7.28.0 (#946)
  • build(deps): bump eslint-plugin-jsdoc from 35.1.2 to 35.1.3 (#943)
  • build(deps): bump prettier from 2.3.0 to 2.3.1 (#944)
  • fix(cli): fix code-mod v00140 and rename to v0.0.141 (#947)

v0.0.140

  • build(deps): bump @types/node from 15.6.1 to 15.12.0 (#929, #933)
  • build(deps): bump eslint-plugin-import from 2.23.3 to 2.23.4 (#919)
  • build(deps): bump eslint-plugin-jsdoc from 35.0.0 to 35.1.2 (#920, #921)
  • build(deps): bump mime-types from 2.1.30 to 2.1.31 (#927)
  • chore(store): remove unused mime-types dependency (#936)
  • feat(cli): add code-mod command, prepare v0.0.140 code-mod (#940)
  • feat(cli): add migrate --keep-alive-without-lock (#937)
  • feat(code-gen): accept an object as argument in generated 'useQuery' hooks (#941)
  • feat(code-gen): throw nice error on optional route parameters (#938)
  • feat(stdlib): always format stack when formatting errors (#939)
  • fix(code-gen): Add additional query generics to support better data inferring (#922)

Breaking change in the generated react-query hooks, please run the code-mod via yarn compas code-mod exec v0.0.140 --verbose before generating.

v0.0.139

  • build(deps): bump @babel/eslint-parser from 7.14.3 to 7.14.4 (#915)
  • build(deps): bump @types/node from 15.6.0 to 15.6.1 (#909)
  • build(deps): bump browserslist from 4.16.3 to 4.16.6 (#910)
  • build(deps): bump eslint-plugin-jsdoc from 34.8.2 to 35.0.0 (#908)
  • chore(code-gen): add test for query-builder nested limit (#918)
  • feat(cli): add option to enforce at least one test assertion (#917)
  • feat(cli): support loading connection settings from a relative js file (#914)
  • feat(stdlib): add event root tracking for TimeoutErrors (#916)

v0.0.138

  • build(deps): bump @types/node from 15.3.0 to 15.6.0 (#896, #904)
  • build(deps): bump dotenv from 9.0.2 to 10.0.0 (#906)
  • build(deps): bump eslint from 7.26.0 to 7.27.0 (#905)
  • build(deps): bump eslint-plugin-import from 2.23.2 to 2.23.3 (#907)
  • chore(store): add analyze before pg bench run
  • chore(store): fix linting issue
  • feat(cli): add migrate command with rebuild support (#898)
  • feat(cli): also print when everything is ok for help --check
  • feat(code-gen): add mime validator support to T.file() (#903)
  • feat(code-gen): send 400 on param decode errors (#902)
  • perf(code-gen): improve generated query builder performance (#899)

For a detailed description and more details about this release, please read the release notes.

v0.0.137

  • build(deps): bump eslint-plugin-jsdoc from 34.8.1 to 34.8.2 (#894)
  • chore(store): add bench for variations of generated query builder
  • feat(store): allow specifying app_name in namespaces.txt (#895)

v0.0.136

  • build(deps): bump eslint-plugin-jsdoc from 34.8.0 to 34.8.1 (#893)
  • fix(stdlib): revert mainFn only running once check (#892)

v0.0.135

  • build(deps): bump @babel/core from 7.14.0 to 7.14.3 (#875, #882)
  • build(deps): bump @babel/eslint-parser from 7.13.14 to 7.14.3 (#876, #884)
  • build(deps): bump @types/node from 15.0.2 to 15.3.0 (#874, #878)
  • build(deps): bump eslint-plugin-import from 2.22.1 to 2.23.2 (#880)
  • build(deps): bump eslint-plugin-jsdoc from 34.0.2 to 34.8.0 (#877, #879, #883, #888)
  • feat(cli): add --check, check if .env.local is ignored (#891)
  • feat(code-gen): improve generated router performance (#873)
  • feat(stdlib): load .env.local if exists (#890)
  • fix(code-gen): transformation for idIn and via combination (#889)

v0.0.134

  • build(deps): bump dotenv from 9.0.0 to 9.0.2 (#865, #867)
  • build(deps): bump eslint from 7.25.0 to 7.26.0 (#862)
  • build(deps): bump eslint-plugin-jsdoc from 33.1.0 to 34.0.2 (#864, #868, #870)
  • build(deps): bump prettier from 2.2.1 to 2.3.0 (#863)
  • chore: fix changelog formatting
  • feat(cli): support running prettier when no files are found (#872)

v0.0.133

  • bench(stdlib): add event benchmarks (#856)
  • build(deps): bump dotenv from 8.4.0 to 9.0.0 (#857)
  • build(deps): bump eslint-plugin-jsdoc from 33.0.0 to 33.1.0 (#858)
  • build(deps): bump handlebars from 4.7.6 to 4.7.7 (#860)
  • chore: move @compas/insight to @compas/stdlib and @compas/server (#855)
  • fix(server): handle body parser errors correctly (#859)

Breaking change: @compas/insight is removed. The majority of things should be fixed by running the following command: find ./src -type f -name "*.js" -exec sed -i 's/@compas\/insight/@compas\/stdlib/g' {} \; && yarn compas lint. Change ./src from the previous command if you have multiple source directories (don't use ./ as it will include node_modules). Only postgresTableSizes is moved to @compas/store, and should be manually checked. Also removed logger.isProduction() function as it equals isProduction() from @compas/stdlib.

v0.0.132

  • bench(store): add benchmarks for the query function (#844)
  • build(deps): bump @babel/core from 7.13.16 to 7.14.0 (#843)
  • build(deps): bump @types/node from 14.14.41 to 15.0.2 (#835, #837, #851)
  • build(deps): bump c8 from 7.7.1 to 7.7.2 (#847)
  • build(deps): bump dotenv from 8.2.0 to 8.4.0 (#853)
  • build(deps): bump eslint-plugin-jsdoc from 32.3.1 to 33.0.0 (#836, #838, #842)
  • chore: add codecov badge (#831)
  • chore: add simple license script to scan transitive licenses used
  • chore: exclude generated files from coverage reports
  • chore: make codecov informational (#846)
  • chore: use codecov.io for coverage (#830)
  • feat(cli): check if multiple versions of the stdlib are installed (#839)
  • feat(code-gen): support escaped characters in disallowCharacters (#854)
  • fix(cli): improve proxy error messages (#849)
  • fix(server): simplify sendFile range header parsing (#845)

v0.0.131

  • build(deps): bump @babel/core from 7.13.15 to 7.13.16 (#819)
  • build(deps): bump eslint from 7.24.0 to 7.25.0 (#826)
  • build(deps): bump eslint-config-prettier from 8.2.0 to 8.3.0 (#828)
  • build(deps): bump eslint-plugin-jsdoc from 32.3.0 to 32.3.1 (#823)
  • chore(ci): test against Node.js 16
  • chore: change default nvm version to Node.js 16
  • feat(code-gen): add TypeScript definition for 'disallowCharacters'
  • feat(code-gen): always export basic queries via an object (#829)
  • feat(code-gen): support T.string().disallowCharacters() (#825)
  • fix(code-gen): improve TypeBuilderLike TypeScript type
  • fix(store): update type definitions with new job related functions

v0.0.130

  • build(deps): bump @babel/core from 7.13.14 to 7.13.15 (#795)
  • build(deps): bump @types/node from 14.14.37 to 14.14.41 (#807, #808)
  • build(deps): bump eslint from 7.23.0 to 7.24.0 (#798)
  • build(deps): bump eslint-config-prettier from 8.1.0 to 8.2.0 (#802)
  • build(deps): bump postgres from 2.0.0-beta.4 to 2.0.0-beta.5 (#799)
  • feat(server): replace koa-body with just co-body (#812)
  • feat(store): support specific job handlers and more timeout options (#816)
  • fix(code-gen): fix sql type resolve call (#814)
  • fix(code-gen): remove stacktraces from anyOf sub errors (#813)
  • fix(store): call eventStart on event passed to handler (#815)
  • fix(store): move 'see' jsdoc tags below the description

The only breaking change is in the JobQueueWorker which doesn't have the addJob method. See background jobs for more information on the current supported features.

v0.0.129

  • chore(ci): another attempt at auto syncing the docs repo
  • fix(code-gen): fix setting default value of internal code-gen settings

v0.0.128

  • build(deps): bump c8 from 7.7.0 to 7.7.1 (#793)
  • chore(ci): fix doc sync after release
  • feat(stdlib): add helpers to calculate cookie and cors urls (#792)
  • fix(code-gen): default for internal settings is correct for the type definition (#788)
  • fix(code-gen): validate for signed integer with default number settings (#789)

v0.0.127

  • build(deps): bump @babel/core from 7.13.13 to 7.13.14 (#773)
  • build(deps): bump @babel/eslint-parser from 7.13.10 to 7.13.14 (#772)
  • build(deps): bump c8 from 7.6.0 to 7.7.0 (#775)
  • build(deps): bump koa-session from 6.1.0 to 6.2.0 (#774)
  • build(deps): bump mime-types from 2.1.29 to 2.1.30 (#784)
  • chore(ci): fix token for docs sync after release
  • feat(insight): support error formatting for Github actions (#771)
  • fix(cli): prevent ESLint from throwing errors when no JS files are found (#783)
  • fix(code-gen): use formatData.append for multipart body in the api client (#782)
  • fix(store): add TS type definition for updateFileGroupOrder (#781)

v0.0.126

  • build(deps): bump @babel/core from 7.13.10 to 7.13.13 (#770)
  • build(deps): bump @types/node from 14.14.35 to 14.14.37 (#765, #769)
  • build(deps): bump eslint from 7.22.0 to 7.23.0 (#768)
  • chore(ci): add git push when updating compas docs
  • chore(ci): automate docs sync on release
  • feat(code-gen): add error handling case when inferring type on function
  • feat(code-gen): add internal setting support, utilize it for OpenAPI form data conversion (#767)

Removed loadFromOpenAPISpec in favor of app.extendWithOpenApi

v0.0.125

  • chore: add changelog for v0.0.124
  • feat(code-gen): throw error on duplicate routes (#763)
  • feat(code-gen): throw on inferred array with more than a single element (#764)
  • fix(code-gen): use tsx extension for the common react-query file

v0.0.124

  • build(deps): bump @types/node from 14.14.31 to 14.14.35 (#740, #743, #745, #748)
  • build(deps): bump eslint from 7.21.0 to 7.22.0 (#746)
  • build(deps): bump eslint-plugin-jsdoc from 32.2.0 to 32.3.0 (#749)
  • chore(ci): use custom token to comment on PR's
  • chore: move to fastify/github-action-merge-dependabot@v2.0.0
  • feat(code-gen): generate a code splittable api client (#756)
  • feat(code-gen): introduce common, split generator output per 'group' (#758)
  • feat(lint-config): move to @babel/eslint-parser (#747)
  • feat(lint-config): remove no-return-await add require-await (#752)

For a detailed description and more details about this release, please read the release notes.

v0.0.123

  • chore: fix version number in changelog for v0.0.122
  • chore: various typos and type fixes
  • feat(cli): ignore test runner timeout when detecting open inspector (#736)
  • feat(code-gen): date validators min,max,future and past options (#739)
  • feat(stdlib): drop the vendor uuid implementation
  • feat(store): batch objects when copying all files over buckets

v0.0.122

  • build(deps): bump eslint from 7.20.0 to 7.21.0 (#729)
  • chore,feat(insight,cli,store): move to Node.js 15 & integrate AbortSignal (#733)
  • feat(store): default session maxAge to 30 minutes
  • fix(code-gen): sql where notIn should return all results on empty array (#728)

There are some breaking changes related to events, see the commit message for #733 for more details.

v0.0.121

  • fix(code-gen): fix usage of sql 'where in' with an empty array and other where field (#726)

v0.0.120

  • fix(code-gen): allow 'optional' order by for deletedAt column (#725)

v0.0.119

  • build(deps): bump eslint-config-prettier from 8.0.0 to 8.1.0 (#724)
  • build(deps): bump eslint-plugin-jsdoc from 32.1.0 to 32.2.0 (#715, #719)
  • feat(code-gen): add sql order by support (#721)
  • feat(store): remove getNestedFileGroup (#723)
  • fix(code-gen): fix empty where xxIn behaviour in the sql generator (#722)
  • fix(code-gen): jsdoc lint compliant output of the api client (#717)

For a detailed description and more details about this release, please read the release notes.

v0.0.118

  • build(deps): bump eslint-config-prettier from 7.2.0 to 8.0.0 (#708)
  • chore(ci): improve CI for external contributors (#712)
  • chore(ci): remove test and lint dependency for benchmark and coverage jobs
  • feat(cli): support --jsdoc flag on compas lint (#713)
  • feat(code-gen): expose baseKeys for generated hooks (#709)
  • feat(code-gen): make queryKey() generation consistent with baseKey() (#714)
  • fix(code-gen): ensure a jsdoc stable output without jsdoc linter (#711)

Thanks to @rodymolenaar for the baseKey generation!

v0.0.117

  • build(deps): bump @types/node from 14.14.27 to 14.14.31 (#689, #698, #705)
  • build(deps): bump c8 from 7.5.0 to 7.6.0 (#695)
  • build(deps): bump mime-types from 2.1.28 to 2.1.29 (#693)
  • chore(changelog): skip dev-deps updates in the changelog generator
  • ci: add benchmarks as a requirement for dependabot auto merge
  • docs(cli): expand exported function documentation for the cli (#696)
  • docs(server): expand exported function documentation
  • docs(store): expand exported function documentation
  • feat(code-gen): expose query key functions for generated hooks (#702)
  • feat(lint-config): add support for JSDoc linting (#707)
  • fix(code-gen): date validator should support special string cases (#706)
  • fix(code-gen): fix missing relation type in sub query builder (#700)
  • fix(stdlib): handle 'undefined' in AppError#format (#701)

It is expected that react-query generator consumers move to the generated queryKey functions in this release, as the next release may break the query keys. For JSDoc linting it currenlty is only enabled when the env variable CI is set to true, so CI=true yarn compas lint. Thanks to @tjonger for the query builder fix!

v0.0.116

  • build(deps): bump @types/node from 14.14.25 to 14.14.27 (#672, #680)
  • build(deps): bump eslint from 7.19.0 to 7.20.0 (#681)
  • build(deps): bump postgres from 2.0.0-beta.3 to 2.0.0-beta.4 (#683)
  • build(deps-dev): bump @types/react from 17.0.1 to 17.0.2 (#679)
  • build(deps-dev): bump react-query from 3.8.2 to 3.9.4 (#671, #682, #686)
  • build(deps-dev): bump typescript from 4.1.3 to 4.1.5 (#669, #670)
  • docs(stdlib): expand a bunch of doc blocks on exported functions
  • docs: fix order of website synced files
  • feat(code-gen): stable query builder join key generation (#684)
  • feat(stdlib): remove pipeline from streamToBuffer (#687)
  • feat(store): add event to queue worker handler (#685)
  • fix(cli): proper exit on test worker failure (#668)
  • fix(cli,store): fix dynamic imports with absolute url on windows (#667)
  • fix(stdlib): force use of Posix path join (#676)

The only breaking change can be found in this issue.

v0.0.115

  • build(deps): bump @types/node from 14.14.22 to 14.14.25 (#652, #658)
  • build(deps-dev): bump @types/react from 17.0.0 to 17.0.1 (#650)
  • build(deps-dev): bump fastest-validator from 1.9.0 to 1.10.0 (#653)
  • build(deps-dev): bump react-query from 3.6.0 to 3.8.2 (#659, #664)
  • code-gen: add error for unused oneToMany relations (#657)
  • code-gen: support multiple 'viaXxx' in the query builder (#661)
  • docs: consistent JSDoc return usage, add since tag to insight exports
  • feat(store): handler timeout for job queue (#663)
  • feat(store): max retry count on job failures (#662)
  • server: catch errors while creating and closing a test app (#656)

For a detailed description and more details about this release, please read the release notes.

v0.0.114

  • build(deps): bump c8 from 7.4.0 to 7.5.0 (#641)
  • ci: revert release automation, go back to auto changelog
  • code-gen: add file validator support (#649)
  • code-gen: fix field types of update partial for optional fields (#647)
  • code-gen: fix float support in sql structure generator (#646)
  • store: add stringifyQueryPart function (#648)

v0.0.113

  • build(deps): bump eslint from 7.18.0 to 7.19.0 (#634)
  • chore: fix lint of workflow files
  • ci: auto-merge dependabot PR's
  • ci: automate release process (#635)
  • ci: use default merge method for dependabot PR's
  • code-gen: detect reference recursion when converting from OpenApi (#640)
  • code-gen: error when JS keywords are used as group names (#638)
  • code-gen: fix names for optional, pick, omit and searchable type (#639)

v0.0.112

  • code-gen: add $raw to generated where clause builder (#633)
  • code-gen: simplify generated select query via query builder (#632)
  • code-gen: throw when generated queryBuilder function is awaited (#631)

v0.0.111

  • build(deps): bump @types/node from 14.14.21 to 14.14.22 (#622)
  • build(deps): bump eslint-config-prettier from 7.1.0 to 7.2.0 (#621)
  • build(deps): bump postgres from 2.0.0-beta.2 to 2.0.0-beta.3 (#623)
  • build(deps-dev): bump react-query from 3.5.15 to 3.6.0 (#620, #627)
  • cli: cleaner test output on failed results (#628)
  • code-gen: generate queries per model in a file (#629)
  • stdlib: add types to process errors (#626)
  • stdlib: use crypto randomUUID if available (#619)
  • store: force call setStoreQueries (#630)

v0.0.110

  • build(deps): bump @types/node from 14.14.20 to 14.14.21 (#610)
  • build(deps): bump chokidar from 3.5.0 to 3.5.1 (#614)
  • build(deps): bump eslint from 7.17.0 to 7.18.0 (#613)
  • build(deps-dev): bump react-query from 3.5.12 to 3.5.15 (#612 , #615)
  • chore: minor comment and type fixes
  • chore: update order of changelog and contributing
  • code-gen: add possible type results to the query builder functions (#618)
  • code-gen: fix name clash for self referencing tables in the query-builder (#616)

v0.0.109

  • build(deps-dev): bump react-query from 3.5.11 to 3.5.12 (#608)
  • chore: fix linting on CI
  • chore: various code-gen OpenAPI fixes + bench using Github API spec (#609)
  • cli: harden test runner by waiting till all results are collected from the workers
  • code-gen: add support for idempotent routes (#607)
  • store: format caught job queue errors
  • bench: create benchmark against the Github v3 API
  • code-gen: transform named types in the OpenAPI importer
  • code-gen: support default and optional path and query params in openAPI converter
  • code-gen: deep copy validation result on App extend

v0.0.108

  • build(deps): bump @types/minio from 7.0.6 to 7.0.7 (#596)
  • build(deps): bump @types/node from 14.14.19 to 14.14.20 (#584)
  • build(deps): bump chokidar from 3.4.3 to 3.5.0 (#594)
  • build(deps): bump koa from 2.13.0 to 2.13.1 (#585)
  • build(deps-dev): bump react-query from 3.5.9 to 3.5.11 (#592, #586)
  • chore: fix changelog for v0.0.107
  • chore: verify oneToOneReverse sql builder
  • cli: add verbose option to proxy (#587)
  • cli: bump dependencies for template
  • code-gen: add support for sql ILIKE (#599)
  • code-gen: allow custom shortName and detect duplicate short names (#602)
  • code-gen: fix loading of patterns via OpenAPI spec (#601)
  • code-gen: generated router should work without events on the context (#591)
  • server: add option to logger to disable event creation and logging (#590)
  • store: prioritize priority over scheduled at in JobWorker (#600)
  • store: remove duplicate recurring jobs when recurring job is registered
  • store: use different internal function for minio listObjects

v0.0.107

  • build(deps): bump @types/node from 14.14.16 to 14.14.19 (#577, #580)
  • build(deps): bump c8 from 7.3.5 to 7.4.0 (#578)
  • build(deps): bump eslint from 7.16.0 to 7.17.0 (#581)
  • build(deps): bump mime-types from 2.1.27 to 2.1.28 (#579)
  • build(deps-dev): bump react-query from 3.5.5 to 3.5.9 (#576, #582)
  • chore: fix changelog script to accomadate for front-matter
  • chore: remove all references to docs in this repo
  • cli: add parallel test running and order randomizer (#575)
  • cli: add test case for visualise with arguments
  • cli: fix watch and restart behaviour of long running processes (#583)
  • docs: move all docs to the docs repo
  • insight: logger write pretty in a single call
  • stdlib: fix promise printing on unhandledRejections
  • store: await connection closes on errors in migrations
  • store: fix flaky test postgres connections

v0.0.106

  • *: remove @name usage in JSDoc
  • build(deps): bump @types/node from 14.14.14 to 14.14.16 (#569)
  • build(deps-dev): bump react-query from 3.4.1 to 3.5.5 (#570)
  • code-gen: generate some default type imports for sql and router generator (#571)
  • insight,stdlib: stricter NODE_ENV checks (#572)
  • store: rename isQueryObject to isQueryPart (#573)

v0.0.105

  • build(deps): bump eslint from 7.15.0 to 7.16.0 (#557)
  • build(deps): bump eslint-config-prettier from 7.0.0 to 7.1.0 (#556)
  • build(deps-dev): bump axios from 0.21.0 to 0.21.1 (#561)
  • build(deps-dev): bump react-query from 3.4.0 to 3.4.1 (#562)
  • cli: fix usage of code-gen internals in visualise (#563)
  • code-gen: fix duplicate check and hash calculation for validators (#565)
  • code-gen: remove getGroupsThatIncludeType (#564)

v0.0.104

  • build(deps): bump @types/node from 14.14.11 to 14.14.14 (#545, #548, #552)
  • build(deps): bump ini from 1.3.5 to 1.3.7 (#546)
  • build(deps): bump minio from 7.0.17 to 7.0.18 (#553)
  • build(deps-dev): bump react-query from 2.26.4 to 3.4.0 (#550, #554, #555)
  • build(deps-dev): bump typescript from 4.1.2 to 4.1.3 (#549)
  • build(deps-dev): bump yup from 0.32.6 to 0.32.8 (#544)
  • chore: only run CodeQL checks on main
  • code-gen: remove App#new
  • code-gen: remove trailing dot from propertyPath when validating query arguments (#543)
  • code-gen: support react-query v3

v0.0.103

  • bench: make validator benchmarks more comparable (#536)
  • build(deps): bump @types/node from 14.14.9 to 14.14.11 (#541, #513)
  • build(deps): bump eslint from 7.14.0 to 7.15.0 (#531)
  • build(deps): bump eslint-config-prettier from 6.15.0 to 7.0.0 (#537)
  • build(deps): bump minio from 7.0.16 to 7.0.17 (#512)
  • build(deps): bump prettier from 2.2.0 to 2.2.1 (#520)
  • build(deps-dev): bump react-query from 2.26.3 to 2.26.4 (#538)
  • build(deps-dev): bump yup from 0.30.0 to 0.32.6 (#510, #528, #529, #530, #539, #540)
  • chore: bump dependabot config so github picks it up
  • chore: checkout CodeQL
  • chore: initial release notes for 0.0.103 (#527)
  • chore: remove external checks on CI
  • chore: rename lbu to compas
  • code-gen: add dumpApiStructure and throwingValidators options (#534)
  • code-gen: add support for OR in the sql where partials (#518)
  • code-gen: add support for custom any validators (#517)
  • code-gen: almost always inline 'any' validators
  • code-gen: decently stable hash calculation for anonymous validators (#519)
  • code-gen: fix generic type sql transformer
  • code-gen: fix property access quoting in sql result transformers
  • code-gen: inline basic validators (#521)
  • code-gen: introduce query-builder, drop query-traverser (#511)
  • code-gen: remove validatorSetError (#535)
  • code-gen: simplify object strict validation
  • code-gen: validators for sql where and builders (#526)
  • code-gen: various inline validator fixes, inline booleans
  • docs: use a Jekyll plugin to generate the sitemap
  • lint-config: add no-unsafe-optional-chain rule to lint config (#533)

For a detailed description and more details about this release, please read the release notes.

v0.0.102

  • build(deps): bump @types/node from 14.14.7 to 14.14.9 (#493, #501)
  • build(deps): bump eslint from 7.13.0 to 7.14.0 (#504)
  • build(deps): bump prettier from 2.1.2 to 2.2.0 (#505)
  • build(deps-dev): bump fastest-validator from 1.8.0 to 1.9.0 (#492)
  • build(deps-dev): bump react-query from 2.26.2 to 2.26.3 (#503)
  • build(deps-dev): bump typescript from 4.0.5 to 4.1.2 (#500)
  • build(deps-dev): bump yup from 0.29.3 to 0.30.0 (#499)
  • ci: move to new set-env way (#496)
  • code-gen: deduplicate values passed to anyOf (#506)
  • code-gen: support not defined route responses (#507)
  • lint-config: use meriyah parser in prettier, disable eslint import rules
  • stdlib: improve error formatting (#502)

Overall a few small breaking changes. We format errors with AppError#format in more places now, which should result in consistent behaviour. Running yarn compoas lint should be 10 - 20 % faster than before, however this also meant disabling some slow rules related to analyzing imports, namely import/named, import/namespace & import/export.

Not sure what the timeline will be on the next release, because the query-builder is somewhat more complex than expected.

v0.0.101

  • store: support POSTGRES_

v0.0.100

  • build(deps): bump @types/node from 14.14.6 to 14.14.7 (#486)
  • cli: better timeout error message in the test runner
  • cli: log response status in proxy (#489)
  • code-gen: better error message when loading from remote.
  • code-gen: support setting primary key in generated insert queries (#491)
  • server: expose x-request-id in CORS headers (#490)

v0.0.99

  • build(deps): bump eslint from 7.12.1 to 7.13.0 (#485)
  • build(deps-dev): bump react from 16.14.0 to 17.0.1 (#478)
  • cli: better error messages when graphviz is not installed (#480)
  • cli: visualise use format and output from cli arguments (#484)
  • code-gen: add raw value support to AnyType
  • code-gen: fix deletedAt check with Date in the future (#483)
  • code-gen: micro optimization in array validators

The most notable feature is T.any().raw("QueryPart", { typeScript: "import { QueryPart } from '@lbu/store';" }) support. This allows you to generate correct typings and integrate with native types provided by the platform or other packages. There should be no breaking changes.

v0.0.98

  • build(deps-dev): bump react-query from 2.25.2 to 2.26.2 (#465, #474)
  • cli: add visualise command, sql only (#472)
  • code-gen: add field checks to partials when on staging (#477)
  • code-gen: various small fixes (#475)
  • store: various migration error handling improvements (#476)

No release notes, but migration file has changed, so a database reset is necessary. We also are stricter on input values in the query partials, so expect tests breaking.

v0.0.97

  • code-gen: fix generating ES Modules when it's not needed

v0.0.96

  • bench: add yup and fastest-validators to the benchmarks (#463)
  • code-gen: always use string for date in browser environments
  • code-gen: only use an extensions in imports in ES Modules (#464)

v0.0.95

  • code-gen: some refactoring for more correct type output

v0.0.94

  • code-gen: collect static check errors and pretty print (#457)
  • code-gen: flatten output (#460)
  • code-gen: sort structure imports and root exports (#459)
  • stdlib: add support for util.inspect.custom to AppError (#458)

Structure and validators imports and exports have changed. Make sure to fix these.

v0.0.93

  • insight: remove dependency on stdlib

v0.0.92

  • build(deps): bump @types/node from 14.14.5 to 14.14.6 (#451)
  • code-gen: add more input checks to App.addRelations
  • code-gen: fix TS strict for apiClient with file uploads
  • code-gen: fix missing response when importing from OpenApi spec
  • code-gen: fix recursive types with a suffix
  • code-gen: fix whereIn and whereNotIn generation
  • code-gen: process data before resolving addRelations
  • stdlib: cache environment variables (#454)

v0.0.91

  • code-gen: fix default allowNull on uuid type

v0.0.90

  • code-gen: fix tags set on a RouteBuilder (#449)
  • code-gen: short circuit insert queries without values (#448)
  • code-gen: support allow null on various types, loosen schema (#450)

No release notes today :S

v0.0.89

  • build(deps): bump @types/node from 14.14.2 to 14.14.5 (#422, #435)
  • build(deps): bump eslint from 7.12.0 to 7.12.1 (#434)
  • build(deps): bump eslint-config-prettier from 6.14.0 to 6.15.0 (#441)
  • build(deps-dev): bump typescript from 4.0.3 to 4.0.5 (#433)
  • chore: lowercase 'type' in logs (#429)
  • cli: skip restart debounce on 'rs' in watch mode (#440)
  • code-gen: add docs to types (#442)
  • docs: update README.md (#432)
  • stdlib: use format error on global exception handlers (#443)
  • store: fix typ definition of isQueryPart
  • store: floor result of average time to completion (#430)
  • store: queue scheduling and updating of recurring jobs (#431)

For a detailed description and more details about this release, please read the release notes.

v0.0.88

  • build(deps): bump c8 from 7.3.4 to 7.3.5 (#418)
  • build(deps): bump eslint from 7.11.0 to 7.12.0 (#415)
  • build(deps-dev): bump axios from 0.20.0 to 0.21.0 (#414)
  • code-gen: subquery support in 'in' and 'notIn' sql where (#420)
  • code-gen: support Typescript script mode (#416)
  • docs: add information about test and bench to cli.md
  • insight: add application name to context (#419)
  • insight: improve performance of ndjson logging (#417)

v0.0.87

  • code-gen: follow references completely when linking up
  • code-gen: make sure apiClient types are registered

v0.0.86

  • server: add support for keeping a public cookie (#412)

v0.0.85

  • build(deps): bump @types/node from 14.14.0 to 14.14.2 (#410)
  • build(deps): bump eslint-config-prettier from 6.13.0 to 6.14.0 (#409)
  • build(deps-dev): bump react-query from 2.23.1 to 2.25.2 (#411)
  • ci: fix create release workflow
  • ci: improve release note formatting
  • code-gen: fix api client error handling with streams (#408)
  • code-gen: improve types of generated routes
  • code-gen: improve types of sql traversal queries
  • code-gen: router rename event before validators
  • stdlib: add stream to buffer function (#407)

v0.0.84

  • build(deps): bump @types/node from 14.11.10 to 14.14.0 (#405)
  • chore: automatically create a release on new tags
  • ci: run tests and benchmarks on Node.js 15 (#403)
  • code-gen: do loose structure validation (#398)
  • code-gen: fix structure dump (#396)
  • code-gen: fix where 'in' and 'notIn' generation
  • code-gen: implement 'patch' method support (#404)
  • code-gen: support adding relations to 'foreign' structure. (#402)
  • server: skip event logging on OPTIONS requests (#397)

For a detailed description and more details about this release, please read the release notes.

v0.0.83

  • build(deps): bump @types/node from 14.11.8 to 14.11.10 (#390)
  • build(deps): bump c8 from 7.3.3 to 7.3.4 (#382)
  • build(deps): bump eslint-config-prettier from 6.12.0 to 6.13.0 (#389)
  • build(deps-dev): bump react from 16.13.1 to 16.14.0 (#381)
  • code-gen: disable some sql generation parts when type is a view (#392)
  • code-gen: refactor types, validator and sql generators (#377)
  • store: add support to explain and analyze any query (#391)
  • store: support nested file groups with custom ordering (#393)

For a detailed description and more details about this release, please read the release notes.

v0.0.82

  • build(deps): bump chokidar from 3.4.2 to 3.4.3 (#379)
  • store: add export for 'addRecurringJobToQueue' (#376)
  • store: add tests for recurring job scheduling (#380)

v0.0.81

  • build(deps): bump @types/node from 14.11.4 to 14.11.8 (#362, #368, #374)
  • build(deps): bump c8 from 7.3.1 to 7.3.3 (#369)
  • build(deps): bump eslint from 7.10.0 to 7.11.0 (#373)
  • build(deps): bump koa-session from 6.0.0 to 6.1.0 (#365)
  • ci: dispatch sha and pr to external e2e test repo (#359)
  • code-gen: add T.searchable and support boolean in where clauses (#371)
  • docs: include contributing.md on Github pages
  • store: add meta field on file (#363)
  • store: add support for recurring jobs (#364)
  • store: try multiple ways of resolving a migration namespace import (#361)

For a detailed description and more details about this release, please read the release notes.

v0.0.80

  • build(deps): bump @types/node from 14.11.2 to 14.11.4 (#351)
  • code-gen: fix generated query function promise type (#352)
  • insight: add basic event system (#356)
  • insight: add function to get rowCount and diskSize per postgres table (#355)
  • server: implement event from insight on the context (#357)

v0.0.79

  • build(deps): bump postgres from 2.0.0-beta.0 to 2.0.0-beta.2 (#332, #346)
  • build(deps-dev): bump react-query from 2.23.0 to 2.23.1 (#349)
  • chore: automatically add link to release notes in the changelog and update publish guide
  • chore: cleanup dependabot config
  • chore: change default branch name to main
  • cli: warn on usage of parent t.xx in sub tests (#348)
  • code-gen: generate cancel token support in browser environments (#347)
  • code-gen: open api importer fixes (#345)
  • code-gen: remove defaultValue from generated where type (#339)
  • code-gen: support withSoftDeletes and remove withHistory (#334)
  • store: cleanup table names (#350)
  • store: consistent internal query formatting
  • store: enable soft deletes for fileStore (#340)
  • store: reset postgres#end timeout in tests
  • store: return hash changes from getMigrationsToBeApplied (#341)

For a detailed description and more details about this release, please read the release notes.

v0.0.78

  • code-gen: fix default value of docString (#326)

v0.0.77

  • cli: remove concurrent test support (#324)
  • code-gen: validator default to undefined on empty strings (#325)

v0.0.76

  • build(deps): bump eslint from 7.9.0 to 7.10.0 (#313)
  • build(deps): bump eslint-config-prettier from 6.11.0 to 6.12.0 (#312)
  • build(deps): bump eslint-plugin-import from 2.22.0 to 2.22.1 (#321)
  • cli: allow running tests in concurrently (#322)
  • cli: allow switching between postgres versions (#317)
  • cli: make sure Postgres is ready before returning from docker up (#306)
  • code-gen: convert default value always to a string
  • code-gen: generate sql where clause for optional values with a default type (#314)
  • code-gen: sql follow references in DDL and where clause (#315)
  • code-gen: support providing default types on a RouteCreator (#318)
  • code-gen: verify path params against params type before generating (#305)
  • docs: consistent urls in config and sitemap
  • docs: update env documentation
  • docs: update sitemap to use extensions on the urls
  • store: remove FileStoreContext out of files (#320)

v0.0.75

  • build(deps): bump @types/node from 14.11.1 to 14.11.2 (#299)
  • build(deps): bump c8 from 7.3.0 to 7.3.1 (#301)
  • code-gen: apiClient should not call getHeaders in browser environment (#302)
  • docs: move to plain Github pages and Jekyll (#298)

v0.0.74

  • build(deps-dev): bump react-query from 2.22.0 to 2.23.0 (#292)
  • build(deps-dev): bump typescript from 4.0.2 to 4.0.3 (#293)
  • cli: fix bench callback type
  • cli: fix recursive error formatting
  • cli: lint exit with error when CI=true
  • code-gen: scoped api client generation for browser envs (#294, #295)

v0.0.73

  • build(deps): bump @types/node from 14.10.2 to 14.11.1 (#281, #287)
  • build(deps-dev): bump react-query from 2.20.0 to 2.22.0 (#282, #288)
  • chore: cleanup fs/promises imports (#289)
  • chore: disable testing.js script, since the generated code is not checked in
  • cli: catch and handle assertion errors in tests (#285)
  • code-gen,stdlib: move templates to code-gen (#286)
  • code-gen: apiClient calls returns Promise
  • code-gen: apiClient handleError should use response headers and data
  • stdlib,cli,server: add and use AppError.format (#284)

v0.0.72

  • build(deps): bump @types/node from 14.10.1 to 14.10.2 (#277)
  • build(deps): bump prettier from 2.1.1 to 2.1.2 (#278)
  • build(deps-dev): bump react-query from 2.17.0 to 2.20.0 (#268, #275, #276, #280)
  • chore: add SECURITY.md (#271)
  • code-gen: AppError and response validation in apiClient (#274)
  • code-gen: add group and item sorting before generation (#272)
  • code-gen: experiment with using isBrowser and isNode in the generated file type
  • code-gen: make tags available in the router
  • code-gen: use isNode check in apiClient generator (#273)
  • server: consistent logging of request length

v0.0.71

  • build(deps): bump @types/node from 14.6.4 to 14.10.1 (#264, #261)
  • build(deps): bump eslint from 7.8.1 to 7.9.0 (#265)
  • build(deps): bump node-fetch from 2.6.0 to 2.6.1 (#258)
  • build(deps-dev): bump react-query from 2.15.4 to 2.17.0 (#263, #266)
  • cli: format info property on caught exceptions in bench and test (#257)
  • code-gen: add simple options to App#generate to provide better defaults (#260)
  • code-gen: add validators in App#addRaw and before dumping structure (#259)
  • code-gen: consistent handling of references
  • code-gen: consistent usage of 'item' in generators
  • code-gen: fix sql generation of nullable foreign key column (#255)
  • code-gen: object validation strict by default (#256)
  • code-gen: remove unnecessary internal nesting on structure
  • store: fix sessions with a maxAge of 'session' (#267)

v0.0.70

  • code-gen: fix breaking changes in react-query types (#252)

v0.0.69

  • build(deps-dev): bump react-query from 2.15.1 to 2.15.4 (#249)
  • code-gen: add sql properties to generated types (#250)
  • code-gen: remove stub generators (#247)

v0.0.68

  • build(deps): bump @types/node from 14.6.1 to 14.6.4 (#229, #237)
  • build(deps): bump eslint from 7.7.0 to 7.8.1 (#224)
  • build(deps-dev): bump react-query from 2.12.1 to 2.15.1 (#222, #225, #228, #238, #241)
  • build(deps-dev): bump typedoc from 0.18.0 to 0.19.0
  • chore: add coverage summary to PR's (#243)
  • chore: create script to automate changelog a little bit
  • chore: fix PR links in the changelog
  • chore: fix linting (#231)
  • chore: remove typedoc setup (#236)
  • chore: setup CODEOWNERS again
  • ci: comment benchmark result to PR (#244)
  • ci: create dependabot config file (#226)
  • cli, stdlib: move bench to cli (#240)
  • cli: add some testing for the provided template (#234)
  • cli: configure timeout of sub tests via t.timeout (#232)
  • code-gen: add optional, omit and pick types (#220)
  • code-gen: change default number to be an integer instead of float (#221)
  • code-gen: self host validation for App.extend (#246)
  • docs: regenerate for v0.0.67
  • stdlib: improve perf of uuid (#242)
  • stdlib: support custom exec options (#233)

v0.0.67

  • cli: add command to reset current database (#213)
  • cli: run test teardown before printing results (#212)
  • code-gen: follow references when resolving defaults in sql generation (#215)

v0.0.66

Everything is breaking!

  • code-gen: add default min(1) to string type
  • code-gen: generated ORDER BY for select queries withDates
  • cli: configure test timeout, setup and teardown function in test/config.js
  • store: add copyAllObjects to clone a complete bucket
  • store: configurable postgres template support

v0.0.65

  • cli: increase static test timeout to 15 seconds

v0.0.64

  • cli: various exit code fixes
  • store: add setupTestDatabase
  • cli: replace tape with custom test runner
Breaking

Tape is replace by a custom test runner.

  • Make sure to import { test } from "@lbu/cli instead of import test from tape
  • To run a test file via lbu run add mainTestFn to the file
  • Unnecessary async and .end() calls can be removed
  • Only a handful of assertions, see TestRunner

v0.0.63

  • code-gen: remove support for both files and body add the same time
  • server: remove support for fields in a multipart scenario
Breaking
  • Use separate routes when both files and body are currently on a single route.

v0.0.62

  • cli: use http-proxy directly
  • cli: support 'rs' in watch mode, mimicking nodemon
  • stdlib: add exitCode to exec
  • stdlib: rename code to exitCode in spawn
  • server,code-gen: fix serialization of nested objects
  • code-gen: postgres relation generation fixes
Breaking
  • The return type of spawn and exec now have an exitCode
  • Using a lower level http-proxy for lbu proxy

v0.0.61

  • code-gen: cleanup tags in doc blocks Conditionally render tags if they exists in doc blocks for router, apiClient and reactQuery
  • server: log key and info if originalError is also AppError
Breaking
  • code-gen: remove tag middleware
  • cli: replace nodemon with chokidar
  • server: handle multipart request with formidable (without koa-body)
  • code-gen: transform array/objects to Querystrings because of missing support in FormData

v0.0.60

  • stdlib: remove logger as argument to mainFn
  • stdlib: add process exception handling in mainFn
  • stdlib: AppError check typeof status and key parameter
Breaking
  • Remove logger argument from mainFn, change to mainFn(import.meta, () => {})

v0.0.59

  • cli: add some logging to proxy errors
  • code-gen: fix react-query enabled check

v0.0.58

  • code-gen: fix setting headers in form-data upload
  • code-gen: add support for file download in the apiClient

v0.0.57

  • cli: fix memory leak in proxy
  • cli: add some request logging to the proxy
  • server: add request content-length to server logs

v0.0.56

  • cli: use isProduction and isStaging in template
  • cli: add proxy command for local development. Usable via yarn compoas proxy
  • store: make sure sessionStore checks expired sessions
  • server: use isProduction and isStaging in defaults
  • server: simplify session handling
  • server: fix sendFile compatibility with FileStore and FileCache

v0.0.55

  • code-gen: fix reactQuery disabled options
  • code-gen: add getGroupsThatIncludeType utility
  • store: fix types for FileCache
  • stdlib: add isProduction and isStaging helpers
  • server: cors allow localhost when isStaging
  • server: set localhost cookies when server runs on staging

v0.0.54

  • code-gen: hotfix apiClient body template error (missing comma)

v0.0.53

  • docs: more docs for @lbu/server and @lbu/store
  • docs: add sitemap.xml
  • deps: bump various dependencies
  • code-gen: fix FormData package usage in the apiClient
  • code-gen: fix headers send by the apiClient when using FormData
  • code-gen: render Date as type string in all cases for frontend generation
  • stdlib: improve benchmark performance

v0.0.52

  • code-gen: add AppErrorResponse to generated reactQueries.ts
  • store: remove auto delete interval from session store
  • store: provide clean method on session store
  • server: support custom _domain and _secure on session cookies
  • server: fork koa-compose
Breaking
  • Run const store = newSessionStore(); store.clean() in a user scheduled job. The session store does not automatically cleanup old sessions
  • closeTestApp always returns a Promise

v0.0.51

  • code-gen: support generating left join queries for oneToMany relations
  • code-gen: fix for Typescript not recognizing interfaces used in JS files

v0.0.50

  • code-gen: fix bug on SelectWith query identifiers

v0.0.49

  • code-gen: fix syntax error in apiClient (introduced in v0.0.48)

v0.0.48

  • stdlib: mainFn exit with status(1) when catching errors
  • stdlib,cli: add experimental support for benchmarking
  • code-gen: support both body and files on a single route
  • code-gen: support generating left join queries for manyToOne relations
  • code-gen: various small fixes

v0.0.47

  • code-gen: small fix for reference sql generation

v0.0.46

  • store: catch migrations errors and exit correctly
  • store: add typescript types
  • lint-config: more strict on control flow
  • code-gen: fix sql injection in idIn generated queries
  • code-gen: remove mock generator
  • code-gen: add relation type
  • code-gen: only import what is needed in generated reactQueries file
Breaking
  • T.reference().field is removed. Use T.relation().manyToOne()
  • Removed the mock generator

v0.0.45

  • code-gen: hotfix sql template issues for postgres 2.0

    Fixes introduces template bug in 0.0.44

v0.0.44

  • BREAKING: code-gen: sql template column and table identifiers to camelCase

    Generated sql templates use camelCase nameschema instead of snake_case now. All migrations or queries depended on LBU structure needs to be updated.

v0.0.43

  • stdlib: add AppError#instanceOf
  • code-gen: build path params type if necessary but not provided by user
  • server: fix koa-session options type
  • store: drop Postgres connections to database if used as a template for test database
  • code-gen: simplify TypeCreator methods
  • code-gen: support inferring basic types
  • code-gen: router supports arrays for tag and group middleware
  • code-gen: support generating CREATE INDEX statements
  • code-gen: added File type
Breaking
  • Generated router exposes setBodyParsers which accepts the result of createBodyParsers()
  • Passing in dumpStructure to App.generate is required if you want the router to expose lbu structure automatically
  • TypeCreator methods now only accept a name. This affects anyOf, array and object
  • x instanceof AppError should be replaced with AppError.instanceOf(x)

v0.0.42

  • code-gen: useQuery hook now enabled by default

v0.0.41

  • server: fix cors issue, and do some micro optimizations

v0.0.40

  • code-gen: generate valid dependant queries for react-query >=2 (#88, #80)

v0.0.39

  • code-gen: always quote object keys on mock objects

v0.0.38

  • code-gen: validator supports collecting errors instead of throwing
  • code-gen: always quote object keys in types generator

v0.0.37

  • code-gen: fix generic Typescript type when key is an union type

v0.0.36

  • code-gen: fix react-query import in generated file

v0.0.35

  • server: add server testing utilities
  • code-gen: e2e testing of generated router, validator and apiClient
  • cli: remove asyncShould(Not)Throw functions added to tape
  • code-gen: generate Postgres upsert queries for all searchable fields

v0.0.34

  • code-gen: try an fix for WHERE IN generation.

v0.0.33

  • code-gen: fix api client generation of interceptors

v0.0.32

  • code-gen: various fixes
  • code-gen: fixed x-request-id in apiClient
  • code-gen: add option to disable mock and validator generator for a type

v0.0.31

  • stdlib: resolve camelToSnakeCase issue with long strings

v0.0.30

  • docs: add api docs for code-gen and server
  • code-gen: various fixes
  • deps: various bumps

v0.0.29

  • server: add support for CORS_URL env variable
  • stdlib: add type definition file
  • stdlib: add uuid.isValid function
  • code-gen: improve router generated JSDoc

v0.0.28

  • code-gen: remove axios dependency in loadFromRemote and accept as argument

v0.0.27

  • stdlib: expose pathJoin as alternative for import { join } from "path";
  • cli: add coverage command, runs tests and collects coverage information
  • insight,cli: provide typescript declaration files
  • docs: initialize docsify
  • docs: add typedoc for generating api information based on declaration files

v0.0.26

  • @lbu/code-gen: make sure to deepcopy baseData for type plugins

v0.0.25

  • @lbu/code-gen: add react-query generator
  • @lbu/lint-config: remove JSDoc plugin
  • @lbu/code-gen: make generators stable
  • @lbu/cli: update boilerplate add (test-)services code

v0.0.24

  • @lbu/code-gen: fix nested reference lookups in sql code-generation

v0.0.23

  • @lbu/lint-config: version bumps and disabled jsdoc/require-returns-description rule
  • @lbu/code-gen: minor fixes to the update queries generation

v0.0.22

  • @lbu/code-gen: fix setting column to null in update queries

v0.0.21

  • @lbu/code-gen: rework sql generator, now snake-cases table and column names
  • @lbu/code-gen: add support to generate count queries
  • @lbu/code-gen: add support to add createdAt and updatedAt fields for objects with queries enabled
  • @lbu/code-gen: add support for insert-on-update history table when generating sql
  • @lbu/code-gen: add support to dump a Postgres DDL based on lbu structure
  • @lbu/store: Most components are now backed by the sql generator
  • @lbu/lint-config: add jsdoc linting
  • @lbu/stdlib: support controlled output of newlines

v0.0.20

  • @lbu/code-gen: support OpenAPI conversion
  • @lbu/store: add file-cache, uses memory & local disk to speed up retrieving items from S3
  • *: various dependency bumps
  • @lbu/store: cleaner result on getMigrationsToBeApplied
  • @lbu/server: make sendFile compatible with file-cache

v0.0.19

  • @lbu/insight: BREAKING, remove 'varargs' support from logger
  • @lbu/code-gen: reuse generated validators
  • @lbu/code-gen: strip more new lines from output, which results in better readability

v0.0.18

  • @lbu/stdlib: vendor uuid v4 generation

v0.0.17

  • @lbu/cli: various template fixes
  • @lbu/*: various dependency updates
  • @lbu/server: add a sendFile utility
  • @lbu/stdlib: add camelToSnakecase utility
  • @lbu/store: add JobQueue implementation
  • @lbu/code-gen: normalize generate & generateStubs
  • @lbu/code-gen: add basic sql query generator

v0.0.16

  • @lbu/code-gen: minor fixes
  • @lbu/cli: add tape as a dependency
  • @lbu/store: only truncate tables in testing when there are tables to be truncated
  • @lbu/stdlib: add noop function

v0.0.15

  • @lbu/server,stdlib: move AppError to stdlib
  • @lbu/code-gen: small fixes

v0.0.14

  • @lbu/store: add session store
  • @lbu/server: add session middleware
  • @lbu/code-gen: rename _Optional to _Input
  • @lbu/code-gen: add date type

v0.0.13

  • @lbu/code-gen: add dumpStructure option to generateStubs

v0.0.12

  • Move project to Github
  • @lbu/cli: add docker clean command
  • @lbu/code-gen: remove the need to register coreTypes
  • @lbu/code-gen: support generating stubs
  • @lbu/stdlib: small fixes
  • @lbu/store: small fixes for database creation

v0.0.11

  • @lbu/store: initial release! Already supports test databases, migrations and a persistent file store in combination with minio
  • @lbu/server: remove global state from body parsers
  • @lbu/code-gen: various bug fixes. The output should be ESLint error free after formatting.
  • @lbu/cli: update template
  • @lbu/cli: improve command executor, now supports passing in flags to Node.js as well as to the program it self
  • Various test and documentation improvements

v0.0.10

  • Set minimum Node.js version to Node.js 14

  • @lbu/cli: Refactored

    • Improved argument parser, logging and reload handling
    • Supports arguments and passing arguments to Node.js
  • @lbu/code-gen: Refactored

    • Moved to a double plugin structure with Generators and Types plugins
    • Generator plugins replace the previous store and generator plugins
    • Type plugins implement TypeBuilding, and code generation for specific types. All type plugins support the core generators
    • All plugins except Models are now operating on a group based way of generating. This ensures that auto-completion stays relevant to the context that you are working in
  • @lbu/insight: removed global state from log parser

  • @lbu/insight: support arrayBuffers when printing memory usage

  • @lbu/insight: cleanup logger a bit

  • @lbu/server: supply isServerLog to check if a json object may be output from the log midleware

  • @lbu/stdlib: removed global state from teplates

  • @lbu/*: various dependency updates

  • @lbu/*: various docs improvements

v0.0.9

  • Export named functions instead of const and shorthand functions
  • @lbu/cli: Fix script ordering
  • @lbu/cli: Execute nodemon as a library
  • @lbu/code-gen: Various fixes
  • @lbu/code-gen: More logging in App build and Runner
  • @lbu/code-gen: Router refactoring, add group support. Also includes api client generated exports.
  • @lbu/code-gen: ModelBuilder refactoring, add docs, optional & default on all models
  • @lbu/lint-config: Move to Prettier 2.0
  • @lbu/insight: Return a Logger instance instead of a POJO
  • @lbu/stdlib: Remove translation system

v0.0.8

  • Various fixes
  • @lbu/insight: Simple log processing setup

v0.0.7

  • BREAKING: export es modules and drop CommonJS support
  • BREAKING: Only supporting >= Node.js 13
  • @lbu/code-gen: Big refactor, now with a separate model & mocks generator
  • @lbu/cli: Supports yarn scripts in watch mode
  • @lbu/insight: A tad faster
  • @lbu/lint-config: Support ES modules
  • @lbu/server: Refactor error handler, inline cors, improvements to defaults
  • @lbu/stdlib: Translation system, utilities for moving from CommonJS to ES modules

v0.0.6

  • @lbu/code-gen: JSDoc generation and router tags support
  • @lbu/*: Various bugs fixed

v0.0.5

  • Rewritten from scratch in plain old JavaScript
  • @lbu/cli is now more a script runner than anything else
  • @lbu/koa is replaced by @lbu/server
  • @lbu/register is removed
  • @lbu/lint-config drops Typescript support
  • @lbu/stdlib now contains a basic templating functionality
  • @lbu/code-gen is refactored, needs some more thinking before adding a fluent api back

v0.0.4

  • Replaced @lbu/validator with @lbu/code-gen
  • @lbu/code-gen supports generating validator functions and routers
  • Add @lbu/koa with some minimal middleware

v0.0.3

  • @lbu/validator refactor and pretty much stable feature wise
  • Various fixes in @lbu/cli and @lbu/stdlib

v0.0.2

  • Add @lbu/register
  • Add @lbu/cli lint command
  • Improve @lbu/cli template

v0.0.1

  • Initial release