Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.4/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "riccardoperra/codeimage" }],
"changelog": [
"@changesets/changelog-github",
{"repo": "riccardoperra/codeimage"}
],
"commit": true,
"linked": [],
"access": "restricted",
Expand Down
2 changes: 1 addition & 1 deletion .codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@
"command": "docker-compose -f ./apps/api/docker-compose.dev.yml -p codeimage up -d"
}
}
}
}
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: '🐞 - Bug Report'
title: '🐞 - '
description: Report a bug in Codeimage
labels: [ 'bug', 'state: need triage' ]
labels: ['bug', 'state: need triage']

body:
- type: dropdown
Expand All @@ -23,7 +23,7 @@ body:
id: reproduction-url
attributes:
label: Please provide a screenshot or a video to a minimal reproduction of the bug
placeholder: "Enter an url or attach a file after submitting your issue"
placeholder: 'Enter an url or attach a file after submitting your issue'

- type: textarea
id: description
Expand Down
34 changes: 13 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ name: Main

on:
pull_request:
types: [ opened, synchronize, reopened, edited, assigned ]
types: [opened, synchronize, reopened, edited, assigned]
pull_request_target:
types: [ opened, synchronize, reopened, edited, assigned ]
types: [opened, synchronize, reopened, edited, assigned]
branches:
- changeset-release/main


env:
IS_MAIN_BRANCH: ${{ github.head_ref == 'main' }}
IS_NEXT_BRANCH: ${{ github.head_ref == 'next' }}
Expand Down Expand Up @@ -74,7 +73,7 @@ jobs:

build-packages:
name: Build packages
needs: [ install ]
needs: [install]
runs-on: ubuntu-latest
steps:
- name: Checkout PR
Expand Down Expand Up @@ -103,7 +102,7 @@ jobs:
typecheck-packages:
if: ${{ needs.install.outputs.libs-change == 'true' }}
name: Type-checking
needs: [ install, build-packages ]
needs: [install, build-packages]
runs-on: ubuntu-latest
steps:
- name: Checkout PR
Expand Down Expand Up @@ -137,7 +136,7 @@ jobs:
build-app-dev:
name: Build App and Preview (Dev)
environment: Preview
needs: [ build-packages ]
needs: [build-packages]
if: ${{ github.head_ref != 'next' }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -180,11 +179,10 @@ jobs:
alias-domains: | #Optional
codeimage-app-pr-{{PR_NUMBER}}.vercel.app


build-app-next:
name: Build App and Preview (Next)
environment: Next
needs: [ build-packages ]
needs: [build-packages]
if: ${{ github.head_ref == 'next' }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -231,7 +229,7 @@ jobs:
build-highlight-dev:
name: '@codeimage/highlight dev and Preview'
environment: Preview
needs: [ build-packages ]
needs: [build-packages]
if: (${{ needs.install.outputs.app-change == 'true' }} || ${{ needs.install.outputs.libs-change == 'true' }})
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -268,7 +266,7 @@ jobs:
build-website-dev:
name: '@codeimage/website dev and Preview'
environment: Preview
needs: [ build-packages ]
needs: [build-packages]
if: (${{ needs.install.outputs.app-change == 'true' }} || ${{ needs.install.outputs.libs-change == 'true' }})
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -314,7 +312,7 @@ jobs:

website-lhci:
name: Lighthouse
needs: [ build-website-dev ]
needs: [build-website-dev]
runs-on: ubuntu-latest
steps:
- name: Checkout PR
Expand All @@ -339,7 +337,7 @@ jobs:

build-api:
name: Build Api
needs: [ install, build-packages ]
needs: [install, build-packages]
runs-on: ubuntu-latest

steps:
Expand All @@ -350,7 +348,7 @@ jobs:
- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install

- name: "[API] Generate Prisma Migration"
- name: '[API] Generate Prisma Migration'
run: |
pnpm --filter=@codeimage/api exec prisma generate
pnpm --filter=@codeimage/prisma-models build
Expand All @@ -371,7 +369,7 @@ jobs:
be-test:
if: ${{ needs.install.outputs.backend-change == 'true' }}
name: Api test
needs: [ install ]
needs: [install]
runs-on: ubuntu-latest

services:
Expand Down Expand Up @@ -433,13 +431,7 @@ jobs:
if: ${{ github.head_ref == 'next' }}
environment: Next
name: Deploy next
needs: [
lint,
build-packages,
build-api,
be-test,
build-app-next
]
needs: [lint, build-packages, build-api, be-test, build-app-next]
runs-on: ubuntu-latest
steps:
- name: Checkout PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: pnpm changeset:pr
title: "chore(release): version packages"
title: 'chore(release): version packages'
commit: 'chore(release): version packages'
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.formatOnSave": true,
"editor.bracketPairColorization.enabled": false,
"typescript.tsdk": "node_modules/typescript/lib"
}
"editor.formatOnSave": true,
"editor.bracketPairColorization.enabled": false,
"typescript.tsdk": "node_modules/typescript/lib"
}
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@

- fix: fix broken image export using safari


## 13-03-2022

`@codeimage/app@0.8.3`

- feat: add native select input on mobile modality
fix: fix select overflow on bottom bar


## 13-03-2022

`@codeimage/app@0.8.2`
Expand All @@ -54,4 +52,3 @@
**Ui** `v0.4.2`

- Workflow update

21 changes: 10 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand All @@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ You will be able to access the Project repository through this link:
https://codesandbox.io/p/github/riccardoperra/codeimage

![img.png](assets/codesandbox_fork.png)
*Preview of CodeSandbox projects with Fork action*
_Preview of CodeSandbox projects with Fork action_

