This is an automated email from the ASF dual-hosted git repository.

hufeng pushed a commit to branch dubbo3
in repository https://gitbox.apache.org/repos/asf/dubbo-js.git

commit a7665984b8eb00e4af4c26da7ae3a4d921aeae0c
Author: hufeng <[email protected]>
AuthorDate: Sun Oct 30 16:58:15 2022 +0800

    add dubbo serialization module
---
 packages/dubbo-serialization/.npmignore            | 22 +++++++++++
 packages/dubbo-serialization/package.json          | 13 +++++++
 packages/dubbo-serialization/project.json          | 43 ++++++++++++++++++++++
 .../src/__tests__/index.test.ts                    | 22 +++++++++++
 .../src/__tests__/tsconfig.json                    |  3 ++
 packages/dubbo-serialization/src/index.ts          | 18 +++++++++
 packages/dubbo-serialization/tsconfig.json         | 14 +++++++
 packages/dubbo-serialization/vitest.config.ts      | 25 +++++++++++++
 8 files changed, 160 insertions(+)

diff --git a/packages/dubbo-serialization/.npmignore 
b/packages/dubbo-serialization/.npmignore
new file mode 100644
index 0000000..3f790b3
--- /dev/null
+++ b/packages/dubbo-serialization/.npmignore
@@ -0,0 +1,22 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+**/__tests__/**
+**/__mocks__/**
+src
+tsconfig.json
+node_modules
+vitest.config.ts
+project.json
\ No newline at end of file
diff --git a/packages/dubbo-serialization/package.json 
b/packages/dubbo-serialization/package.json
new file mode 100644
index 0000000..4f15ac8
--- /dev/null
+++ b/packages/dubbo-serialization/package.json
@@ -0,0 +1,13 @@
+{
+  "name": "@apache/dubbo3-serialization",
+  "version": "0.0.1",
+  "main": "./lib/index.js",
+  "types": "./lib/typings/index.d.ts",
+  "description": "apache dubbo3 client",
+  "keywords": [
+    "dubbo3",
+    "nodejs",
+    "dubbo-serialization"
+  ],
+  "license": "Apache-2.0"
+}
\ No newline at end of file
diff --git a/packages/dubbo-serialization/project.json 
b/packages/dubbo-serialization/project.json
new file mode 100644
index 0000000..7595396
--- /dev/null
+++ b/packages/dubbo-serialization/project.json
@@ -0,0 +1,43 @@
+{
+  "name": "dubbo-serialization",
+  "root": "packages/dubbo-serialization",
+  "sourceRoot": "packages/dubbo-serialization/src",
+  "projectType": "application",
+  "targets": {
+    "build": {
+      "executor": "nx:run-commands",
+      "options": {
+        "command": "npx tsc",
+        "cwd": "packages/dubbo-serialization"
+      }
+    },
+    "ts-check": {
+      "executor": "nx:run-commands",
+      "options": {
+        "command": "npx tsc --noEmit",
+        "cwd": "packages/dubbo-serialization"
+      }
+    },
+    "test": {
+      "executor": "nx:run-commands",
+      "options": {
+        "command": "npx vitest run",
+        "cwd": "packages/dubbo-serialization"
+      }
+    },
+    "test:watch": {
+      "executor": "nx:run-commands",
+      "options": {
+        "command": "npx vitest",
+        "cwd": "packages/dubbo-serialization"
+      }
+    },
+    "format": {
+      "executor": "nx:run-commands",
+      "options": {
+        "command": "npx prettier --write \"**/*.{ts,tsx,md}\"",
+        "cwd": "packages/dubbo-serialization"
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/packages/dubbo-serialization/src/__tests__/index.test.ts 
b/packages/dubbo-serialization/src/__tests__/index.test.ts
new file mode 100644
index 0000000..4c624d8
--- /dev/null
+++ b/packages/dubbo-serialization/src/__tests__/index.test.ts
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+describe(`dubbo-serialization test suites`, () => {
+  it('test 1+1=2', () => {
+    expect(1 + 1).toBe(2)
+  })
+})
diff --git a/packages/dubbo-serialization/src/__tests__/tsconfig.json 
b/packages/dubbo-serialization/src/__tests__/tsconfig.json
new file mode 100644
index 0000000..52a2731
--- /dev/null
+++ b/packages/dubbo-serialization/src/__tests__/tsconfig.json
@@ -0,0 +1,3 @@
+{
+  "extends": "../../../../tsconfig.base.json"
+}
diff --git a/packages/dubbo-serialization/src/index.ts 
b/packages/dubbo-serialization/src/index.ts
new file mode 100644
index 0000000..c536137
--- /dev/null
+++ b/packages/dubbo-serialization/src/index.ts
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+console.log('dubbo-serialization')
diff --git a/packages/dubbo-serialization/tsconfig.json 
b/packages/dubbo-serialization/tsconfig.json
new file mode 100644
index 0000000..936df05
--- /dev/null
+++ b/packages/dubbo-serialization/tsconfig.json
@@ -0,0 +1,14 @@
+{
+  "extends": "../../tsconfig.base.json",
+  "compilerOptions": {
+    "rootDir": "./src",
+    "outDir": "./lib",
+    "declarationDir": "./lib/typings"
+  },
+  "exclude": [
+    "node_modules",
+    "./src/__tests__/**",
+    "./lib/**",
+    "vitest.config.ts"
+  ]
+}
diff --git a/packages/dubbo-serialization/vitest.config.ts 
b/packages/dubbo-serialization/vitest.config.ts
new file mode 100644
index 0000000..393aa5f
--- /dev/null
+++ b/packages/dubbo-serialization/vitest.config.ts
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/// <reference types="vitest" />
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+  test: {
+    globals: true
+  }
+})

Reply via email to