[quickjs] Migrate to new component templates

Bug: 65068
Test: fx shell qjs
Test: fx test qjs_tests
Change-Id: I6718f23aceb214b45d6238d2c1c4481c01837e8d
diff --git a/BUILD.gn b/BUILD.gn
index 0332605..4552f0b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -3,9 +3,8 @@
 # found in the LICENSE file.
 
 import("//build/host.gni")
-import("//build/package.gni")
 import("//build/test.gni")
-import("//build/test/test_package.gni")
+import("//src/sys/build/components.gni")
 import("//third_party/quickjs/compiled_js.gni")
 
 config("qjs-config") {
@@ -82,14 +81,9 @@
   }
 }
 
-package("quickjs") {
+fuchsia_shell_package("quickjs") {
+  package_name = "qjs"
   deps = [ ":qjs" ]
-  binaries = [
-    {
-      name = "qjs"
-      shell = true
-    },
-  ]
 }
 
 test("qjs_test") {
@@ -107,14 +101,8 @@
   }
 }
 
-unittest_package("qjs_tests") {
+fuchsia_unittest_package("qjs_tests") {
   deps = [ ":qjs_test" ]
-  tests = [
-    {
-      name = "qjs_test"
-      environments = basic_envs
-    },
-  ]
 }
 
 install_host_tools("quickjs_host") {