Skip to content

Commit

Permalink
Merge pull request #229 from palmaresHQ:esmodules
Browse files Browse the repository at this point in the history
Esmodules
  • Loading branch information
nicolasmelo1 authored Sep 7, 2024
2 parents 7dfbbbd + c5f4e08 commit 55610ec
Show file tree
Hide file tree
Showing 217 changed files with 7,941 additions and 477 deletions.
18 changes: 16 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,19 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
"ignore": [
"@examples/with-code-share",
"@examples/with-code-share-shared",
"@examples/with-code-share-server",
"@examples/with-code-share-client",
"@examples/deel-hometask-challenge",
"@examples/next-client-app",
"@examples/server-palmares",
"@examples/server-express-only",
"@examples/next-monorepo",
"@example/basic",
"@examples/bench",
"@example/tests",
"@examples/schemas"
]
}
23 changes: 23 additions & 0 deletions .changeset/cool-kiwis-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@palmares/eventemitter2-emitter': patch
'@palmares/server-vercel': patch
'@palmares/sequelize-engine': patch
'@palmares/console-logging': patch
'@palmares/express-adapter': patch
'@palmares/drizzle-engine': patch
'@palmares/vercel-adapter': patch
'@palmares/redis-emitter': patch
'@palmares/databases': patch
'@palmares/logging': patch
'@palmares/schemas': patch
'@palmares/jest-tests': patch
'@palmares/zod-schema': patch
'@palmares/client': patch
'@palmares/events': patch
'@palmares/server': patch
'@palmares/tests': patch
'@palmares/node-std': patch
'@palmares/core': patch
---

- Added ESModules support, you can have deeply nested packages and it wont affect the function of your app. For example, if module A has a dependency in @palmares/schema, and palmares schema depends on @palmares/core, it will work normally
13 changes: 13 additions & 0 deletions examples/basic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @example/basic

## 0.0.19

### Patch Changes

- Everything now has peer dependencies instead of dependency
- Updated dependencies
- Updated dependencies
- @palmares/databases@0.1.16
- @palmares/server@0.1.13
- @palmares/core@0.1.13
- @palmares/express-adapter@0.1.14
- @palmares/sequelize-engine@0.1.16

## 0.0.18

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@example/basic",
"version": "0.0.18",
"version": "0.0.19",
"private": true,
"description": "This is a basic example application, just to test if everything works as expected",
"main": "manage.ts",
Expand Down
16 changes: 16 additions & 0 deletions examples/bench/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @examples/bench

## 0.0.19

### Patch Changes

- Everything now has peer dependencies instead of dependency
- Updated dependencies
- Updated dependencies
- @palmares/console-logging@0.1.7
- @palmares/databases@0.1.16
- @palmares/server@0.1.13
- @palmares/core@0.1.13
- @palmares/express-adapter@0.1.14
- @palmares/node-std@0.1.13
- @palmares/sequelize-engine@0.1.16
- @palmares/logging@0.1.13

