-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 53a7644
Showing
75 changed files
with
12,501 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,25 @@ | ||
dist/ | ||
node_modules | ||
.DS_Store | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
*.log | ||
site | ||
coverage | ||
jsconfig.json | ||
.vscode/ | ||
.idea/ | ||
website/build | ||
package-lock.json | ||
build | ||
*.orig | ||
.changelog | ||
.docgen/ | ||
.expo/* | ||
dist.zip | ||
.eslintcache |
This file contains 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,79 @@ | ||
image: docker-reg.devops.xiaohongshu.com/fe/fe-ci:$FE_CI_IMAGE_LATEST | ||
|
||
variables: | ||
REMOTES: 'static01,static02' | ||
BROWSER_OUTOUT_FOLDER: './public' | ||
REMOTES_FOLDER: '/data/formula-static/$CI_PROJECT_NAME' | ||
DOC_DIR: './wbesite' | ||
BROWSER_OUTPUT_FOLDER: './wbesite/public' | ||
|
||
.cache: &common_cache | ||
key: ${CI_COMMIT_REF_SLUG} | ||
paths: | ||
- node_modules/ | ||
- packages/*/node_modules/ | ||
policy: pull-push | ||
|
||
.artifacts: &common_artifacts | ||
expire_in: 10 mins | ||
paths: | ||
- $BROWSER_OUTPUT_FOLDER | ||
|
||
.job_template: &build_definition | ||
stage: build | ||
cache: | ||
<<: *common_cache | ||
policy: pull | ||
artifacts: | ||
<<: *common_artifacts | ||
allow_failure: false | ||
|
||
before_script: | ||
- node -v | ||
- formula -V | ||
- npm i -g pnpm@7 | ||
- rm -rf /builds/0/react-native-spectrum/node_modules/ | ||
- pnpm i | ||
- echo $CI_COMMIT_TAG | ||
- export PKGLEFT=${CI_COMMIT_TAG%@*} | ||
- export PKGNAME=${PKGLEFT/@xhs\/} | ||
- export PKGVERSION=${CI_COMMIT_TAG##*@} | ||
- echo $PKGNAME | ||
|
||
stages: | ||
- test | ||
- deploy | ||
|
||
test: | ||
stage: test | ||
script: | ||
- formula test | ||
cache: | ||
untracked: true | ||
paths: | ||
- node_modules/ | ||
|
||
deploy: | ||
stage: deploy | ||
script: | ||
- npm run build | ||
- pnpm publish --no-git-checks -r | ||
only: | ||
- tags | ||
|
||
deploy:docs: | ||
stage: deploy | ||
when: manual | ||
cache: | ||
<<: *common_cache | ||
policy: pull | ||
script: | ||
- npm run build-website | ||
- "if [[ $CI_COMMIT_TAG != '' ]]; then formula deploy --dir $DOC_DIR -s $BROWSER_OUTPUT_FOLDER -d $REMOTES_FOLDER; fi" # deploy static | ||
- docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD $REGISTRY_NAME # deploy image | ||
- docker build -t $REGISTRY_NAME/$CI_PROJECT_PATH:$PKGVERSION-${CI_COMMIT_SHA:0:8} . | ||
- docker push $REGISTRY_NAME/$CI_PROJECT_PATH:$PKGVERSION-${CI_COMMIT_SHA:0:8} | ||
- docker rmi $REGISTRY_NAME/$CI_PROJECT_PATH:$PKGVERSION-${CI_COMMIT_SHA:0:8} | ||
only: | ||
- tags | ||
- branches |
This file contains 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,29 @@ | ||
# CHANGELOG | ||
|
||
## [0.0.3](https://github.com/red-armor/list-data/compare/v0.0.2...v0.0.3) (2023-03-11) | ||
|
||
|
||
### Features | ||
|
||
* update ([1a898ec](https://github.com/red-armor/list-data/commit/1a898ec201742d83aae6c9181e8059a68ea89640)) | ||
|
||
|
||
|
||
## [0.0.2](https://github.com/red-armor/list-data/compare/3a1da3e41b0f3a4a6e062f740fab413dcfc7161f...v0.0.2) (2023-03-11) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* support jest ([cb19153](https://github.com/red-armor/list-data/commit/cb19153a238a0139cf93e5e5fb514694ca895426)) | ||
|
||
|
||
### Features | ||
|
||
* add basic content ([5775685](https://github.com/red-armor/list-data/commit/577568524054d4148a2bcdcaf60abcc4fed55132)) | ||
* first commit ([3a1da3e](https://github.com/red-armor/list-data/commit/3a1da3e41b0f3a4a6e062f740fab413dcfc7161f)) | ||
* update ([5dcbec7](https://github.com/red-armor/list-data/commit/5dcbec7e165de507315a06ecc10c87c9580b9199)) | ||
* update ([8099a39](https://github.com/red-armor/list-data/commit/8099a39824bf6f65b2568e9b40d292dec8842332)) | ||
* update script ([a5717da](https://github.com/red-armor/list-data/commit/a5717da742299938b7ccafaf43326aa7db862cb4)) | ||
|
||
|
||
|
This file contains 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 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
modulePathIgnorePatterns: ['dist'], | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest", | ||
"^.+\\.(js|jsx)$": "babel-jest", | ||
"node_modules/variables/.+\\.(j|t)sx?$": "babel-jest" | ||
}, | ||
testRegex: "(/src/.*\\.(test|spec))\\.(jsx?|tsx?|ts|js)$", | ||
transformIgnorePatterns: [ | ||
"node_modules/(?!(jest-)?react-native|react-(native|universal|navigation)-(.*)|@react-native-community/(.*)|@react-navigation/(.*)|bs-platform|@rootstrap/redux-tools)" | ||
], | ||
moduleFileExtensions: [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
] | ||
} |
This file contains 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,94 @@ | ||
{ | ||
"name": "infinite-list", | ||
"version": "0.0.1", | ||
"description": "Data model for list rendering", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/red-armor/infinite-list.git" | ||
}, | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"clean": "pnpm run -r clean", | ||
"build": "pnpm run -r build", | ||
"test": "pnpm run -r test", | ||
"version": "bump", | ||
"alpha": "bump --branch", | ||
"lint": "eslint --ext js,ts,tsx ." | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"bump": { | ||
"changelog": { | ||
"enable": true, | ||
"skipUnstable": true | ||
}, | ||
"publish": false, | ||
"allowed_branches": [ | ||
{ | ||
"name": ".*?-alpha", | ||
"disallowTypes": [ | ||
"premajor", | ||
"preminor", | ||
"prepatch", | ||
"prerelease", | ||
"patch", | ||
"minor", | ||
"major" | ||
] | ||
}, | ||
{ | ||
"name": "main", | ||
"disallowTypes": [ | ||
"premajor", | ||
"preminor", | ||
"prepatch", | ||
"prerelease" | ||
] | ||
} | ||
], | ||
"mode": "monorepo", | ||
"packages": [ | ||
"packages/*" | ||
] | ||
}, | ||
"lint-staged": { | ||
"*.{js,jsx,ts,tsx}": [ | ||
"eslint --cache --fix", | ||
"prettier --ignore-path ./.gitignore --write " | ||
] | ||
}, | ||
"prettier": { | ||
"printWidth": 80, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
}, | ||
"private": true, | ||
"author": "youchao liu", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@innei/bump-version": "1.4.0", | ||
"@testing-library/jest-dom": "^5.11.10", | ||
"@types/jest": "^27.5.2", | ||
"@types/node": "^16", | ||
"husky": "^8.0.1", | ||
"jest": "^27.5.1", | ||
"jest-transform-stub": "^2.0.0", | ||
"lint-staged": "^13.0.3", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^29.0.5", | ||
"ts-node": "^10.5.0", | ||
"tslib": "^2.3.1", | ||
"typescript": "4.8.3" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/red-armor/infinite-list/issues" | ||
}, | ||
"homepage": "https://github.com/red-armor/infinite-list#readme" | ||
} |
This file contains 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 @@ | ||
{ | ||
"name": "@infinite-list/benchmark", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"build": "pnpm run clean && pnpm run compile", | ||
"clean": "rimraf ./dist", | ||
"compile": "tsc -p tsconfig.build.json", | ||
"prepublishOnly": "pnpm run build" | ||
}, | ||
"devDependencies": { | ||
"rimraf": "~4.4.0" | ||
} | ||
} |
This file contains 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 @@ | ||
const fn = (count: number) => count++ |
This file contains 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,11 @@ | ||
{ | ||
"extends": "../../tsconfig.build.json", | ||
"compilerOptions": { | ||
"outDir": "./dist", | ||
"esModuleInterop": true | ||
}, | ||
|
||
"include": [ | ||
"src/**/*" | ||
] | ||
} |
This file contains 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", | ||
"compilerOptions": { | ||
"jsx": "react", | ||
"esModuleInterop": true | ||
} | ||
} |
This file contains 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,27 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
// testMatch: ["**/src/__test__/*.test.ts"], | ||
modulePathIgnorePatterns: ['dist'], | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest", | ||
"^.+\\.(js|jsx)$": "babel-jest", | ||
"node_modules/variables/.+\\.(j|t)sx?$": "babel-jest" | ||
}, | ||
testRegex: "(/src/.*\\.(test|spec))\\.(jsx?|tsx?|ts|js)$", | ||
transformIgnorePatterns: [ | ||
"node_modules/(?!(jest-)?react-native|react-(native|universal|navigation)-(.*)|@react-native-community/(.*)|@react-navigation/(.*)|bs-platform|@rootstrap/redux-tools)" | ||
], | ||
// setupFiles: [ | ||
// "./tests/__mocks__/index.js", | ||
// "<rootDir>/node_modules/react-native-gesture-handler/jestSetup.js" | ||
// ], | ||
moduleFileExtensions: [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
] | ||
}; |
This file contains 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,14 @@ | ||
{ | ||
"name": "@infinite-list/data-model", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"build": "pnpm run clean && pnpm run compile", | ||
"clean": "rimraf ./dist", | ||
"test": "jest --verbose", | ||
"compile": "tsc -p tsconfig.build.json", | ||
"prepublishOnly": "pnpm run build" | ||
}, | ||
"devDependencies": { | ||
"rimraf": "~4.4.0" | ||
} | ||
} |
Oops, something went wrong.