[You don't know CodeSandbox Projects?](https://codesandbox.io/post/announcing-codesandbox-projects)

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@ with the owners of this repository before making a change.

See the [CONTRIBUTING.md](./CONTRIBUTING.md) guide for more details.


---


<p align="left">
<img src="https://user-images.githubusercontent.com/37072694/168666273-22af1fed-6ee5-49a5-be2a-6e0b9da998cf.png" width="600">
</p>
Expand Down
5 changes: 0 additions & 5 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"directories": {
"test": "test"
},
"exports": {
"./api-types": {
"types": "./index.d.ts"
}
},
"scripts": {
"test": "vitest",
"test:coverage": "vitest --coverage",
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/common/exceptions/HandlerError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {constants} from 'http2';
type HttpStatusCode = {
readonly [K in keyof typeof constants as K extends `HTTP_STATUS_${string}`
? K
: never]: typeof constants[K];
: never]: (typeof constants)[K];
};

export abstract class HandlerError<
Expand Down
5 changes: 1 addition & 4 deletions apps/api/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@
"module": "ES2022",
"target": "ES2022"
},
"include": [
"../src/**/*.ts",
"**/*.ts"
]
"include": ["../src/**/*.ts", "**/*.ts"]
}
2 changes: 1 addition & 1 deletion apps/api/tsconfig.dts.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"module": "NodeNext",
"target": "ES2022"
}
}
}
2 changes: 1 addition & 1 deletion apps/api/tsconfig.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"emitDeclarationOnly": true,
"emitDeclarationOnly": true
}
}
41 changes: 22 additions & 19 deletions apps/codeimage/changelog/1-4-0_08-08-2023.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This update also removed [node-tap](https://node-tap.org/) in favor of [vitest](

## 📏 No more fixed width - #503

From this version, CodeImage snippet will have a dynamic min-width based on the content which can no longer be wrapped in multiple lines. This allows you to change the size as you like, even if the code is small and you don't need to have a minimum size of 600px.
From this version, CodeImage snippet will have a dynamic min-width based on the content which can no longer be wrapped in multiple lines. This allows you to change the size as you like, even if the code is small and you don't need to have a minimum size of 600px.

<table>
<tbody>
Expand All @@ -89,6 +89,7 @@ From this version, CodeImage snippet will have a dynamic min-width based on the
## 🎴 Exported image improvements

We've updates some core behavior of [DomExport](https://github.com/riccardoperra/codeimage/tree/main/packages/dom-export) package, which is a fork of `html-to-image` to add several fixes and improvements to the image export flow:

- Snippets that overflows to the screen viewport are not cropped anymore
- Partially fixes an issue where Safari from iOS and MacOS are not always able to generate the image including the custom background or the font (https://bugs.webkit.org/show_bug.cgi?id=219770)
- Faster image generation by removing unused styles, fonts and duplicate cloned nodes
Expand All @@ -100,25 +101,27 @@ CodeImage never used a specific state manager to handle the application state. S
For this reason we've done a refactor using my personal state manager [statebuilder](https://github.com/riccardoperra/statebuilder) which allows you to manage the state in a modular way through plugins on an as-needed basis.

## What's Changed
* chore(docs): update contributing docker command by @kriskw1999 in https://github.com/riccardoperra/codeimage/pull/504
* fix: safari rename dialog not opening by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/524
* chore: update README.md by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/523
* feat: dynamic min width by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/528
* feat: integrate ESM + node18 + typescript5.0 + vitest in fastify api by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/530
* feat: customizable export options by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/510
* fix(app): canvas export image content is not rendered if it's higher than viewport by @riccardoperra in #532
* feat: customizable export options by @riccardoperra in #510
* feat: dynamic min width by @riccardoperra in #528
* feat: custom background image by @riccardoperra in #526
* fix: fix language field editor by @riccardoperra in #521
* feat: refactor UI with codeui by @riccardoperra and @hackpirodev in #506
* feat: refactor textfield with @codeui/kit by @riccardoperra in #517
* feat: refactor Pagination with @codeui/kit by @riccardoperra in #516
* fix: add radio item by @codeui/kit by @riccardoperra in #508
* feat: @codeui/kit@0.20.1 and kobalte 0.9.0 upgrade by @riccardoperra in #514
* feat: integrate submodule kit by @riccardoperra in #513

- chore(docs): update contributing docker command by @kriskw1999 in https://github.com/riccardoperra/codeimage/pull/504
- fix: safari rename dialog not opening by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/524
- chore: update README.md by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/523
- feat: dynamic min width by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/528
- feat: integrate ESM + node18 + typescript5.0 + vitest in fastify api by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/530
- feat: customizable export options by @riccardoperra in https://github.com/riccardoperra/codeimage/pull/510
- fix(app): canvas export image content is not rendered if it's higher than viewport by @riccardoperra in #532
- feat: customizable export options by @riccardoperra in #510
- feat: dynamic min width by @riccardoperra in #528
- feat: custom background image by @riccardoperra in #526
- fix: fix language field editor by @riccardoperra in #521
- feat: refactor UI with codeui by @riccardoperra and @hackpirodev in #506
- feat: refactor textfield with @codeui/kit by @riccardoperra in #517
- feat: refactor Pagination with @codeui/kit by @riccardoperra in #516
- fix: add radio item by @codeui/kit by @riccardoperra in #508
- feat: @codeui/kit@0.20.1 and kobalte 0.9.0 upgrade by @riccardoperra in #514
- feat: integrate submodule kit by @riccardoperra in #513

## New Contributors
* @kriskw1999 made their first contribution in https://github.com/riccardoperra/codeimage/pull/504

- @kriskw1999 made their first contribution in https://github.com/riccardoperra/codeimage/pull/504

**Full Changelog**: https://github.com/riccardoperra/codeimage/compare/v1.3.1...v1.4.0
Loading
Loading