From e05673f4d3ff831f7851b314bd7f5ddcbfca9bc0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 26 Oct 2018 15:44:50 -0400 Subject: [PATCH] refactor: rename packages --- package.json | 2 +- packages/{compiler => compiler-core}/.npmignore | 0 packages/compiler-core/README.md | 1 + packages/compiler-core/index.js | 7 +++++++ packages/{compiler => compiler-core}/package.json | 8 ++++---- packages/{compiler => compiler-core}/src/index.ts | 0 packages/compiler/README.md | 1 - packages/compiler/index.js | 7 ------- packages/core/index.js | 7 ------- packages/observer/README.md | 2 +- packages/renderer-dom/index.js | 7 ------- packages/renderer-server/README.md | 1 - packages/renderer-server/index.js | 7 ------- packages/renderer-test/index.js | 7 ------- packages/{core => runtime-core}/.npmignore | 0 packages/{core => runtime-core}/README.md | 4 ++-- .../__tests__/attrsFallthrough.spec.ts | 2 +- .../__tests__/fragment.spec.ts | 2 +- .../__tests__/inheritance.spec.ts | 4 ++-- .../{core => runtime-core}/__tests__/mixins.spec.ts | 4 ++-- .../__tests__/parentChain.spec.ts | 2 +- packages/runtime-core/index.js | 7 +++++++ packages/{core => runtime-core}/jsx.d.ts | 0 packages/{core => runtime-core}/package.json | 8 ++++---- packages/{core => runtime-core}/src/component.ts | 0 .../{core => runtime-core}/src/componentComputed.ts | 0 .../{core => runtime-core}/src/componentOptions.ts | 0 .../{core => runtime-core}/src/componentProps.ts | 0 .../{core => runtime-core}/src/componentProxy.ts | 0 .../{core => runtime-core}/src/componentState.ts | 0 .../{core => runtime-core}/src/componentUtils.ts | 0 .../{core => runtime-core}/src/componentWatch.ts | 0 .../{core => runtime-core}/src/createRenderer.ts | 0 packages/{core => runtime-core}/src/errorHandling.ts | 0 packages/{core => runtime-core}/src/flags.ts | 0 packages/{core => runtime-core}/src/h.ts | 0 packages/{core => runtime-core}/src/index.ts | 0 .../src/optional/asyncComponent.ts | 0 .../{core => runtime-core}/src/optional/await.ts | 0 .../{core => runtime-core}/src/optional/context.ts | 0 .../src/optional/directives.ts | 0 .../src/optional/eventEmitter.ts | 0 .../{core => runtime-core}/src/optional/keepAlive.ts | 0 .../{core => runtime-core}/src/optional/mixins.ts | 0 packages/{core => runtime-core}/src/vdom.ts | 0 packages/{core => runtime-core}/src/warning.ts | 0 packages/{renderer-dom => runtime-dom}/.npmignore | 0 packages/{renderer-dom => runtime-dom}/README.md | 4 ++-- packages/runtime-dom/index.js | 7 +++++++ packages/{renderer-dom => runtime-dom}/jsx.d.ts | 0 packages/{renderer-dom => runtime-dom}/package.json | 12 ++++++------ .../src/components/transition-group.ts | 0 .../src/components/transition.ts | 0 packages/{renderer-dom => runtime-dom}/src/index.ts | 4 ++-- .../src/modules/attrs.ts | 0 .../src/modules/class.ts | 0 .../src/modules/events.ts | 0 .../src/modules/props.ts | 2 +- .../src/modules/style.ts | 0 .../{renderer-dom => runtime-dom}/src/nodeOps.ts | 0 .../{renderer-dom => runtime-dom}/src/patchData.ts | 2 +- .../src/teardownVNode.ts | 2 +- .../{renderer-server => runtime-test}/.npmignore | 0 packages/{renderer-test => runtime-test}/README.md | 4 ++-- .../__tests__/testRenderer.spec.ts | 0 packages/runtime-test/index.js | 7 +++++++ .../{renderer-test => runtime-test}/package.json | 10 +++++----- .../{renderer-test => runtime-test}/src/index.ts | 4 ++-- .../{renderer-test => runtime-test}/src/nodeOps.ts | 0 .../{renderer-test => runtime-test}/src/patchData.ts | 0 .../{renderer-test => runtime-test}/src/serialize.ts | 0 .../{renderer-test => server-renderer}/.npmignore | 0 packages/server-renderer/README.md | 1 + packages/server-renderer/index.js | 7 +++++++ .../package.json | 6 +++--- .../src/index.ts | 0 packages/vue-compat/package.json | 2 +- packages/vue-compat/src/index.ts | 2 +- packages/vue/package.json | 2 +- packages/vue/src/index.ts | 2 +- tsconfig.json | 12 ++++++------ 81 files changed, 91 insertions(+), 91 deletions(-) rename packages/{compiler => compiler-core}/.npmignore (100%) create mode 100644 packages/compiler-core/README.md create mode 100644 packages/compiler-core/index.js rename packages/{compiler => compiler-core}/package.json (74%) rename packages/{compiler => compiler-core}/src/index.ts (100%) delete mode 100644 packages/compiler/README.md delete mode 100644 packages/compiler/index.js delete mode 100644 packages/core/index.js delete mode 100644 packages/renderer-dom/index.js delete mode 100644 packages/renderer-server/README.md delete mode 100644 packages/renderer-server/index.js delete mode 100644 packages/renderer-test/index.js rename packages/{core => runtime-core}/.npmignore (100%) rename packages/{core => runtime-core}/README.md (76%) rename packages/{core => runtime-core}/__tests__/attrsFallthrough.spec.ts (99%) rename packages/{core => runtime-core}/__tests__/fragment.spec.ts (99%) rename packages/{core => runtime-core}/__tests__/inheritance.spec.ts (98%) rename packages/{core => runtime-core}/__tests__/mixins.spec.ts (97%) rename packages/{core => runtime-core}/__tests__/parentChain.spec.ts (99%) create mode 100644 packages/runtime-core/index.js rename packages/{core => runtime-core}/jsx.d.ts (100%) rename packages/{core => runtime-core}/package.json (68%) rename packages/{core => runtime-core}/src/component.ts (100%) rename packages/{core => runtime-core}/src/componentComputed.ts (100%) rename packages/{core => runtime-core}/src/componentOptions.ts (100%) rename packages/{core => runtime-core}/src/componentProps.ts (100%) rename packages/{core => runtime-core}/src/componentProxy.ts (100%) rename packages/{core => runtime-core}/src/componentState.ts (100%) rename packages/{core => runtime-core}/src/componentUtils.ts (100%) rename packages/{core => runtime-core}/src/componentWatch.ts (100%) rename packages/{core => runtime-core}/src/createRenderer.ts (100%) rename packages/{core => runtime-core}/src/errorHandling.ts (100%) rename packages/{core => runtime-core}/src/flags.ts (100%) rename packages/{core => runtime-core}/src/h.ts (100%) rename packages/{core => runtime-core}/src/index.ts (100%) rename packages/{core => runtime-core}/src/optional/asyncComponent.ts (100%) rename packages/{core => runtime-core}/src/optional/await.ts (100%) rename packages/{core => runtime-core}/src/optional/context.ts (100%) rename packages/{core => runtime-core}/src/optional/directives.ts (100%) rename packages/{core => runtime-core}/src/optional/eventEmitter.ts (100%) rename packages/{core => runtime-core}/src/optional/keepAlive.ts (100%) rename packages/{core => runtime-core}/src/optional/mixins.ts (100%) rename packages/{core => runtime-core}/src/vdom.ts (100%) rename packages/{core => runtime-core}/src/warning.ts (100%) rename packages/{renderer-dom => runtime-dom}/.npmignore (100%) rename packages/{renderer-dom => runtime-dom}/README.md (72%) create mode 100644 packages/runtime-dom/index.js rename packages/{renderer-dom => runtime-dom}/jsx.d.ts (100%) rename packages/{renderer-dom => runtime-dom}/package.json (63%) rename packages/{renderer-dom => runtime-dom}/src/components/transition-group.ts (100%) rename packages/{renderer-dom => runtime-dom}/src/components/transition.ts (100%) rename packages/{renderer-dom => runtime-dom}/src/index.ts (81%) rename packages/{renderer-dom => runtime-dom}/src/modules/attrs.ts (100%) rename packages/{renderer-dom => runtime-dom}/src/modules/class.ts (100%) rename packages/{renderer-dom => runtime-dom}/src/modules/events.ts (100%) rename packages/{renderer-dom => runtime-dom}/src/modules/props.ts (87%) rename packages/{renderer-dom => runtime-dom}/src/modules/style.ts (100%) rename packages/{renderer-dom => runtime-dom}/src/nodeOps.ts (100%) rename packages/{renderer-dom => runtime-dom}/src/patchData.ts (96%) rename packages/{renderer-dom => runtime-dom}/src/teardownVNode.ts (88%) rename packages/{renderer-server => runtime-test}/.npmignore (100%) rename packages/{renderer-test => runtime-test}/README.md (89%) rename packages/{renderer-test => runtime-test}/__tests__/testRenderer.spec.ts (100%) create mode 100644 packages/runtime-test/index.js rename packages/{renderer-test => runtime-test}/package.json (58%) rename packages/{renderer-test => runtime-test}/src/index.ts (92%) rename packages/{renderer-test => runtime-test}/src/nodeOps.ts (100%) rename packages/{renderer-test => runtime-test}/src/patchData.ts (100%) rename packages/{renderer-test => runtime-test}/src/serialize.ts (100%) rename packages/{renderer-test => server-renderer}/.npmignore (100%) create mode 100644 packages/server-renderer/README.md create mode 100644 packages/server-renderer/index.js rename packages/{renderer-server => server-renderer}/package.json (69%) rename packages/{renderer-server => server-renderer}/src/index.ts (100%) diff --git a/package.json b/package.json index e1a4becb..0353b1a2 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "node scripts/dev.js", "build": "node scripts/build.js", - "size": "node scripts/build.js renderer-dom -f esm-browser", + "size": "node scripts/build.js runtime-dom -f esm-browser", "lint": "prettier --write --parser typescript 'packages/**/*.ts'", "test": "jest" }, diff --git a/packages/compiler/.npmignore b/packages/compiler-core/.npmignore similarity index 100% rename from packages/compiler/.npmignore rename to packages/compiler-core/.npmignore diff --git a/packages/compiler-core/README.md b/packages/compiler-core/README.md new file mode 100644 index 00000000..b43fc559 --- /dev/null +++ b/packages/compiler-core/README.md @@ -0,0 +1 @@ +# @vue/compiler-core diff --git a/packages/compiler-core/index.js b/packages/compiler-core/index.js new file mode 100644 index 00000000..d3fc54f4 --- /dev/null +++ b/packages/compiler-core/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/compiler-core.cjs.prod.js') +} else { + module.exports = require('./dist/compiler-core.cjs.js') +} diff --git a/packages/compiler/package.json b/packages/compiler-core/package.json similarity index 74% rename from packages/compiler/package.json rename to packages/compiler-core/package.json index 0e3866a3..1d01f093 100644 --- a/packages/compiler/package.json +++ b/packages/compiler-core/package.json @@ -1,9 +1,9 @@ { - "name": "@vue/compiler", + "name": "@vue/compiler-core", "version": "3.0.0-alpha.1", - "description": "@vue/compiler", + "description": "@vue/compiler-core", "main": "index.js", - "module": "dist/compiler.esm-bundler.js", + "module": "dist/compiler-core.esm-bundler.js", "types": "dist/index.d.ts", "sideEffects": false, "repository": { @@ -18,5 +18,5 @@ "bugs": { "url": "https://github.com/vuejs/vue/issues" }, - "homepage": "https://github.com/vuejs/vue/tree/dev/packages/compiler#readme" + "homepage": "https://github.com/vuejs/vue/tree/dev/packages/compiler-core#readme" } diff --git a/packages/compiler/src/index.ts b/packages/compiler-core/src/index.ts similarity index 100% rename from packages/compiler/src/index.ts rename to packages/compiler-core/src/index.ts diff --git a/packages/compiler/README.md b/packages/compiler/README.md deleted file mode 100644 index f5a8b4f3..00000000 --- a/packages/compiler/README.md +++ /dev/null @@ -1 +0,0 @@ -# @vue/compiler \ No newline at end of file diff --git a/packages/compiler/index.js b/packages/compiler/index.js deleted file mode 100644 index 388d86ef..00000000 --- a/packages/compiler/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/compiler.cjs.prod.js') -} else { - module.exports = require('./dist/compiler.cjs.js') -} diff --git a/packages/core/index.js b/packages/core/index.js deleted file mode 100644 index 435663ad..00000000 --- a/packages/core/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/core.cjs.prod.js') -} else { - module.exports = require('./dist/core.cjs.js') -} diff --git a/packages/observer/README.md b/packages/observer/README.md index 30e92587..eec656ac 100644 --- a/packages/observer/README.md +++ b/packages/observer/README.md @@ -2,7 +2,7 @@ ## Usage Note -This package is inlined into Global & Browser ESM builds of user-facing renderers (e.g. `@vue/renderer-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package. +This package is inlined into Global & Browser ESM builds of user-facing renderers (e.g. `@vue/runtime-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package. ## Credits diff --git a/packages/renderer-dom/index.js b/packages/renderer-dom/index.js deleted file mode 100644 index b722383c..00000000 --- a/packages/renderer-dom/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/renderer-dom.cjs.prod.js') -} else { - module.exports = require('./dist/renderer-dom.cjs.js') -} diff --git a/packages/renderer-server/README.md b/packages/renderer-server/README.md deleted file mode 100644 index 55ff667b..00000000 --- a/packages/renderer-server/README.md +++ /dev/null @@ -1 +0,0 @@ -# @vue/renderer-server \ No newline at end of file diff --git a/packages/renderer-server/index.js b/packages/renderer-server/index.js deleted file mode 100644 index cbf46fe7..00000000 --- a/packages/renderer-server/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/renderer-server.cjs.prod.js') -} else { - module.exports = require('./dist/renderer-server.cjs.js') -} diff --git a/packages/renderer-test/index.js b/packages/renderer-test/index.js deleted file mode 100644 index 462d2e60..00000000 --- a/packages/renderer-test/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/renderer-test.cjs.prod.js') -} else { - module.exports = require('./dist/renderer-test.cjs.js') -} diff --git a/packages/core/.npmignore b/packages/runtime-core/.npmignore similarity index 100% rename from packages/core/.npmignore rename to packages/runtime-core/.npmignore diff --git a/packages/core/README.md b/packages/runtime-core/README.md similarity index 76% rename from packages/core/README.md rename to packages/runtime-core/README.md index ba699e90..58b4e474 100644 --- a/packages/core/README.md +++ b/packages/runtime-core/README.md @@ -1,9 +1,9 @@ -# @vue/core +# @vue/runtime-core > This package is published only for typing and building custom renderers. It is NOT meant to be used in applications. ``` ts -import { createRenderer, h } from '@vue/core' +import { createRenderer, h } from '@vue/runtime-core' const { render } = createRenderer({ nodeOps, diff --git a/packages/core/__tests__/attrsFallthrough.spec.ts b/packages/runtime-core/__tests__/attrsFallthrough.spec.ts similarity index 99% rename from packages/core/__tests__/attrsFallthrough.spec.ts rename to packages/runtime-core/__tests__/attrsFallthrough.spec.ts index 68740cc2..20b4ad76 100644 --- a/packages/core/__tests__/attrsFallthrough.spec.ts +++ b/packages/runtime-core/__tests__/attrsFallthrough.spec.ts @@ -1,5 +1,5 @@ // using DOM renderer because this case is mostly DOM-specific -import { h, render, Component, nextTick, cloneVNode } from '@vue/renderer-dom' +import { h, render, Component, nextTick, cloneVNode } from '@vue/runtime-dom' describe('attribute fallthrough', () => { it('everything should be in props when component has no declared props', async () => { diff --git a/packages/core/__tests__/fragment.spec.ts b/packages/runtime-core/__tests__/fragment.spec.ts similarity index 99% rename from packages/core/__tests__/fragment.spec.ts rename to packages/runtime-core/__tests__/fragment.spec.ts index 388c124a..17488df5 100644 --- a/packages/core/__tests__/fragment.spec.ts +++ b/packages/runtime-core/__tests__/fragment.spec.ts @@ -13,7 +13,7 @@ import { resetOps, dumpOps, NodeOpTypes -} from '@vue/renderer-test' +} from '@vue/runtime-test' describe('Fragments', () => { it('should allow returning multiple component root nodes', () => { diff --git a/packages/core/__tests__/inheritance.spec.ts b/packages/runtime-core/__tests__/inheritance.spec.ts similarity index 98% rename from packages/core/__tests__/inheritance.spec.ts rename to packages/runtime-core/__tests__/inheritance.spec.ts index c3c68d1d..55b3a58c 100644 --- a/packages/core/__tests__/inheritance.spec.ts +++ b/packages/runtime-core/__tests__/inheritance.spec.ts @@ -6,8 +6,8 @@ import { KeepAlive, ComponentPropsOptions, ComponentWatchOptions -} from '@vue/core' -import { createInstance, renderIntsance } from '@vue/renderer-test' +} from '@vue/runtime-core' +import { createInstance, renderIntsance } from '@vue/runtime-test' describe('class inheritance', () => { it('should merge data', () => { diff --git a/packages/core/__tests__/mixins.spec.ts b/packages/runtime-core/__tests__/mixins.spec.ts similarity index 97% rename from packages/core/__tests__/mixins.spec.ts rename to packages/runtime-core/__tests__/mixins.spec.ts index 5b70da88..408c0086 100644 --- a/packages/core/__tests__/mixins.spec.ts +++ b/packages/runtime-core/__tests__/mixins.spec.ts @@ -1,5 +1,5 @@ -import { Component, ComponentClass, mixins } from '@vue/core' -import { createInstance } from '@vue/renderer-test' +import { Component, ComponentClass, mixins } from '@vue/runtime-core' +import { createInstance } from '@vue/runtime-test' const calls: string[] = [] diff --git a/packages/core/__tests__/parentChain.spec.ts b/packages/runtime-core/__tests__/parentChain.spec.ts similarity index 99% rename from packages/core/__tests__/parentChain.spec.ts rename to packages/runtime-core/__tests__/parentChain.spec.ts index c34eaf7b..322115c1 100644 --- a/packages/core/__tests__/parentChain.spec.ts +++ b/packages/runtime-core/__tests__/parentChain.spec.ts @@ -5,7 +5,7 @@ import { nodeOps, observable, nextTick -} from '@vue/renderer-test' +} from '@vue/runtime-test' describe('Parent chain management', () => { it('should have correct $parent / $root / $children', async () => { diff --git a/packages/runtime-core/index.js b/packages/runtime-core/index.js new file mode 100644 index 00000000..50c48827 --- /dev/null +++ b/packages/runtime-core/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/runtime-core.cjs.prod.js') +} else { + module.exports = require('./dist/runtime-core.cjs.js') +} diff --git a/packages/core/jsx.d.ts b/packages/runtime-core/jsx.d.ts similarity index 100% rename from packages/core/jsx.d.ts rename to packages/runtime-core/jsx.d.ts diff --git a/packages/core/package.json b/packages/runtime-core/package.json similarity index 68% rename from packages/core/package.json rename to packages/runtime-core/package.json index 3cfd3367..7e64d48d 100644 --- a/packages/core/package.json +++ b/packages/runtime-core/package.json @@ -1,9 +1,9 @@ { - "name": "@vue/core", + "name": "@vue/runtime-core", "version": "3.0.0-alpha.1", - "description": "@vue/core", + "description": "@vue/runtime-core", "main": "index.js", - "module": "dist/core.esm-bundler.js", + "module": "dist/runtime-core.esm-bundler.js", "types": "dist/index.d.ts", "sideEffects": false, "repository": { @@ -18,7 +18,7 @@ "bugs": { "url": "https://github.com/vuejs/vue/issues" }, - "homepage": "https://github.com/vuejs/vue/tree/dev/packages/core#readme", + "homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-core#readme", "dependencies": { "@vue/observer": "3.0.0-alpha.1", "@vue/scheduler": "3.0.0-alpha.1" diff --git a/packages/core/src/component.ts b/packages/runtime-core/src/component.ts similarity index 100% rename from packages/core/src/component.ts rename to packages/runtime-core/src/component.ts diff --git a/packages/core/src/componentComputed.ts b/packages/runtime-core/src/componentComputed.ts similarity index 100% rename from packages/core/src/componentComputed.ts rename to packages/runtime-core/src/componentComputed.ts diff --git a/packages/core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts similarity index 100% rename from packages/core/src/componentOptions.ts rename to packages/runtime-core/src/componentOptions.ts diff --git a/packages/core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts similarity index 100% rename from packages/core/src/componentProps.ts rename to packages/runtime-core/src/componentProps.ts diff --git a/packages/core/src/componentProxy.ts b/packages/runtime-core/src/componentProxy.ts similarity index 100% rename from packages/core/src/componentProxy.ts rename to packages/runtime-core/src/componentProxy.ts diff --git a/packages/core/src/componentState.ts b/packages/runtime-core/src/componentState.ts similarity index 100% rename from packages/core/src/componentState.ts rename to packages/runtime-core/src/componentState.ts diff --git a/packages/core/src/componentUtils.ts b/packages/runtime-core/src/componentUtils.ts similarity index 100% rename from packages/core/src/componentUtils.ts rename to packages/runtime-core/src/componentUtils.ts diff --git a/packages/core/src/componentWatch.ts b/packages/runtime-core/src/componentWatch.ts similarity index 100% rename from packages/core/src/componentWatch.ts rename to packages/runtime-core/src/componentWatch.ts diff --git a/packages/core/src/createRenderer.ts b/packages/runtime-core/src/createRenderer.ts similarity index 100% rename from packages/core/src/createRenderer.ts rename to packages/runtime-core/src/createRenderer.ts diff --git a/packages/core/src/errorHandling.ts b/packages/runtime-core/src/errorHandling.ts similarity index 100% rename from packages/core/src/errorHandling.ts rename to packages/runtime-core/src/errorHandling.ts diff --git a/packages/core/src/flags.ts b/packages/runtime-core/src/flags.ts similarity index 100% rename from packages/core/src/flags.ts rename to packages/runtime-core/src/flags.ts diff --git a/packages/core/src/h.ts b/packages/runtime-core/src/h.ts similarity index 100% rename from packages/core/src/h.ts rename to packages/runtime-core/src/h.ts diff --git a/packages/core/src/index.ts b/packages/runtime-core/src/index.ts similarity index 100% rename from packages/core/src/index.ts rename to packages/runtime-core/src/index.ts diff --git a/packages/core/src/optional/asyncComponent.ts b/packages/runtime-core/src/optional/asyncComponent.ts similarity index 100% rename from packages/core/src/optional/asyncComponent.ts rename to packages/runtime-core/src/optional/asyncComponent.ts diff --git a/packages/core/src/optional/await.ts b/packages/runtime-core/src/optional/await.ts similarity index 100% rename from packages/core/src/optional/await.ts rename to packages/runtime-core/src/optional/await.ts diff --git a/packages/core/src/optional/context.ts b/packages/runtime-core/src/optional/context.ts similarity index 100% rename from packages/core/src/optional/context.ts rename to packages/runtime-core/src/optional/context.ts diff --git a/packages/core/src/optional/directives.ts b/packages/runtime-core/src/optional/directives.ts similarity index 100% rename from packages/core/src/optional/directives.ts rename to packages/runtime-core/src/optional/directives.ts diff --git a/packages/core/src/optional/eventEmitter.ts b/packages/runtime-core/src/optional/eventEmitter.ts similarity index 100% rename from packages/core/src/optional/eventEmitter.ts rename to packages/runtime-core/src/optional/eventEmitter.ts diff --git a/packages/core/src/optional/keepAlive.ts b/packages/runtime-core/src/optional/keepAlive.ts similarity index 100% rename from packages/core/src/optional/keepAlive.ts rename to packages/runtime-core/src/optional/keepAlive.ts diff --git a/packages/core/src/optional/mixins.ts b/packages/runtime-core/src/optional/mixins.ts similarity index 100% rename from packages/core/src/optional/mixins.ts rename to packages/runtime-core/src/optional/mixins.ts diff --git a/packages/core/src/vdom.ts b/packages/runtime-core/src/vdom.ts similarity index 100% rename from packages/core/src/vdom.ts rename to packages/runtime-core/src/vdom.ts diff --git a/packages/core/src/warning.ts b/packages/runtime-core/src/warning.ts similarity index 100% rename from packages/core/src/warning.ts rename to packages/runtime-core/src/warning.ts diff --git a/packages/renderer-dom/.npmignore b/packages/runtime-dom/.npmignore similarity index 100% rename from packages/renderer-dom/.npmignore rename to packages/runtime-dom/.npmignore diff --git a/packages/renderer-dom/README.md b/packages/runtime-dom/README.md similarity index 72% rename from packages/renderer-dom/README.md rename to packages/runtime-dom/README.md index 9e2c326b..e351b743 100644 --- a/packages/renderer-dom/README.md +++ b/packages/runtime-dom/README.md @@ -1,7 +1,7 @@ -# @vue/renderer-dom +# @vue/runtime-dom ``` js -import { h, render, Component } from '@vue/renderer-dom' +import { h, render, Component } from '@vue/runtime-dom' class App extends Component { data () { diff --git a/packages/runtime-dom/index.js b/packages/runtime-dom/index.js new file mode 100644 index 00000000..cdc29b2a --- /dev/null +++ b/packages/runtime-dom/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/runtime-dom.cjs.prod.js') +} else { + module.exports = require('./dist/runtime-dom.cjs.js') +} diff --git a/packages/renderer-dom/jsx.d.ts b/packages/runtime-dom/jsx.d.ts similarity index 100% rename from packages/renderer-dom/jsx.d.ts rename to packages/runtime-dom/jsx.d.ts diff --git a/packages/renderer-dom/package.json b/packages/runtime-dom/package.json similarity index 63% rename from packages/renderer-dom/package.json rename to packages/runtime-dom/package.json index 5626e486..1772c8b0 100644 --- a/packages/renderer-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,11 +1,11 @@ { - "name": "@vue/renderer-dom", + "name": "@vue/runtime-dom", "version": "3.0.0-alpha.1", - "description": "@vue/renderer-dom", + "description": "@vue/runtime-dom", "main": "index.js", - "module": "dist/renderer-dom.esm-bundler.js", + "module": "dist/runtime-dom.esm-bundler.js", "types": "dist/index.d.ts", - "unpkg": "dist/renderer-dom.global.js", + "unpkg": "dist/runtime-dom.global.js", "sideEffects": false, "buildOptions": { "name": "VueDOMRenderer", @@ -23,8 +23,8 @@ "bugs": { "url": "https://github.com/vuejs/vue/issues" }, - "homepage": "https://github.com/vuejs/vue/tree/dev/packages/renderer-dom#readme", + "homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-dom#readme", "dependencies": { - "@vue/core": "3.0.0-alpha.1" + "@vue/runtime-core": "3.0.0-alpha.1" } } diff --git a/packages/renderer-dom/src/components/transition-group.ts b/packages/runtime-dom/src/components/transition-group.ts similarity index 100% rename from packages/renderer-dom/src/components/transition-group.ts rename to packages/runtime-dom/src/components/transition-group.ts diff --git a/packages/renderer-dom/src/components/transition.ts b/packages/runtime-dom/src/components/transition.ts similarity index 100% rename from packages/renderer-dom/src/components/transition.ts rename to packages/runtime-dom/src/components/transition.ts diff --git a/packages/renderer-dom/src/index.ts b/packages/runtime-dom/src/index.ts similarity index 81% rename from packages/renderer-dom/src/index.ts rename to packages/runtime-dom/src/index.ts index 4ddcd3c3..31912e41 100644 --- a/packages/renderer-dom/src/index.ts +++ b/packages/runtime-dom/src/index.ts @@ -1,4 +1,4 @@ -import { createRenderer, VNode, Component } from '@vue/core' +import { createRenderer, VNode, Component } from '@vue/runtime-core' import { nodeOps } from './nodeOps' import { patchData } from './patchData' import { teardownVNode } from './teardownVNode' @@ -17,4 +17,4 @@ export const render = _render as publicRender // re-export everything from core // h, Component, observer API, nextTick, flags & types -export * from '@vue/core' +export * from '@vue/runtime-core' diff --git a/packages/renderer-dom/src/modules/attrs.ts b/packages/runtime-dom/src/modules/attrs.ts similarity index 100% rename from packages/renderer-dom/src/modules/attrs.ts rename to packages/runtime-dom/src/modules/attrs.ts diff --git a/packages/renderer-dom/src/modules/class.ts b/packages/runtime-dom/src/modules/class.ts similarity index 100% rename from packages/renderer-dom/src/modules/class.ts rename to packages/runtime-dom/src/modules/class.ts diff --git a/packages/renderer-dom/src/modules/events.ts b/packages/runtime-dom/src/modules/events.ts similarity index 100% rename from packages/renderer-dom/src/modules/events.ts rename to packages/runtime-dom/src/modules/events.ts diff --git a/packages/renderer-dom/src/modules/props.ts b/packages/runtime-dom/src/modules/props.ts similarity index 87% rename from packages/renderer-dom/src/modules/props.ts rename to packages/runtime-dom/src/modules/props.ts index f2e6bd73..e988a438 100644 --- a/packages/renderer-dom/src/modules/props.ts +++ b/packages/runtime-dom/src/modules/props.ts @@ -1,4 +1,4 @@ -import { VNode, ChildrenFlags } from '@vue/core' +import { VNode, ChildrenFlags } from '@vue/runtime-core' export function patchDOMProp( el: any, diff --git a/packages/renderer-dom/src/modules/style.ts b/packages/runtime-dom/src/modules/style.ts similarity index 100% rename from packages/renderer-dom/src/modules/style.ts rename to packages/runtime-dom/src/modules/style.ts diff --git a/packages/renderer-dom/src/nodeOps.ts b/packages/runtime-dom/src/nodeOps.ts similarity index 100% rename from packages/renderer-dom/src/nodeOps.ts rename to packages/runtime-dom/src/nodeOps.ts diff --git a/packages/renderer-dom/src/patchData.ts b/packages/runtime-dom/src/patchData.ts similarity index 96% rename from packages/renderer-dom/src/patchData.ts rename to packages/runtime-dom/src/patchData.ts index f1b42182..14569f6d 100644 --- a/packages/renderer-dom/src/patchData.ts +++ b/packages/runtime-dom/src/patchData.ts @@ -1,4 +1,4 @@ -import { VNode } from '@vue/core' +import { VNode } from '@vue/runtime-core' import { patchClass } from './modules/class' import { patchStyle } from './modules/style' import { patchAttr } from './modules/attrs' diff --git a/packages/renderer-dom/src/teardownVNode.ts b/packages/runtime-dom/src/teardownVNode.ts similarity index 88% rename from packages/renderer-dom/src/teardownVNode.ts rename to packages/runtime-dom/src/teardownVNode.ts index 1aebc94a..d53a0ef7 100644 --- a/packages/renderer-dom/src/teardownVNode.ts +++ b/packages/runtime-dom/src/teardownVNode.ts @@ -1,4 +1,4 @@ -import { VNode } from '@vue/core' +import { VNode } from '@vue/runtime-core' import { handleDelegatedEvent } from './modules/events' import { isOn } from '@vue/shared' diff --git a/packages/renderer-server/.npmignore b/packages/runtime-test/.npmignore similarity index 100% rename from packages/renderer-server/.npmignore rename to packages/runtime-test/.npmignore diff --git a/packages/renderer-test/README.md b/packages/runtime-test/README.md similarity index 89% rename from packages/renderer-test/README.md rename to packages/runtime-test/README.md index 177e2b0a..b3d8b246 100644 --- a/packages/renderer-test/README.md +++ b/packages/runtime-test/README.md @@ -1,4 +1,4 @@ -# @vue/renderer-test +# @vue/runtime-test ``` js import { @@ -8,7 +8,7 @@ import { nodeOps, startRecordingOps, dumpOps -} from '@vue/renderer-test' +} from '@vue/runtime-test' class App extends Component { data () { diff --git a/packages/renderer-test/__tests__/testRenderer.spec.ts b/packages/runtime-test/__tests__/testRenderer.spec.ts similarity index 100% rename from packages/renderer-test/__tests__/testRenderer.spec.ts rename to packages/runtime-test/__tests__/testRenderer.spec.ts diff --git a/packages/runtime-test/index.js b/packages/runtime-test/index.js new file mode 100644 index 00000000..f8c6cfdc --- /dev/null +++ b/packages/runtime-test/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/runtime-test.cjs.prod.js') +} else { + module.exports = require('./dist/runtime-test.cjs.js') +} diff --git a/packages/renderer-test/package.json b/packages/runtime-test/package.json similarity index 58% rename from packages/renderer-test/package.json rename to packages/runtime-test/package.json index 0427f6e9..f3414a99 100644 --- a/packages/renderer-test/package.json +++ b/packages/runtime-test/package.json @@ -1,9 +1,9 @@ { - "name": "@vue/renderer-test", + "name": "@vue/runtime-test", "version": "3.0.0-alpha.1", - "description": "@vue/renderer-test", + "description": "@vue/runtime-test", "main": "index.js", - "module": "dist/renderer-test.esm-bundler.js", + "module": "dist/runtime-test.esm-bundler.js", "types": "dist/index.d.ts", "repository": { "type": "git", @@ -17,8 +17,8 @@ "bugs": { "url": "https://github.com/vuejs/vue/issues" }, - "homepage": "https://github.com/vuejs/vue/tree/dev/packages/renderer-test#readme", + "homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-test#readme", "dependencies": { - "@vue/core": "3.0.0-alpha.1" + "@vue/runtime-core": "3.0.0-alpha.1" } } diff --git a/packages/renderer-test/src/index.ts b/packages/runtime-test/src/index.ts similarity index 92% rename from packages/renderer-test/src/index.ts rename to packages/runtime-test/src/index.ts index 74611f7f..82483215 100644 --- a/packages/renderer-test/src/index.ts +++ b/packages/runtime-test/src/index.ts @@ -4,7 +4,7 @@ import { VNode, Component, createComponentInstance -} from '@vue/core' +} from '@vue/runtime-core' import { nodeOps, TestElement } from './nodeOps' import { patchData } from './patchData' @@ -35,4 +35,4 @@ export function renderIntsance( export { serialize } from './serialize' export * from './nodeOps' -export * from '@vue/core' +export * from '@vue/runtime-core' diff --git a/packages/renderer-test/src/nodeOps.ts b/packages/runtime-test/src/nodeOps.ts similarity index 100% rename from packages/renderer-test/src/nodeOps.ts rename to packages/runtime-test/src/nodeOps.ts diff --git a/packages/renderer-test/src/patchData.ts b/packages/runtime-test/src/patchData.ts similarity index 100% rename from packages/renderer-test/src/patchData.ts rename to packages/runtime-test/src/patchData.ts diff --git a/packages/renderer-test/src/serialize.ts b/packages/runtime-test/src/serialize.ts similarity index 100% rename from packages/renderer-test/src/serialize.ts rename to packages/runtime-test/src/serialize.ts diff --git a/packages/renderer-test/.npmignore b/packages/server-renderer/.npmignore similarity index 100% rename from packages/renderer-test/.npmignore rename to packages/server-renderer/.npmignore diff --git a/packages/server-renderer/README.md b/packages/server-renderer/README.md new file mode 100644 index 00000000..4ce66fb5 --- /dev/null +++ b/packages/server-renderer/README.md @@ -0,0 +1 @@ +# @vue/server-renderer diff --git a/packages/server-renderer/index.js b/packages/server-renderer/index.js new file mode 100644 index 00000000..f5a3d90d --- /dev/null +++ b/packages/server-renderer/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/server-renderer.cjs.prod.js') +} else { + module.exports = require('./dist/server-renderer.cjs.js') +} diff --git a/packages/renderer-server/package.json b/packages/server-renderer/package.json similarity index 69% rename from packages/renderer-server/package.json rename to packages/server-renderer/package.json index 6340c6fa..592d7832 100644 --- a/packages/renderer-server/package.json +++ b/packages/server-renderer/package.json @@ -1,7 +1,7 @@ { - "name": "@vue/renderer-server", + "name": "@vue/server-renderer", "version": "3.0.0-alpha.1", - "description": "@vue/renderer-server", + "description": "@vue/server-renderer", "main": "index.js", "types": "dist/index.d.ts", "buildOptions": { @@ -19,5 +19,5 @@ "bugs": { "url": "https://github.com/vuejs/vue/issues" }, - "homepage": "https://github.com/vuejs/vue/tree/dev/packages/renderer-server#readme" + "homepage": "https://github.com/vuejs/vue/tree/dev/packages/server-renderer#readme" } diff --git a/packages/renderer-server/src/index.ts b/packages/server-renderer/src/index.ts similarity index 100% rename from packages/renderer-server/src/index.ts rename to packages/server-renderer/src/index.ts diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index 58e802bb..f441ad68 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -25,6 +25,6 @@ }, "homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue#readme", "dependencies": { - "@vue/renderer-dom": "3.0.0-alpha.1" + "@vue/runtime-dom": "3.0.0-alpha.1" } } diff --git a/packages/vue-compat/src/index.ts b/packages/vue-compat/src/index.ts index 744d29b2..edceebba 100644 --- a/packages/vue-compat/src/index.ts +++ b/packages/vue-compat/src/index.ts @@ -4,7 +4,7 @@ import { nextTick, createComponentInstance, createComponentClassFromOptions -} from '@vue/renderer-dom' +} from '@vue/runtime-dom' // Note: typing for this is intentionally loose, as it will be using 2.x types. diff --git a/packages/vue/package.json b/packages/vue/package.json index d624af86..956934f1 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -24,6 +24,6 @@ }, "homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue#readme", "dependencies": { - "@vue/renderer-dom": "3.0.0-alpha.1" + "@vue/runtime-dom": "3.0.0-alpha.1" } } diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index cda6a7c9..d9dd498d 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -1,3 +1,3 @@ // TODO this package will be the "full-build" that includes both the runtime // and the compiler -export * from '@vue/renderer-dom' +export * from '@vue/runtime-dom' diff --git a/tsconfig.json b/tsconfig.json index 1815a49f..69423b40 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,18 +20,18 @@ "rootDir": ".", "paths": { "@vue/shared": ["packages/shared/src"], - "@vue/core": ["packages/core/src"], + "@vue/runtime-core": ["packages/runtime-core/src"], + "@vue/runtime-dom": ["packages/runtime-dom/src"], + "@vue/runtime-test": ["packages/runtime-test/src"], "@vue/observer": ["packages/observer/src"], "@vue/scheduler": ["packages/scheduler/src"], - "@vue/renderer-dom": ["packages/renderer-dom/src"], - "@vue/renderer-server": ["packages/renderer-server/src"], - "@vue/renderer-test": ["packages/renderer-test/src"], - "@vue/compiler": ["packages/compiler-core/src"] + "@vue/compiler-core": ["packages/compiler-core/src"], + "@vue/server-renderer": ["packages/server-renderer/src"] } }, "include": [ "packages/global.d.ts", - "packages/renderer-dom/jsx.d.ts", + "packages/runtime-dom/jsx.d.ts", "packages/*/src", "packages/*/__tests__" ]