Compare commits

..

19 Commits

Author SHA1 Message Date
Juan Picado @jotadeveloper
584f4c141e chore(release): 0.3.2 2019-09-30 20:28:36 +02:00
Juan Picado @jotadeveloper
91d818c478 fix: sidebar view on small screens (#136) 2019-09-30 20:28:02 +02:00
Sergio Hg
ae6e479f16 Merge pull request #139 from verdaccio/security-deps
chore(deps): bump detect-secrets for enhanced dev workflow
2019-09-29 23:46:38 +02:00
Juan Picado @jotadeveloper
18ef27eac6 Merge branch 'master' into security-deps 2019-09-29 20:21:43 +02:00
Juan Picado @jotadeveloper
eabc0b9f5b chore: add detect-secrets deps 2019-09-29 20:20:10 +02:00
Juan Picado @jotadeveloper
3779caa4e3 chore(release): 0.3.1 2019-09-29 20:03:29 +02:00
Juan Picado @jotadeveloper
543877a077 chore: add detect-secrets deps 2019-09-29 18:33:04 +02:00
Juan Picado @jotadeveloper
7e6702c34b chore: update dependencies (#138)
* chore: update dependencies

dependencies maintenance

* chore: restore date-fns@1.30.1
2019-09-29 18:26:04 +02:00
Filip Messa
2e50981514 fix(ui): fix the hover effect on the packageItem's author area (#137) 2019-09-29 16:44:10 +02:00
Daniel Ruf
f61913c2d3 fix: correctly load font files - closes #128 (#134)
* fix: correctly load font files - closes #128

* Resolve issue with the moduleNameWrapper in Jest
2019-09-29 16:36:38 +02:00
Priscila Oliveira
ffc97c373c chore: pumped mui version (#131)
* chore: updated mui libs

* fix: updated snap
2019-09-28 00:31:01 +02:00
Sergio Hg
3a889b67ee Merge pull request #127 from verdaccio/refactor-ci
chore: refactor ci
2019-09-11 22:55:04 +02:00
Sergio Herrera Guzmán
de0f91a6d2 test: skip non-deterministic test 2019-09-11 22:47:45 +02:00
Sergio Herrera Guzmán
195a79a809 ci: drop Node 8 support 2019-09-11 22:35:29 +02:00
Sergio Herrera Guzmán
0a7428edab chore: fix Prettier and Stylelint glob expansion for Windows 2019-09-11 15:53:57 +02:00
Sergio Herrera Guzmán
9ad506d569 test: fix one failing snapshot 2019-09-11 15:53:07 +02:00
Sergio Herrera Guzmán
3b52a17623 chore: update lockfile 2019-09-11 15:53:07 +02:00
Sergio Herrera Guzmán
3309e449d1 ci(circleci): improve workflow and add linting 2019-09-11 15:53:07 +02:00
Sergio Herrera Guzmán
7853ec2acb ci(github): remove workflow before deprecation and improve current 2019-09-11 15:53:07 +02:00
18 changed files with 2525 additions and 3558 deletions

View File

@@ -1,31 +1,25 @@
version: 2
aliases:
- &repo_path
~/ui-theme
- &defaults
working_directory: ~/ui-theme
- &node11_executor
working_directory: *repo_path
- &node_latest_executor
docker:
- image: circleci/node:11.10.1
- &node8_executor
- image: circleci/node:latest
- &node_lts_executor
docker:
- image: circleci/node:8
- &node10_executor
docker:
- image: circleci/node:10
- image: circleci/node:lts
- &default_executor
<<: *node10_executor
- &repo_key
repo-{{ .Branch }}-{{ .Revision }}
- &coverage_key
coverage-{{ .Branch }}-{{ .Revision }}
- &base_config_key
base-config-{{ .Branch }}-{{ .Revision }}
<<: *node_latest_executor
- &yarn_cache_key
yarn-sha-{{ checksum "yarn.lock" }}
- &coverage_key
coverage-{{ .Branch }}-{{ .Revision }}
- &restore_repo
restore_cache:
keys:
- *repo_key
attach_workspace:
at: *repo_path
- &ignore_non_dev_branches
filters:
tags:
@@ -36,7 +30,7 @@ aliases:
- &execute_on_release
filters:
tags:
only: /(v)?[0-9]+(\.[0-9]+)*/
only: /v?[0-9]+(\.[0-9]+)*([-+\.][a-zA-Z0-9]+)*/
branches:
ignore:
- /.*/
@@ -48,21 +42,11 @@ jobs:
steps:
- *restore_repo
- checkout
- restore_cache:
key: *base_config_key
- run:
name: 'Base environment setup'
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- save_cache:
key: *base_config_key
paths:
- ~/.npmrc
- ~/.gitconfig
- restore_cache:
key: *yarn_cache_key
- run:
name: Install Js dependencies
command: yarn install --no-progress --registry https://registry.verdaccio.org --no-lockfile
name: Install dependencies
command: yarn install --frozen-lockfile
- run:
name: Build project
command: yarn run build
@@ -72,10 +56,20 @@ jobs:
- ~/.yarn
- ~/.cache/yarn
- node_modules
- save_cache:
key: *repo_key
- persist_to_workspace:
root: *repo_path
paths:
- ~/ui-theme
- ./*
lint:
<<: *defaults
<<: *default_executor
steps:
- *restore_repo
- run:
name: Lint code
command: yarn lint
test_bundlesize:
<<: *defaults
<<: *default_executor
@@ -85,37 +79,28 @@ jobs:
name: Test BundleSize
command: yarn test:size
test_node11:
test_node_latest:
<<: *defaults
<<: *node11_executor
<<: *node_latest_executor
steps:
- *restore_repo
- run:
name: Test with Node 11
name: Test with Node (Latest)
command: yarn test
test_node8:
<<: *defaults
<<: *node8_executor
steps:
- *restore_repo
- run:
name: Test with Node 8
command: yarn test
test_node10:
<<: *defaults
<<: *node10_executor
steps:
- *restore_repo
- run:
name: Test with Node 10
command: yarn run test
- save_cache:
key: *coverage_key
paths:
- coverage
test_node_lts:
<<: *defaults
<<: *node_lts_executor
steps:
- *restore_repo
- run:
name: Test with Node (LTS)
command: yarn test
coverage:
<<: *defaults
<<: *default_executor
@@ -140,8 +125,9 @@ jobs:
<<: *default_executor
steps:
- *restore_repo
- restore_cache:
key: *base_config_key
- run:
name: 'Setup publish credentials'
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- run:
name: Publish
command: yarn publish
@@ -152,29 +138,31 @@ workflows:
jobs:
- prepare:
<<: *ignore_non_dev_branches
- test_node11:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node8:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node10:
- lint:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_bundlesize:
requires:
- test_node11
- test_node8
- test_node10
- prepare
<<: *ignore_non_dev_branches
- test_node_latest:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node_lts:
requires:
- prepare
<<: *ignore_non_dev_branches
- coverage:
requires:
- test_bundlesize
- test_node_latest
<<: *ignore_non_dev_branches
- publish_package:
requires:
- lint
- test_bundlesize
- test_node_latest
- test_node_lts
- coverage
<<: *execute_on_release

67
.github/main.workflow vendored
View File

@@ -1,67 +0,0 @@
################################################
# Workflow for a github release when a tag is
# pushed
################################################
workflow "github release" {
resolves = [
"release.github",
"release.lint",
]
on = "push"
}
action "release.filter" {
uses = "actions/bin/filter@master"
args = "tag v*"
}
action "release.install" {
uses = "docker://node:10"
needs = ["release.filter"]
args = "yarn install"
}
action "release.build" {
uses = "docker://node:10"
needs = ["release.install"]
args = "yarn run build"
}
action "release.lint" {
uses = "docker://node:10"
needs = ["release.install"]
args = "yarn run lint"
}
action "release.test" {
uses = "docker://node:10"
needs = ["release.build"]
args = "yarn run test"
}
action "release.auth" {
needs = ["release.test"]
uses = "actions/bin/filter@master"
args = ["actor", "octocat", "torvalds"]
}
action "release.npm.publish" {
needs = ["release.auth"]
uses = "docker://node:10"
args = "sh scripts/publish.sh"
secrets = [
"REGISTRY_AUTH_TOKEN",
]
env = {
REGISTRY_URL = "registry.npmjs.org"
}
}
action "release.github" {
needs = ["release.npm.publish"]
uses = "docker://node:10"
args = "sh scripts/github-release.sh"
secrets = [
"GITHUB_TOKEN",
]
}

View File

@@ -1,28 +1,28 @@
name: Node CI
name: CI
on: [push]
on: push
jobs:
ci:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
build_test_lint:
name: Node ${{ matrix.node_version }} and ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: [8, 10, 12]
node_version: [10, 12]
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
version: ${{ matrix.node_version }}
- name: Use Yarn 1.17.2
run: |
npm install -g yarn@1.17.2
- name: yarn build
run: |
yarn install
yarn lint
yarn build
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Lint
run: yarn lint

View File

@@ -1,4 +1,5 @@
{
"endOfLine": "auto",
"useTabs": false,
"printWidth": 160,
"tabWidth": 2,

40
.secrets-baseline Normal file
View File

@@ -0,0 +1,40 @@
{
"exclude": {
"files": null,
"lines": null
},
"generated_at": "2019-09-29T18:19:50Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
},
{
"name": "ArtifactoryDetector"
},
{
"base64_limit": 4.5,
"name": "Base64HighEntropyString"
},
{
"name": "BasicAuthDetector"
},
{
"hex_limit": 3,
"name": "HexHighEntropyString"
},
{
"name": "KeywordDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "SlackDetector"
},
{
"name": "StripeDetector"
}
],
"results": {},
"version": "0.12.4"
}

View File

@@ -2,6 +2,21 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.3.2](https://github.com/verdaccio/ui/compare/v0.3.1...v0.3.2) (2019-09-30)
### Bug Fixes
* sidebar view on small screens ([#136](https://github.com/verdaccio/ui/issues/136)) ([91d818c](https://github.com/verdaccio/ui/commit/91d818c))
### [0.3.1](https://github.com/verdaccio/ui/compare/v0.3.0...v0.3.1) (2019-09-29)
### Bug Fixes
* **ui:** fix the hover effect on the packageItem's author area ([#137](https://github.com/verdaccio/ui/issues/137)) ([2e50981](https://github.com/verdaccio/ui/commit/2e50981))
* correctly load font files - closes [#128](https://github.com/verdaccio/ui/issues/128) ([#134](https://github.com/verdaccio/ui/issues/134)) ([f61913c](https://github.com/verdaccio/ui/commit/f61913c))
## [0.3.0](https://github.com/verdaccio/ui/compare/v0.2.4...v0.3.0) (2019-09-01)

View File

@@ -26,14 +26,14 @@ We use `>=yarn@1.13.0`, keep on mind we use lock file.
For development run the following command, it will execute `webpack` and `verdaccio` to
```
```bash
yarn dev
```
The configuration file is located on `tools/_config.yaml`.
Run linting tooling and test to check your code is clean before commit.
```
```bash
yarn lint && yarn test
```

View File

@@ -1,41 +1,43 @@
{
"name": "@verdaccio/ui-theme",
"version": "0.3.0",
"version": "0.3.2",
"description": "Verdaccio User Interface",
"author": {
"name": "Verdaccio Core Team"
"name": "Verdaccio Core Team",
"email": "verdaccio.npm@gmail.com"
},
"repository": {
"type": "git",
"url": "git://github.com/verdaccio/ui"
},
"homepage": "https://verdaccio.org",
"main": "index.js",
"devDependencies": {
"@commitlint/cli": "8.1.0",
"@commitlint/config-conventional": "8.1.0",
"@material-ui/core": "4.3.3",
"@material-ui/icons": "4.2.1",
"@material-ui/styles": "4.3.3",
"@commitlint/cli": "8.2.0",
"@commitlint/config-conventional": "8.2.0",
"@material-ui/core": "4.4.3",
"@material-ui/icons": "4.4.3",
"@octokit/rest": "16.28.7",
"@testing-library/react": "9.1.3",
"@testing-library/react": "9.2.0",
"@types/enzyme": "3.10.3",
"@types/jest": "24.0.18",
"@types/lodash": "4.14.138",
"@types/node": "12.7.3",
"@types/lodash": "4.14.141",
"@types/node": "12.7.8",
"@types/react": "16.9.2",
"@types/react-dom": "16.9.0",
"@types/react-router-dom": "4.3.5",
"@types/validator": "10.11.3",
"@verdaccio/babel-preset": "2.0.0",
"@verdaccio/eslint-config": "2.0.0",
"@verdaccio/types": "8.0.0",
"@verdaccio/types": "8.1.0",
"autosuggest-highlight": "3.1.1",
"babel-loader": "8.0.6",
"bundlesize": "0.18.0",
"codeceptjs": "2.2.1",
"codecov": "3.5.0",
"codeceptjs": "2.3.2",
"codecov": "3.6.1",
"concurrently": "4.1.2",
"cross-env": "5.2.0",
"cross-env": "6.0.0",
"detect-secrets": "1.0.4",
"css-loader": "3.2.0",
"date-fns": "1.30.1",
"emotion": "9.2.12",
@@ -54,7 +56,7 @@
"get-stdin": "6.0.0",
"github-markdown-css": "3.0.1",
"html-webpack-plugin": "3.2.0",
"husky": "3.0.4",
"husky": "3.0.7",
"identity-obj-proxy": "3.0.0",
"in-publish": "2.0.0",
"jest": "24.9.0",
@@ -66,9 +68,10 @@
"js-base64": "2.5.1",
"js-yaml": "3.13.1",
"lint-staged": "8.2.1",
"lockfile-lint": "2.0.1",
"localstorage-memory": "1.0.3",
"mini-css-extract-plugin": "0.8.0",
"node-mocks-http": "1.7.6",
"node-mocks-http": "1.8.0",
"normalize.css": "8.0.1",
"optimize-css-assets-webpack-plugin": "5.0.3",
"ora": "3.4.0",
@@ -83,7 +86,7 @@
"react-router": "5.0.1",
"react-router-dom": "5.0.1",
"resolve-url-loader": "3.1.0",
"rimraf": "2.6.3",
"rimraf": "3.0.0",
"source-map-loader": "0.2.4",
"standard-version": "7.0.0",
"style-loader": "1.0.0",
@@ -99,13 +102,13 @@
"url-loader": "2.1.0",
"validator": "11.1.0",
"verdaccio": "4.2.2",
"verdaccio-auth-memory": "8.0.0",
"verdaccio-memory": "8.0.0",
"webpack": "4.39.3",
"webpack-bundle-analyzer": "3.4.1",
"webpack-bundle-size-analyzer": "3.0.0",
"webpack-cli": "3.3.7",
"webpack-dev-server": "3.8.0",
"verdaccio-auth-memory": "8.1.1",
"verdaccio-memory": "8.1.1",
"webpack": "4.41.0",
"webpack-bundle-analyzer": "3.5.2",
"webpack-bundle-size-analyzer": "3.1.0",
"webpack-cli": "3.3.9",
"webpack-dev-server": "3.8.1",
"webpack-merge": "4.2.2",
"whatwg-fetch": "3.0.0",
"xss": "1.0.6"
@@ -150,9 +153,10 @@
"test:acceptance:server": "concurrently --kill-others \"npm run verdaccio:server\" \"npm run test:acceptance\"",
"test": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest --config ./jest/jest.config.js --maxWorkers 2 --passWithNoTests",
"test:size": "bundlesize",
"lint": "npm run lint:js && npm run lint:css",
"lint": "npm run lint:js && npm run lint:css && npm run lint:lockfile",
"lint:js": "npm run type-check && eslint . --ext .js,.ts,.tsx",
"lint:css": "stylelint 'src/**/styles.ts'",
"lint:css": "stylelint \"src/**/styles.ts\"",
"lint:lockfile": "lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts verdaccio npm yarn",
"coverage:publish": "codecov",
"pre:webpack": "rimraf static/*",
"prepublish": "in-publish && npm run build || not-in-publish",
@@ -177,10 +181,11 @@
"relative": true,
"linters": {
"*.{js,tsx,ts}": [
"eslint",
"eslint .",
"prettier --write"
],
"*": [
"detect-secrets-launcher --baseline .secrets-baseline",
"git add"
]
},

View File

@@ -10,7 +10,7 @@ import Header from '../components/Header';
import { Container, Content } from '../components/Layout';
import RouterApp from '../router';
import API from '../utils/api';
import '../styles/typeface-roboto.css';
import 'typeface-roboto/index.css';
import '../utils/styles/global';
import 'normalize.css';
import Footer from '../components/Footer';

View File

@@ -72,10 +72,10 @@ exports[`test Developers should render the component for contributors with items
name="dmethvin"
version="1.0.0"
>
<WithStyles(Tooltip)
<WithStyles(ForwardRef(Tooltip))
title="dmethvin"
>
<Tooltip
<ForwardRef(Tooltip)
classes={
Object {
"popper": "MuiTooltip-popper",
@@ -143,8 +143,8 @@ exports[`test Developers should render the component for contributors with items
placement="bottom"
transition={true}
/>
</Tooltip>
</WithStyles(Tooltip)>
</ForwardRef(Tooltip)>
</WithStyles(ForwardRef(Tooltip))>
</AvatarTooltip>
</span>
</Styled(span)>
@@ -159,10 +159,10 @@ exports[`test Developers should render the component for contributors with items
name="mgol"
version="1.0.0"
>
<WithStyles(Tooltip)
<WithStyles(ForwardRef(Tooltip))
title="mgol"
>
<Tooltip
<ForwardRef(Tooltip)
classes={
Object {
"popper": "MuiTooltip-popper",
@@ -230,8 +230,8 @@ exports[`test Developers should render the component for contributors with items
placement="bottom"
transition={true}
/>
</Tooltip>
</WithStyles(Tooltip)>
</ForwardRef(Tooltip)>
</WithStyles(ForwardRef(Tooltip))>
</AvatarTooltip>
</span>
</Styled(span)>
@@ -312,10 +312,10 @@ exports[`test Developers should render the component for maintainers with items
name="dmethvin"
version="1.0.0"
>
<WithStyles(Tooltip)
<WithStyles(ForwardRef(Tooltip))
title="dmethvin"
>
<Tooltip
<ForwardRef(Tooltip)
classes={
Object {
"popper": "MuiTooltip-popper",
@@ -383,8 +383,8 @@ exports[`test Developers should render the component for maintainers with items
placement="bottom"
transition={true}
/>
</Tooltip>
</WithStyles(Tooltip)>
</ForwardRef(Tooltip)>
</WithStyles(ForwardRef(Tooltip))>
</AvatarTooltip>
</span>
</Styled(span)>
@@ -399,10 +399,10 @@ exports[`test Developers should render the component for maintainers with items
name="mgol"
version="1.0.0"
>
<WithStyles(Tooltip)
<WithStyles(ForwardRef(Tooltip))
title="mgol"
>
<Tooltip
<ForwardRef(Tooltip)
classes={
Object {
"popper": "MuiTooltip-popper",
@@ -470,8 +470,8 @@ exports[`test Developers should render the component for maintainers with items
placement="bottom"
transition={true}
/>
</Tooltip>
</WithStyles(Tooltip)>
</ForwardRef(Tooltip)>
</WithStyles(ForwardRef(Tooltip))>
</AvatarTooltip>
</span>
</Styled(span)>

View File

@@ -20,7 +20,6 @@ import {
IconButton,
OverviewItem,
PackageList,
PackageListItem,
PackageListItemText,
PackageTitle,
Published,
@@ -174,13 +173,13 @@ const Package: React.FC<PackageInterface> = ({
return (
<PackageList className={'package'}>
<ListItem alignItems={'flex-start'}>{renderPackageListItemText()}</ListItem>
<PackageListItem alignItems={'flex-start'} button={true}>
<ListItem alignItems={'flex-start'}>
{renderAuthorInfo()}
{renderVersionInfo()}
{renderPublishedInfo()}
{renderFileSize()}
{renderLicenseInfo()}
</PackageListItem>
</ListItem>
</PackageList>
);
};

View File

@@ -3,7 +3,6 @@ import { Link } from 'react-router-dom';
import Grid from '@material-ui/core/Grid';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import MuiIconButton from '@material-ui/core/IconButton';
import Photo from '@material-ui/core/Avatar';
@@ -120,6 +119,10 @@ export const PackageList = styled(List)({
'&:hover': {
backgroundColor: colors.greyLight3,
},
'> :last-child': {
paddingTop: 0,
},
},
});
@@ -144,12 +147,6 @@ export const TagContainer = styled('span')`
}
`;
export const PackageListItem = styled(ListItem)({
'&&': {
paddingTop: 0,
},
});
export const PackageListItemText = styled(ListItemText)({
'&&': {
paddingRight: 0,

View File

@@ -27,7 +27,8 @@ describe('<Version /> component', () => {
cleanup();
});
test('should render the component in default state', () => {
// FIXME: this test is not deterministic (writes `N days ago` in the snapshot, where N is random number)
test.skip('should render the component in default state', () => {
const wrapper = mount(
<MemoryRouter>
<Versions />

File diff suppressed because one or more lines are too long

View File

@@ -14,10 +14,10 @@ function renderSidebar(): ReactElement<HTMLElement> {
const Layout: FC<{}> = () => {
return (
<Grid className={'container content'} container={true} data-testid="version-layout" spacing={0}>
<Grid item={true} xs={8}>
<Grid item={true} md={8} xs={12}>
{renderDetail()}
</Grid>
<Grid item={true} xs={4}>
<Grid item={true} md={4} xs={12}>
{renderSidebar()}
</Grid>
</Grid>

View File

@@ -1 +0,0 @@
@import '~typeface-roboto';

View File

@@ -66,7 +66,7 @@ module.exports = {
test: /\.(woff|woff2|eot|ttf|otf)$/,
loader: 'url-loader',
options: {
name: 'fonts/[name].[ext]',
name: '/fonts/[name].[ext]',
limit: 50,
},
},

5677
yarn.lock

File diff suppressed because it is too large Load Diff