## 0.0.18

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/bench/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@examples/bench",
"version": "0.0.18",
"version": "0.0.19",
"description": "asdasdasd",
"main": "manage.ts",
"scripts": {
Expand Down
18 changes: 18 additions & 0 deletions examples/deel-hometask-challenge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @examples/deel-hometask-challenge

## 0.0.25

### Patch Changes

- Everything now has peer dependencies instead of dependency
- Updated dependencies
- Updated dependencies
- @palmares/console-logging@0.1.7
- @palmares/databases@0.1.16
- @palmares/server@0.1.13
- @palmares/core@0.1.13
- @palmares/express-adapter@0.1.14
- @palmares/node-std@0.1.13
- @palmares/sequelize-engine@0.1.16
- @palmares/zod-schema@0.1.22
- @palmares/logging@0.1.13
- @palmares/schemas@0.1.20

## 0.0.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/deel-hometask-challenge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@examples/deel-hometask-challenge",
"version": "0.0.24",
"version": "0.0.25",
"description": "This is the home task challenge solution for deel",
"main": "manage.ts",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions examples/next-monorepo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @examples/next-monorepo

## 0.0.6

### Patch Changes

- Everything now has peer dependencies instead of dependency

## 0.0.5

### Patch Changes
Expand Down
14 changes: 14 additions & 0 deletions examples/next-monorepo/next-client-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# @examples/next-client-app

## 0.1.1

### Patch Changes

- Updated dependencies
- Updated dependencies
- @palmares/console-logging@0.1.7
- @palmares/server@0.1.13
- @palmares/core@0.1.13
- @palmares/node-std@0.1.13
- @palmares/vercel-adapter@0.0.17
- @palmares/logging@0.1.13
2 changes: 1 addition & 1 deletion examples/next-monorepo/next-client-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@examples/next-client-app",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 1 addition & 1 deletion examples/next-monorepo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@examples/next-monorepo",
"version": "0.0.5",
"version": "0.0.6",
"description": "testing the serverless vercel on a next app",
"keywords": [],
"author": "",
Expand Down
15 changes: 15 additions & 0 deletions examples/next-monorepo/server-palmares/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# @examples/server-palmares

## 0.0.2

### Patch Changes

- Updated dependencies
- Updated dependencies
- @palmares/console-logging@0.1.7
- @palmares/server@0.1.13
- @palmares/core@0.1.13
- @palmares/express-adapter@0.1.14
- @palmares/node-std@0.1.13
- @palmares/vercel-adapter@0.0.17
- @palmares/logging@0.1.13
2 changes: 1 addition & 1 deletion examples/next-monorepo/server-palmares/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@examples/server-palmares",
"version": "0.0.1",
"version": "0.0.2",
"description": "testing the serverless vercel",
"main": "manage.ts",
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions examples/schemas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @examples/schemas

## 0.0.25

### Patch Changes

- Everything now has peer dependencies instead of dependency
- Updated dependencies
- Updated dependencies
- @palmares/zod-schema@0.1.22
- @palmares/schemas@0.1.20

## 0.0.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/schemas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@examples/schemas",
"version": "0.0.24",
"version": "0.0.25",
"description": "asdasdasd",
"main": "./src/index.ts",
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions examples/server-express-only/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @examples/server-express-only

## 0.0.17

### Patch Changes

- Everything now has peer dependencies instead of dependency
- Updated dependencies
- Updated dependencies
- @palmares/console-logging@0.1.7
- @palmares/server@0.1.13
- @palmares/core@0.1.13
- @palmares/express-adapter@0.1.14
- @palmares/node-std@0.1.13
- @palmares/logging@0.1.13

## 0.0.16

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/server-express-only/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@examples/server-express-only",
"version": "0.0.16",
"version": "0.0.17",
"description": "This is an example just to see if the server works as expected",
"main": "manage.ts",
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions examples/server-vercel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @palmares/server-vercel

## 0.0.17

### Patch Changes

- Everything now has peer dependencies instead of dependency
- Updated dependencies
- Updated dependencies
- @palmares/console-logging@0.1.7
- @palmares/server@0.1.13
- @palmares/core@0.1.13
- @palmares/node-std@0.1.13
- @palmares/vercel-adapter@0.0.17
- @palmares/logging@0.1.13

## 0.0.16

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/server-vercel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@palmares/server-vercel",
"version": "0.0.16",
"version": "0.0.17",
"description": "testing the serverless vercel",
"main": "manage.ts",
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions examples/tests/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @example/tests

## 0.0.16

### Patch Changes

- Everything now has peer dependencies instead of dependency
- Updated dependencies
- Updated dependencies
- @palmares/console-logging@0.1.7
- @palmares/core@0.1.13
- @palmares/jest-tests@0.1.13
- @palmares/node-std@0.1.13
- @palmares/logging@0.1.13
- @palmares/tests@0.1.13

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@example/tests",
"version": "0.0.15",
"version": "0.0.16",
"description": "testing the tests",
"main": "manage.ts",
"scripts": {
Expand Down
26 changes: 26 additions & 0 deletions examples/with-code-share/apps/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*storybook.log
27 changes: 27 additions & 0 deletions examples/with-code-share/apps/client/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { StorybookConfig } from "@storybook/react-vite";

import { join, dirname } from "path";

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, "package.json")));
}
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
getAbsolutePath("@storybook/addon-onboarding"),
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@chromatic-com/storybook"),
getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
name: getAbsolutePath("@storybook/react-vite"),
options: {},
},
};
export default config;
19 changes: 19 additions & 0 deletions examples/with-code-share/apps/client/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import '../src/index.css'
import type { Preview } from "@storybook/react";

import { setDefaultAdapter, ZodSchemaAdapter } from 'shared'

setDefaultAdapter(new ZodSchemaAdapter());

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
10 changes: 10 additions & 0 deletions examples/with-code-share/apps/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# client

## 0.0.1

### Patch Changes

- Updated dependencies
- Updated dependencies
- @palmares/client@0.1.13
- [email protected]
Loading

0 comments on commit 55610ec

Please sign in to comment.