Skip to content

Commit

Permalink
v12 is for Adriana (#1112)
Browse files Browse the repository at this point in the history
![CANDLELIGHT VIGIL IN MEMORY OF
ADRIANA](https://github.com/RobinTail/express-zod-api/assets/13189514/6f0242d5-4294-42b1-a7ad-5587cd3d4474)

Adriana dreamt of leaving Armenia to work as a model in a country where
pursuing a public-facing career would not expose her to danger. In this
dream, she would take her dog Froggie and flee to a place where she
could start a family of her own. She did not believe she was strong
enough to endure the discrimination and bigotry she would face in
Armenia, where there are no laws protecting the rights of the
transgender community.

She shared these aspirations with her friend Monica. Adriana never had a
large circle of friends. She sought “quality, not quantity in
friendship,” in Monica’s words. She also shared her fears with her
friend. Adriana always felt that she was in danger, but the police
dismissed her reports as products of her “imagination, not real proof.”


https://armenianweekly.com/2023/08/23/i-want-to-live-trans-woman-murdered-in-armenia/

28-year-old trans woman Adriana was brutally murdered in her own
apartment in Yerevan. The incident took place on August 20, 2023, after
the murder, the apartment was burned. Adriana said a week ago that she
was being followed and threatened.
A criminal proceeding was initiated in connection with the case,
according to the features of Article 155, Part 1 and Article 264, Part
2, Clauses 2 and 6 of the RA Criminal Code.
26-year-old suspect from Armavir region was found at the Bavra border
checkpoint, arrested, and transferred to the Central Department of the
Ministry of Internal Affairs. He was presented to the body conducting
the proceedings and questioned about the circumstances of the incident,
during which he admitted that he had committed the murder, after which
he had set the apartment on fire and tried to cross the state border.


http://rightsidengo.com/news/public-statement-trans-woman-brutally-killed-in-yerevan/

The cases of hatred and violence against Trans and LGBIQ people do not
find an appropriate response, which has already led to the formation of
an atmosphere of impunity. Unfortunately, even at this tragic moment,
when the LGBTIQ community and the relatives of the brutally murdered
trans woman were sharing their pain and grief by holding a symbolic
candlelight vigil, a group of people dared to attack and throw eggs,
bottles, stones, and sand at the gathered people, causing anxiety and
panic among persons who already were in a tough psychological situation.


http://rightsidengo.com/news/during-the-candlelight-vigil-in-memory-of-adriana-a-group-of-people-threw-eggs-bottles-and-stones-at-the-crowd/

---------------------

- #1111 
- Closes #1059 
-
https://github.com/RobinTail/express-zod-api/blob/970efbb8510797e8d3e3ecdc2f33ebb8191d59c4/tsup.config.ts#L7
- #1113 
- Closes #1114 
- #1115 
-
https://github.com/RobinTail/express-zod-api/blob/970efbb8510797e8d3e3ecdc2f33ebb8191d59c4/src/integration.ts#L308
- #1117 
- #1118 
- #1119 
-
https://github.com/RobinTail/express-zod-api/blob/970efbb8510797e8d3e3ecdc2f33ebb8191d59c4/tests/unit/documentation.spec.ts#L497
-
https://github.com/RobinTail/express-zod-api/blob/970efbb8510797e8d3e3ecdc2f33ebb8191d59c4/src/metadata.ts#L23-L28
- #1120 
- #1136
  • Loading branch information
RobinTail authored Sep 6, 2023
1 parent 50f1664 commit f450c99
Show file tree
Hide file tree
Showing 38 changed files with 706 additions and 619 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"files": [
"./tools/*.ts",
"./tests/**/*.ts",
"./eslint-local-rules/*.*s"
"./eslint-local-rules/*.*s",
"./tsup.config.ts"
],
"rules": {
"import/no-extraneous-dependencies": "off"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master, v8, v9 ]
branches: [ master, v10, v11 ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, v8, v9 ]
branches: [ master, v10, v11 ]
schedule:
- cron: '26 8 * * 1'

Expand Down Expand Up @@ -51,15 +51,15 @@ jobs:
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# Auto-build attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- name: Auto-build
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# ✏️ If the Auto-build fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- uses: fregante/setup-git-user@v1
- run: |
yarn install
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master, v9, v10 ]
branches: [ master, v10, v11 ]
pull_request:
branches: [ master, v9, v10 ]
branches: [ master, v10, v11 ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.14.0, 16.x, 18.0.0, 18.x, 19.0.0, 19.x, 20.1.0, 20.x]
node-version: [18.0.0, 18.x, 20.1.0, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Get yarn cache dir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: npm publish --tag ${{ inputs.tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- uses: fregante/setup-git-user@v1
- run: |
yarn install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: OpenAPI Validation

on:
push:
branches: [ master, v8, v9 ]
branches: [ master, v10, v11 ]
pull_request:
branches: [ master, v8, v9 ]
branches: [ master, v10, v11 ]


jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
dist
dist-esm
yarn-error.log
.idea
.npmrc
coverage
tests/integration/node_modules
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ dist
yarn-error.log
.npmrc
coverage
tests/integration/node_modules
tests/integration/yarn-error.log
tests/integration/yarn.lock
tests/integration/quick-start.ts
tests/integration/package.json
tests/integration/tsconfig.json
tests/esm/node_modules
tests/esm/yarn-error.log
tests/esm/yarn.lock
tests/esm/quick-start.ts
Expand Down
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## Version 12

### v12.0.0

- **Breaking changes**:
- `winston` becomes a peer dependency — you need to install it manually.
- Minimum Node versions supported: 18.0.0 and 20.1.0.
- Node versions 16 and 19 are EOL and no longer supported.
- Minimum Typescript version supported: 5.1.3.
- Minimum Jest version supported: 28 (optional peer dependency for testing endpoints).
- Other changes:
- The distribution now consists of 4 files in `dist` directory:
- for ESM: `index.mjs` and `index.d.mts`,
- for CJS: `index.js` and `index.d.ts`.
- Routes having URL params are no longer quoted in the generated documentation.
- This change is caused by a fix to the `yaml` dependency.

```yaml
before:
"/v1/user/{id}":
after:
/v1/user/{id}:
```
## Version 11
### v11.7.0
Expand Down Expand Up @@ -2238,7 +2262,7 @@ const fileStreamingEndpointsFactoryAfter = new EndpointsFactory(
### v2.0.0

- First stable release of the v2.
- All dependencies are up to date.
- All dependencies are up-to-date.
- Minor changes of response descriptions in OpenAPI / Swagger documentation generator.

### v2.0.0-beta4
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ Typescript is an optional dependency, however, it's required if you're going to
[generate a frontend client](#generating-a-frontend-client) for your API.

```shell
yarn add express-zod-api express zod typescript
yarn add express-zod-api express zod winston typescript
# or
npm install express-zod-api express zod typescript
npm install express-zod-api express zod winston typescript
```

Add the following option to your `tsconfig.json` file in order to make it work as expected:
Expand Down Expand Up @@ -755,7 +755,7 @@ createConfig({

## Enabling compression

According to [Express JS best practices guide](http://expressjs.com/en/advanced/best-practice-performance.html)
According to [Express.js best practices guide](http://expressjs.com/en/advanced/best-practice-performance.html)
it might be a good idea to enable GZIP compression of your API responses. You can achieve and customize it by using the
corresponding configuration option when using the `createServer()` method.

Expand Down Expand Up @@ -972,7 +972,7 @@ Despite being supported by the library, `z.coerce.*` schema
Please be aware that `z.coerce.number()` and `z.number({ coerce: true })` (being typed not well) still will NOT allow
you to assign anything but number. Moreover, coercive schemas are not fail-safe and their methods `.isOptional()` and
`.isNullable()` [are buggy](https://github.com/colinhacks/zod/issues/1911). If possible, try to avoid using this type
of schemas. This issue [will NOT be fixed](https://github.com/colinhacks/zod/issues/1760#issuecomment-1407816838) in
of schema. This issue [will NOT be fixed](https://github.com/colinhacks/zod/issues/1760#issuecomment-1407816838) in
Zod version 3.x.

## Excessive properties in endpoint output
Expand Down
5 changes: 3 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

| Version | Supported |
| ------: | :----------------: |
| 12.x.x | :white_check_mark: |
| 11.x.x | :white_check_mark: |
| 10.x.x | :white_check_mark: |
| 10.x.x | :x: |
| 9.x.x | :x: |
| 8.x.x | :x: |
| 7.x.x | :x: |
Expand All @@ -22,6 +23,6 @@
Found a vulnerability or other security issue?

Please urgently inform me privately by
[email](https://github.com/RobinTail/express-zod-api/blob/master/package.json#L122).
[email](https://github.com/RobinTail/express-zod-api/blob/master/package.json#L133).

I will try to fix it as soon as possible.
6 changes: 3 additions & 3 deletions example/example.swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: Example API
version: 11.7.0
version: 12.0.0-beta3
paths:
/v1/user/retrieve:
get:
Expand Down Expand Up @@ -89,7 +89,7 @@ paths:
type: string
pattern: /\d+/
description: a numeric string containing the id of the user
"/v1/user/{id}":
/v1/user/{id}:
post:
operationId: PostV1UserId
responses:
Expand Down Expand Up @@ -428,5 +428,5 @@ tags:
- name: files
description: Everything about the files processing
servers:
- url: http://example.com
- url: https://example.com

2 changes: 1 addition & 1 deletion example/generate-open-api-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ console.log(
config,
version: manifest.version,
title: "Example API",
serverUrl: "http://example.com",
serverUrl: "https://example.com",
}).getSpecAsYaml(),
);
69 changes: 35 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "express-zod-api",
"version": "11.7.0",
"version": "12.0.0-beta3",
"description": "A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.",
"license": "MIT",
"scripts": {
"start": "ts-node example/index.ts",
"build": "yarn build:compile && yarn build:tests && yarn build:assets",
"build:compile": "tsup && mv dist/index.d.mts dist/esm/index.d.ts",
"build:tests": "yarn build:intTest && yarn build:esmTest",
"build:intTest": "ts-node tools/integration-test.ts && yarn install --cwd ./tests/integration && ts-node tools/int-test-package.ts",
"build:esmTest": "ts-node tools/esm-test.ts && yarn install --cwd ./tests/esm && ts-node tools/esm-test-package.ts",
"build:compile": "tsup && attw --pack",
"build:tests": "yarn build:int && yarn build:esm",
"build:int": "ts-node tools/integration-test.ts && yarn install --cwd ./tests/integration",
"build:esm": "ts-node tools/esm-test.ts && yarn install --cwd ./tests/esm",
"build:assets": "yarn build:swagger && yarn build:client && yarn build:license",
"build:swagger": "ts-node example/generate-open-api-schema.ts > example/example.swagger.yaml",
"build:client": "ts-node example/generate-client.ts > example/example.client.ts && yarn prettier example/example.client.ts --write",
Expand All @@ -30,12 +30,12 @@
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/esm/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
Expand All @@ -44,25 +44,25 @@
}
},
"dependencies": {
"@types/compression": "^1.7.2",
"@types/express-fileupload": "^1.2.2",
"@types/http-errors": "^2.0.0",
"@types/compression": "^1.7.3",
"@types/express-fileupload": "^1.4.1",
"@types/http-errors": "^2.0.1",
"@types/node": "*",
"compression": "1.7.4",
"express-fileupload": "1.4.0",
"http-errors": "2.0.0",
"mime": "3.0.0",
"openapi3-ts": "^4.1.2",
"ramda": "0.29.0",
"triple-beam": "1.4.1",
"winston": "3.10.0"
"triple-beam": "^1.4.1"
},
"peerDependencies": {
"@types/express": "^4.17.13",
"@types/jest": "*",
"express": "^4.18.2",
"jest": ">=25 <30",
"typescript": "^4.9.3 || ^5.0.2",
"jest": ">=28 <30",
"typescript": "^5.1.3",
"winston": "^3.10.0",
"zod": "^3.21.4"
},
"peerDependenciesMeta": {
Expand All @@ -80,46 +80,47 @@
}
},
"devDependencies": {
"@swc/core": "^1.3.39",
"@swc/jest": "^0.2.24",
"@tsconfig/node16": "^16.1.0",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@arethetypeswrong/cli": "^0.10.1",
"@swc/core": "^1.3.82",
"@swc/jest": "^0.2.29",
"@tsconfig/node18": "^18.2.1",
"@types/cors": "^2.8.14",
"@types/express": "^4.17.17",
"@types/has-ansi": "^5.0.0",
"@types/jest": "^29.0.0",
"@types/jest": "^29.5.4",
"@types/mime": "^3.0.1",
"@types/node-fetch": "^2.6.4",
"@types/ramda": "^0.29.0",
"@types/ramda": "^0.29.3",
"@types/triple-beam": "^1.3.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"chalk": "^4.1.2",
"cors": "^2.8.5",
"eslint": "^8.23.0",
"eslint": "^8.48.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-unicorn": "^48.0.0",
"eslint-plugin-unicorn": "^48.0.1",
"express": "^4.18.2",
"form-data": "^4.0.0",
"has-ansi": "^4.0.1",
"husky": "^8.0.1",
"jest": "^29.0.2",
"husky": "^8.0.3",
"jest": "^29.6.4",
"make-coverage-badge": "^1.2.0",
"mockdate": "^3.0.5",
"node-fetch": "^2.6.11",
"prettier": "3.0.3",
"strip-ansi": "^6.0.1",
"ts-node": "^10.9.1",
"tsd": "^0.29.0",
"tsup": "^7.0.0",
"typescript": "^5.0.2",
"zod": "^3.21.4"
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"winston": "^3.10.0",
"zod": "^3.22.2"
},
"engines": {
"node": "^16.14.0 || ^18.0.0 || ^19.0.0 || ^20.1.0"
"node": "^18.0.0 || ^20.1.0"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit f450c99

Please sign in to comment.