-
Notifications
You must be signed in to change notification settings - Fork 37
chore: scaffold vue #1417
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
Open
joker23
wants to merge
1
commit into
main
Choose a base branch
from
skz/sdk-2194/migrate-vue-sdk-package-skeleton
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
chore: scaffold vue #1417
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: sdk/vue | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, 'feat/**'] | ||
| paths-ignore: | ||
| - '**.md' #Do not need to run CI for markdown changes. | ||
| pull_request: | ||
| branches: [main, 'feat/**'] | ||
| paths-ignore: | ||
| - '**.md' | ||
|
|
||
| jobs: | ||
| build-test-vue: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
| - uses: ./actions/setup-yarn | ||
| - id: shared | ||
| name: Shared CI Steps | ||
| uses: ./actions/ci | ||
| with: | ||
| workspace_name: '@launchdarkly/vue-client-sdk' | ||
| workspace_path: packages/sdk/vue | ||
| should_build_docs: false | ||
|
|
||
| # TODO(scaffold): run-example job arrives when examples/getting-started lands | ||
| # TODO(scaffold): contract-tests job arrives when contract-tests land |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| dist/ | ||
| docs/ | ||
| node_modules/ | ||
| *.tsbuildinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to `@launchdarkly/vue-client-sdk` will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Copyright 2026 Catamorphic, Co. | ||
|
|
||
| Licensed 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # LaunchDarkly Vue SDK | ||
|
|
||
| [![Actions Status][vue-sdk-ci-badge]][vue-sdk-ci] | ||
| <!-- Badges below are commented out until the package is published to npm and docs are deployed. | ||
| [![NPM][vue-sdk-npm-badge]][vue-sdk-npm-link] | ||
| [![Documentation][vue-sdk-ghp-badge]][vue-sdk-ghp-link] | ||
| [![NPM][vue-sdk-dm-badge]][vue-sdk-npm-link] | ||
| [![NPM][vue-sdk-dt-badge]][vue-sdk-npm-link] | ||
| --> | ||
|
|
||
| > [!CAUTION] | ||
| > This SDK is experimental and should NOT be considered ready for production use. | ||
| > It may change or be removed without notice and is not subject to backwards | ||
| > compatibility guarantees. | ||
| > | ||
| > Pin to a specific minor version and review the [changelog](CHANGELOG.md) before upgrading. | ||
|
|
||
| ## Getting started | ||
|
|
||
| Refer to the [SDK documentation](https://launchdarkly.com/docs/sdk/client-side/vue) for instructions on getting started with using the SDK. | ||
|
|
||
| ## Verifying SDK build provenance with the SLSA framework | ||
|
|
||
| LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. To learn more, see the [provenance guide](../../../PROVENANCE.md). | ||
|
|
||
| ## About LaunchDarkly | ||
|
|
||
| - LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can: | ||
| - Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases. | ||
| - Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?). | ||
| - Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file. | ||
| - Grant access to certain features based on user attributes, like payment plan (eg: users on the 'gold' plan get access to more features than users in the 'silver' plan). | ||
| - Disable parts of your application to facilitate maintenance, without taking everything offline. | ||
| - LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list. | ||
| - Explore LaunchDarkly | ||
| - [launchdarkly.com](https://www.launchdarkly.com/ 'LaunchDarkly Main Website') for more information | ||
| - [docs.launchdarkly.com](https://docs.launchdarkly.com/ 'LaunchDarkly Documentation') for our documentation and SDK reference guides | ||
| - [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ 'LaunchDarkly API Documentation') for our API documentation | ||
| - [blog.launchdarkly.com](https://blog.launchdarkly.com/ 'LaunchDarkly Blog Documentation') for the latest product updates | ||
|
|
||
| [vue-sdk-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/vue.yml/badge.svg | ||
| [vue-sdk-ci]: https://github.com/launchdarkly/js-core/actions/workflows/vue.yml | ||
| <!-- Badge link definitions below are commented out until the package is published. | ||
| [vue-sdk-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/vue-client-sdk.svg?style=flat-square | ||
| [vue-sdk-npm-link]: https://www.npmjs.com/package/@launchdarkly/vue-client-sdk | ||
| [vue-sdk-ghp-badge]: https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8 | ||
| [vue-sdk-ghp-link]: https://launchdarkly.github.io/js-core/packages/sdk/vue/docs/ | ||
| [vue-sdk-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/vue-client-sdk.svg?style=flat-square | ||
| [vue-sdk-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/vue-client-sdk.svg?style=flat-square | ||
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "transform": { "^.+\\.tsx?$": ["ts-jest", { "tsconfig": { "esModuleInterop": true } }] }, | ||
| "testMatch": ["**/*.test.ts?(x)"], | ||
| "testPathIgnorePatterns": ["node_modules", "example", "contract-tests", "dist"], | ||
| "modulePathIgnorePatterns": ["dist"], | ||
| "testEnvironment": "node", | ||
| "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], | ||
| "collectCoverageFrom": ["src/**/*.ts?(x)"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| { | ||
| "name": "@launchdarkly/vue-client-sdk", | ||
| "version": "0.1.0", | ||
| "description": "LaunchDarkly Client-side SDK for Vue", | ||
| "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/vue", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/launchdarkly/js-core.git" | ||
| }, | ||
| "license": "Apache-2.0", | ||
| "keywords": [ | ||
| "launchdarkly", | ||
| "vue", | ||
| "vuejs" | ||
| ], | ||
| "type": "module", | ||
| "main": "./dist/index.cjs", | ||
| "module": "./dist/index.js", | ||
| "types": "./dist/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": "./dist/index.js", | ||
| "require": "./dist/index.cjs", | ||
| "default": "./dist/index.js" | ||
| } | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "clean": "rimraf dist", | ||
| "build": "tsup", | ||
| "lint": "eslint .", | ||
| "test": "npx jest --ci --passWithNoTests", | ||
| "coverage": "yarn test --coverage", | ||
| "check": "yarn lint && yarn build && yarn test" | ||
| }, | ||
| "peerDependencies": { | ||
| "vue": "^3.3.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@eslint/js": "^9.0.0", | ||
| "@types/jest": "^29.5.12", | ||
| "eslint": "^9.0.0", | ||
| "eslint-import-resolver-typescript": "^4.0.0", | ||
| "eslint-plugin-import-x": "^4.0.0", | ||
| "eslint-plugin-jest": "^28.0.0", | ||
| "globals": "^16.0.0", | ||
| "jest": "^29.7.0", | ||
| "rimraf": "^5.0.5", | ||
| "ts-jest": "^29.1.1", | ||
| "tsup": "^8.5.1", | ||
| "typedoc": "0.25.0", | ||
| "typescript": "5.1.6", | ||
| "typescript-eslint": "^8.0.0", | ||
| "vue": "^3.4.0" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| // TODO(scaffold): full implementation arrives in the next PR | ||
| export {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "include": ["**/*.ts", "**/*.tsx"], | ||
| "exclude": ["node_modules"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "allowSyntheticDefaultImports": true, | ||
| "declaration": true, | ||
| "declarationMap": true, | ||
| "lib": ["es2017", "dom", "dom.iterable"], | ||
| "module": "ESNext", | ||
| "moduleResolution": "node", | ||
| "noImplicitOverride": true, | ||
| "outDir": "dist", | ||
| "resolveJsonModule": true, | ||
| "rootDir": ".", | ||
| "skipLibCheck": true, | ||
| "sourceMap": true, | ||
| "strict": true, | ||
| "stripInternal": true, | ||
| "target": "ES2017", | ||
| "types": ["jest", "node"] | ||
| }, | ||
| "include": ["src/**/*"], | ||
| "exclude": ["**/*.test.ts", "dist", "node_modules", "__tests__", "example", "contract-tests"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "include": ["src/**/*", "package.json"], | ||
| "compilerOptions": { | ||
| "composite": true | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { defineConfig } from 'tsup'; | ||
|
|
||
| export default defineConfig({ | ||
| entry: { index: 'src/index.ts' }, | ||
| minify: true, | ||
| format: ['esm', 'cjs'], | ||
| splitting: false, | ||
| sourcemap: false, | ||
| clean: true, | ||
| external: ['vue'], | ||
| noExternal: [ | ||
| '@launchdarkly/js-sdk-common', | ||
| '@launchdarkly/js-client-sdk-common', | ||
| '@launchdarkly/js-client-sdk', | ||
| ], | ||
| dts: true, | ||
| metafile: true, | ||
| esbuildOptions(opts) { | ||
| // This would normally be `^_(?!meta|_)`, but go doesn't support negative look-ahead assertions, | ||
| // so we need to craft something that works without it. | ||
| // So start of line followed by a character that isn't followed by m or underscore, but we | ||
| // want other things that do start with m, so we need to progressively handle more characters | ||
| // of meta with exclusions. | ||
| opts.mangleProps = /^_([^m|_]|m[^e]|me[^t]|met[^a])/; | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "extends": ["../../../typedoc.base.json"], | ||
| "entryPoints": ["src/index.ts"], | ||
| "out": "docs" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.