Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: main package json #1826

Merged
merged 4 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
🚚
  • Loading branch information
manucorporat committed Oct 20, 2022
commit 329a54282ed7c33058282a679b8f834fa805cc70
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"node-fetch": "3.2.10",
"path-browserify": "1.0.1",
"prettier": "2.7.1",
"rollup": "2.78.0",
"rollup": "2.79.1",
"semver": "7.3.8",
"snoop": "^1.0.4",
"tailwindcss": "3.2.0",
Expand All @@ -96,7 +96,7 @@
"tsm": "2.2.2",
"typescript": "4.8.4",
"uvu": "^0.5.6",
"vite": "3.1.8",
"vite": "3.2.0-beta.3",
"vite-tsconfig-paths": "3.5.1",
"wasm-pack": "0.10.3",
"watchlist": "^0.3.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/qwik-city/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"version": "0.0.112",
"description": "The meta-framework for Qwik.",
"main": "./lib/index.qwik.mjs",
"module": "./lib/index.qwik.mjs",
"qwik": "./lib/index.qwik.mjs",
"types": "./lib/index.d.ts",
"type": "module",
"exports": {
".": {
"types": "./lib/index.d.ts",
"import": "./lib/index.qwik.mjs",
"require": "./lib/index.qwik.cjs"
},
Expand Down
1 change: 1 addition & 0 deletions packages/qwik-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
},
"type": "module",
"main": "./lib/index.qwik.mjs",
"module": "./lib/index.qwik.mjs",
"qwik": "./lib/index.qwik.mjs",
"types": "./lib/types/index.d.ts"
}
3 changes: 2 additions & 1 deletion packages/qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@builder.io/qwik",
"version": "0.11.1",
"description": "An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",
"main": "./dist/core.cjs",
"main": "./dist/core.mjs",
"module": "./dist/core.mjs",
"types": "./dist/core.d.ts",
"bin": "./dist/qwik.cjs",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/qwik/src/optimizer/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ export interface QwikPluginOptions {
vendorRoots?: string[];
manifestOutput?: ((manifest: QwikManifest) => Promise<void> | void) | null;
manifestInput?: QwikManifest | null;
input?: string[] | string;
input?: string[] | string | { [entry: string]: string };
outDir?: string;
srcDir?: string | null;
scope?: string | null;
Expand Down
9 changes: 9 additions & 0 deletions scripts/package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ export async function generatePackageJson(config: BuildConfig) {
description: rootPkg.description,
license: rootPkg.license,
main: './core.mjs',
module: './core.mjs',
types: './core.d.ts',
bin: {
qwik: './qwik.cjs',
},
type: 'module',
exports: {
'.': {
types: './core.d.ts',
import: {
min: './core.min.mjs',
production: './core.prod.mjs',
Expand All @@ -37,34 +39,41 @@ export async function generatePackageJson(config: BuildConfig) {
require: './cli.cjs',
},
'./jsx-runtime': {
types: './jsx-runtime.d.ts',
import: './jsx-runtime.mjs',
require: './jsx-runtime.cjs',
},
'./jsx-dev-runtime': {
types: './jsx-runtime.d.ts',
import: './jsx-runtime.mjs',
require: './jsx-runtime.cjs',
},
'./build': {
types: './build/index.d.ts',
import: './build/index.mjs',
require: './build/index.cjs',
},
'./loader': {
types: './loader/index.d.ts',
import: './loader/index.mjs',
require: './loader/index.cjs',
},
'./optimizer.cjs': './optimizer.cjs',
'./optimizer.mjs': './optimizer.mjs',
'./optimizer': {
types: './optimizer.d.ts',
import: './optimizer.mjs',
require: './optimizer.cjs',
},
'./server.cjs': './server.cjs',
'./server.mjs': './server.mjs',
'./server': {
types: './server.d.ts',
import: './server.mjs',
require: './server.cjs',
},
'./testing': {
types: './testing/index.d.ts',
import: './testing/index.mjs',
require: './testing/index.cjs',
},
Expand Down
11 changes: 11 additions & 0 deletions scripts/qwik-city.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,44 +42,55 @@ export async function buildQwikCity(config: BuildConfig) {
type: 'module',
exports: {
'.': {
types: './index.d.ts',
import: './index.qwik.mjs',
require: './index.qwik.cjs',
},
'./adaptors/cloudflare-pages/vite': {
types: './adaptors/cloudflare-pages/vite/index.d.ts',
import: './adaptors/cloudflare-pages/vite/index.mjs',
require: './adaptors/cloudflare-pages/vite/index.cjs',
},
'./adaptors/express/vite': {
types: './adaptors/express/vite/index.d.ts',
import: './adaptors/express/vite/index.mjs',
require: './adaptors/express/vite/index.cjs',
},
'./adaptors/netlify-edge/vite': {
types: './adaptors/netlify-edge/vite/index.d.ts',
import: './adaptors/netlify-edge/vite/index.mjs',
require: './adaptors/netlify-edge/vite/index.cjs',
},
'./adaptors/static/vite': {
types: './adaptors/static/vite/index.d.ts',
import: './adaptors/static/vite/index.mjs',
require: './adaptors/static/vite/index.cjs',
},
'./middleware/cloudflare-pages': {
types: './middleware/cloudflare-pages/index.d.ts',
import: './middleware/cloudflare-pages/index.mjs',
},
'./middleware/node': {
types: './middleware/node/index.d.ts',
import: './middleware/node/index.mjs',
require: './middleware/node/index.cjs',
},
'./middleware/netlify-edge': {
types: './middleware/netlify-edge/index.d.ts',
import: './middleware/netlify-edge/index.mjs',
},
'./static': {
types: './static/index.d.ts',
import: './static/index.mjs',
require: './static/index.cjs',
},
'./vite': {
types: './vite/index.d.ts',
import: './vite/index.mjs',
require: './vite/index.cjs',
},
'./service-worker': {
types: './service-worker.d.ts',
import: './service-worker.mjs',
require: './service-worker.cjs',
},
Expand Down
5 changes: 3 additions & 2 deletions starters/apps/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"description": "Create a component library",
"version": "0.0.1",
"private": false,
"main": "./lib/index.qwik.cjs",
"main": "./lib/index.qwik.mjs",
"qwik": "./lib/index.qwik.mjs",
"module": "./lib/index.qwik.mjs",
"types": "./lib-types/index.d.ts",
"type": "module",
"exports": {
".": {
"import": "./lib/index.qwik.mjs",
"require": "./lib/index.qwik.cjs"
"require": "./lib/index.qwik.cjs",
"types": "./lib-types/index.d.ts"
}
},
"files": [
Expand Down
49 changes: 42 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7548,7 +7548,7 @@ __metadata:
languageName: node
linkType: hard

"postcss@npm:8.4.18, postcss@npm:^8.4.17":
"postcss@npm:8.4.18, postcss@npm:^8.4.17, postcss@npm:^8.4.18":
version: 8.4.18
resolution: "postcss@npm:8.4.18"
dependencies:
Expand Down Expand Up @@ -7787,7 +7787,7 @@ __metadata:
node-fetch: 3.2.10
path-browserify: 1.0.1
prettier: 2.7.1
rollup: 2.78.0
rollup: 2.79.1
semver: 7.3.8
snoop: ^1.0.4
tailwindcss: 3.2.0
Expand All @@ -7797,7 +7797,7 @@ __metadata:
tsm: 2.2.2
typescript: 4.8.4
uvu: ^0.5.6
vite: 3.1.8
vite: 3.2.0-beta.3
vite-tsconfig-paths: 3.5.1
wasm-pack: 0.10.3
watchlist: ^0.3.1
Expand Down Expand Up @@ -8217,17 +8217,17 @@ __metadata:
languageName: node
linkType: hard

"rollup@npm:2.78.0":
version: 2.78.0
resolution: "rollup@npm:2.78.0"
"rollup@npm:2.79.1, rollup@npm:^2.79.1":
version: 2.79.1
resolution: "rollup@npm:2.79.1"
dependencies:
fsevents: ~2.3.2
dependenciesMeta:
fsevents:
optional: true
bin:
rollup: dist/bin/rollup
checksum: 01b5a7ae082d2a14201c973ee973099f0899cc87b65063d5ca5a77c05eeefb3b51e14b1346cf1a0fc879ac2cbb87239d4f960917bfc30b7c52f5dce50a7f56e7
checksum: 6a2bf167b3587d4df709b37d149ad0300692cc5deb510f89ac7bdc77c8738c9546ae3de9322b0968e1ed2b0e984571f5f55aae28fa7de4cfcb1bc5402a4e2be6
languageName: node
linkType: hard

Expand Down Expand Up @@ -9358,6 +9358,41 @@ __metadata:
languageName: node
linkType: hard

"vite@npm:3.2.0-beta.3":
version: 3.2.0-beta.3
resolution: "vite@npm:3.2.0-beta.3"
dependencies:
esbuild: ^0.15.9
fsevents: ~2.3.2
postcss: ^8.4.18
resolve: ^1.22.1
rollup: ^2.79.1
peerDependencies:
less: "*"
sass: "*"
stylus: "*"
sugarss: "*"
terser: ^5.4.0
dependenciesMeta:
fsevents:
optional: true
peerDependenciesMeta:
less:
optional: true
sass:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
bin:
vite: bin/vite.js
checksum: 54cd5bc0d56afb03cb7cd9c4e2ddfa3d98dbae5e318fd84ac67309ff2596692ee7f6fc4907a88786bd6ffdb6cbc04b96cc7df541410d32ba019f2b31fb13ace0
languageName: node
linkType: hard

"vm2@npm:^3.9.8":
version: 3.9.11
resolution: "vm2@npm:3.9.11"
Expand Down