react-native-boost 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.github/FUNDING.yml +1 -0
  2. package/.github/actions/setup/action.yml +28 -0
  3. package/.github/workflows/release.yml +87 -0
  4. package/.github/workflows/stale.yml +37 -0
  5. package/.github/workflows/test.yml +54 -0
  6. package/.husky/pre-commit +2 -0
  7. package/.lintstagedrc +3 -0
  8. package/.nvmrc +1 -0
  9. package/.prettierignore +4 -0
  10. package/.prettierrc +14 -0
  11. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
  12. package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +28 -0
  13. package/.yarn/releases/yarn-3.6.1.cjs +874 -0
  14. package/.yarnrc.yml +2 -0
  15. package/CODE_OF_CONDUCT.md +132 -0
  16. package/CONTRIBUTING.md +122 -0
  17. package/LICENSE +20 -0
  18. package/README.md +72 -0
  19. package/commitlint.config.mjs +1 -0
  20. package/dist/plugin.js +70473 -0
  21. package/dist/plugin.js.map +7 -0
  22. package/eslint.config.mjs +14 -0
  23. package/package.json +70 -0
  24. package/src/optimizers/text/__tests__/fixtures/basic/code.js +2 -0
  25. package/src/optimizers/text/__tests__/fixtures/basic/options.js +4 -0
  26. package/src/optimizers/text/__tests__/fixtures/basic/output.js +3 -0
  27. package/src/optimizers/text/__tests__/fixtures/text-content/code.js +2 -0
  28. package/src/optimizers/text/__tests__/fixtures/text-content/options.js +4 -0
  29. package/src/optimizers/text/__tests__/fixtures/text-content/output.js +3 -0
  30. package/src/optimizers/text/__tests__/fixtures/text-content-as-explicit-child-prop/code.js +2 -0
  31. package/src/optimizers/text/__tests__/fixtures/text-content-as-explicit-child-prop/options.js +4 -0
  32. package/src/optimizers/text/__tests__/fixtures/text-content-as-explicit-child-prop/output.js +3 -0
  33. package/src/optimizers/text/__tests__/fixtures/two-components/code.js +3 -0
  34. package/src/optimizers/text/__tests__/fixtures/two-components/options.js +4 -0
  35. package/src/optimizers/text/__tests__/fixtures/two-components/output.js +4 -0
  36. package/src/optimizers/text/__tests__/index.test.ts +12 -0
  37. package/src/optimizers/text/index.ts +128 -0
  38. package/src/plugin.ts +15 -0
  39. package/tsconfig.json +14 -0
  40. package/vitest.config.ts +8 -0
@@ -0,0 +1 @@
1
+ github: mfkrause
@@ -0,0 +1,28 @@
1
+ name: Setup
2
+ description: Setup Node.js and install dependencies
3
+
4
+ runs:
5
+ using: composite
6
+ steps:
7
+ - name: Setup Node.js
8
+ uses: actions/setup-node@v4
9
+ with:
10
+ node-version-file: .nvmrc
11
+
12
+ - name: Cache dependencies
13
+ id: yarn-cache
14
+ uses: actions/cache@v4
15
+ with:
16
+ path: |
17
+ **/node_modules
18
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
19
+ restore-keys: |
20
+ ${{ runner.os }}-yarn-
21
+
22
+ - name: Install dependencies
23
+ if: steps.yarn-cache.outputs.cache-hit != 'true'
24
+ run: |
25
+ # yarn install --cwd example --frozen-lockfile # TODO: re-enable once example has been added
26
+ # yarn install --cwd docs --frozen-lockfile # TODO: re-enable once docs have been added
27
+ yarn install --frozen-lockfile
28
+ shell: bash
@@ -0,0 +1,87 @@
1
+ name: Release
2
+ on:
3
+ workflow_dispatch:
4
+ inputs:
5
+ release_type:
6
+ description: 'Release type (patch, minor, major, or a semver version)'
7
+ required: false
8
+ type: string
9
+
10
+ jobs:
11
+ lint:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup
18
+ uses: ./.github/actions/setup
19
+
20
+ - name: Lint files
21
+ run: yarn lint
22
+
23
+ - name: Run Prettier
24
+ run: yarn format
25
+
26
+ - name: Verify formatted code is unchanged
27
+ run: git diff --exit-code HEAD
28
+
29
+ - name: Typecheck files
30
+ run: yarn typecheck
31
+
32
+ test:
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - name: Checkout
36
+ uses: actions/checkout@v4
37
+
38
+ - name: Setup
39
+ uses: ./.github/actions/setup
40
+
41
+ - name: Run tests
42
+ run: yarn test
43
+
44
+ build-release:
45
+ runs-on: ubuntu-latest
46
+ needs: [lint, test]
47
+ steps:
48
+ - name: Checkout
49
+ uses: actions/checkout@v4
50
+ with:
51
+ fetch-depth: 0
52
+
53
+ - name: Setup
54
+ uses: ./.github/actions/setup
55
+
56
+ - name: Build package
57
+ run: yarn build
58
+
59
+ - name: Set NPM token & GitHub config
60
+ run: |
61
+ npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
62
+ git config user.name "Kuatsu CI/CD"
63
+ git config user.email "null@kuatsu.de"
64
+ env:
65
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
66
+
67
+ - name: Validate release type
68
+ if: ${{ inputs.release_type != '' }}
69
+ run: |
70
+ if [[ "${{ inputs.release_type }}" =~ ^(patch|minor|major)$ ]]; then
71
+ echo "Valid release type: ${{ inputs.release_type }}"
72
+ elif [[ "${{ inputs.release_type }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
73
+ echo "Valid semver version: ${{ inputs.release_type }}"
74
+ else
75
+ echo "Invalid input. Must be 'patch', 'minor', 'major', or a valid semver version (e.g., 1.2.3)."
76
+ exit 1
77
+ fi
78
+
79
+ - name: Release
80
+ run: |
81
+ if [ -n "${{ inputs.release_type }}" ]; then
82
+ yarn release --increment ${{ inputs.release_type }}
83
+ else
84
+ yarn release
85
+ fi
86
+ env:
87
+ GITHUB_TOKEN: ${{ secrets.CICD_PAT }}
@@ -0,0 +1,37 @@
1
+ name: 'Close stale issues and PRs'
2
+ on:
3
+ schedule:
4
+ - cron: '30 1 * * *'
5
+
6
+ jobs:
7
+ stale:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ issues: write
11
+ pull-requests: write
12
+ steps:
13
+ - uses: actions/stale@v9
14
+ with:
15
+ stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
16
+ stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
17
+ days-before-stale: 60
18
+ days-before-close: 7
19
+ stale-issue-label: stale
20
+ stale-pr-label: stale
21
+ exempt-issue-labels: 'help wanted,in progress,pinned'
22
+ exempt-pr-labels: 'in progress,pinned'
23
+ stale-missing-info:
24
+ runs-on: ubuntu-latest
25
+ permissions:
26
+ issues: write
27
+ pull-requests: write
28
+ steps:
29
+ - uses: actions/stale@v9
30
+ with:
31
+ any-of-labels: 'repro-missing'
32
+ stale-issue-message: 'This issue is stale because it is missing information. Please add the requested information or this will be closed in 7 days.'
33
+ stale-pr-message: 'This PR is stale because it is missing information. Please add the requested information or this will be closed in 7 days.'
34
+ days-before-stale: 14
35
+ days-before-close: 7
36
+ stale-issue-label: stale
37
+ stale-pr-label: stale
@@ -0,0 +1,54 @@
1
+ name: Test & build
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ branches:
8
+ - master
9
+
10
+ jobs:
11
+ lint:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup
18
+ uses: ./.github/actions/setup
19
+
20
+ - name: Lint files
21
+ run: yarn lint
22
+
23
+ - name: Run Prettier
24
+ run: yarn format
25
+
26
+ - name: Verify formatted code is unchanged
27
+ run: git diff --exit-code HEAD
28
+
29
+ - name: Typecheck files
30
+ run: yarn typecheck
31
+
32
+ test:
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - name: Checkout
36
+ uses: actions/checkout@v4
37
+
38
+ - name: Setup
39
+ uses: ./.github/actions/setup
40
+
41
+ - name: Run tests
42
+ run: yarn test
43
+
44
+ build:
45
+ runs-on: ubuntu-latest
46
+ steps:
47
+ - name: Checkout
48
+ uses: actions/checkout@v4
49
+
50
+ - name: Setup
51
+ uses: ./.github/actions/setup
52
+
53
+ - name: Build package
54
+ run: yarn build
@@ -0,0 +1,2 @@
1
+ npx commitlint --edit
2
+ npx lint-staged
package/.lintstagedrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "*.ts": "npx eslint"
3
+ }
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v20
@@ -0,0 +1,4 @@
1
+ fixtures
2
+ node_modules
3
+ yarn.lock
4
+ .yarn
package/.prettierrc ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "printWidth": 120,
3
+ "tabWidth": 2,
4
+ "useTabs": false,
5
+ "semi": true,
6
+ "singleQuote": true,
7
+ "quoteProps": "consistent",
8
+ "jsxSingleQuote": false,
9
+ "trailingComma": "es5",
10
+ "bracketSpacing": true,
11
+ "bracketSameLine": true,
12
+ "arrowParens": "always",
13
+ "endOfLine": "lf"
14
+ }