Skip to content
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

v1.1.0 #55

Merged
merged 22 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1a0e2de
deps: bump react-script to v5 (#48)
kylejb Jan 9, 2022
dfe8d92
feat(web): refactor to TypeScript (#47)
kylejb Jan 9, 2022
33a145b
fix(server): replace request with axios
kylejb Jan 15, 2022
7077418
feat(server): refactor to support TypeScript
kylejb Jan 15, 2022
45f83f1
feat: offload client-side work to server
kylejb Jan 15, 2022
212e9df
feat(web): replace scss with tailwindcss
kylejb Jan 9, 2022
93aedb6
fix(web): entry point to run tests
kylejb Jan 15, 2022
b08f028
feat(test): scaffold server-side tests (#54)
kylejb Jan 17, 2022
f15dcec
fix(devops): install dependencies script
kylejb Jan 17, 2022
5cfbb8f
feat: add pre-commit hook to format and test code (#56)
kylejb Jan 17, 2022
d56a2e3
chore: address select deepsource issues
kylejb Jan 17, 2022
14e0997
refining styles
matt-green1 Jan 22, 2022
01e8d34
deps: rebuild package-lock.json
kylejb Jan 22, 2022
7dc8009
feat(web/sighting-card): replace flex with grid (#58)
kylejb Jan 23, 2022
f4705b7
refine styling on grid
matt-green1 Jan 24, 2022
f761f65
fix(devops): add dev branch to test workflow
kylejb Jan 24, 2022
540f2dc
fix(devops): add heroku-prebuild script to capture all dependencies
kylejb Jan 24, 2022
5cc5e8a
fix: build error TS2322
kylejb Jan 24, 2022
09aab5d
deps: remove override for mini-css-extract-plugin
kylejb Jan 25, 2022
6282283
chore(web/postcss.config): refactor and add cssnano preset
kylejb Jan 25, 2022
62af786
fix(web): styling
kylejb Jan 25, 2022
66dfe10
final tailwind revision
matt-green1 Jan 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
version = 1

exclude_patterns = [
"bin/**",
"**/node_modules/",
"js/*/*.min.js"
test_patterns = [
"**/web/**/*.test.tsx",
"**/server/tests/**/*.test.ts",
]

[[analyzers]]
name = "javascript"
enabled = true

[analyzers.meta]
environment = [
"browser",
"nodejs"
]
plugins = ["react"]
style_guide = "airbnb"
[analyzers.meta]
environment = [
"nodejs",
"jest",
"browser"
]
plugins = ["react"]
style_guide = "standard"
dialect = "typescript"
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: CI before CD to Heroku

on:
push:
branches: [ main ]
branches: [ main, dev ]
pull_request:
branches: [ main ]
branches: [ main, dev ]

jobs:
build:
if: github.event.pull_request.draft == false

runs-on: ubuntu-latest

Expand All @@ -22,6 +23,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run installAll
- run: npm run build --if-present
- run: npm test
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npm test
4 changes: 4 additions & 0 deletions .husky/prepare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const isCi = process.env.CI !== undefined;
if (!isCi) {
require('husky').install();
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
**/yarn.lock
**/package-lock.json
**/jsconfig.json
**/.deepsource.toml
**/.github
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tabWidth": 4,
"singleQuote": true,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"bracketSameLine": false,
"useTabs": false,
"jsxSingleQuote": true,
"trailingComma": "all"
Expand Down
41 changes: 20 additions & 21 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand All @@ -18,24 +17,24 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Expand Down Expand Up @@ -106,7 +105,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand All @@ -119,14 +118,14 @@ version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
[Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
[https://www.contributor-covenant.org/faq][faq]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Read our [Code of Conduct](CODE_OF_CONDUCT.md) before you contribute, as being p

## Guidelines

- [Open an issue!](https://github.com/kylejb/space-station-tracker/issues/new)
- Open a pull request!
- [Open an issue!](https://github.com/kylejb/space-station-tracker/issues/new)
- Open a pull request!
11 changes: 11 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import dotenv from 'dotenv';
import express from 'express';

import { Server } from './server';

dotenv.config();

const app = express();
const server = new Server(app);
const port = Number(process.env.PORT) || 9000; // Heroku needs PORT var
server.start(port);
178 changes: 178 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,

// Stop running tests after `n` failures
// bail: 0,

// Respect "browser" field in package.json when resolving modules
// browser: false,

// The directory where Jest should store its cached dependency information
// cacheDirectory: "/private/var/folders/qv/s8ph22xx2fnfxdh3pq14t4d40000gn/T/jest_dx",

// Automatically clear mock calls and instances between every test
clearMocks: true,

// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,

// An array of glob patterns indicating a set of files for which coverage information should be collected
collectCoverageFrom: ['<rootDir>/server/tests/**/*.ts'],

// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',

// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "/node_modules/"
// ],

// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: ['text-summary', 'lcov'],

// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,

// A path to a custom dependency extractor
// dependencyExtractor: undefined,

// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,

// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],

// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: undefined,

// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: undefined,

// A set of global variables that need to be available in all test environments
// globals: {},

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
// "node_modules"
// ],

// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "json",
// "jsx",
// "ts",
// "tsx",
// "node"
// ],

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/server/' }),

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],

// Activates notifications for test results
// notify: false,

// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",

// A preset that is used as a base for Jest's configuration
preset: 'ts-jest',

// Run tests from one or more projects
// projects: undefined,

// Use this configuration option to add custom reporters to Jest
// reporters: undefined,

// Automatically reset mock state between every test
// resetMocks: false,

// Reset the module registry before running each individual test
// resetModules: false,

// A path to a custom resolver
// resolver: undefined,

// Automatically restore mock state between every test
// restoreMocks: false,

// The root directory that Jest should scan for tests and modules within
// rootDir: undefined,

// A list of paths to directories that Jest should use to search for files in
// roots: [
// "<rootDir>"
// ],

// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",

// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [],

// A list of paths to snapshot serializer modules Jest should use for snapshot testing
// snapshotSerializers: [],

// The test environment that will be used for testing
testEnvironment: 'node',
// testEnvironment: './server/testEnvironment.ts',

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},

// Adds a location field to test results
// testLocationInResults: false,

// The glob patterns Jest uses to detect test files
testMatch: ['**/*.spec.ts', '**/*.test.ts'],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],

// This option allows the use of a custom results processor
// testResultsProcessor: undefined,

// This option allows use of a custom test runner
// testRunner: "jasmine2",

// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",

// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: undefined,

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "/node_modules/"
// ],

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,

// Indicates whether each individual test should be reported during the run
// verbose: undefined,

// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],

// Whether to use watchman for file crawling
// watchman: true,
};
11 changes: 0 additions & 11 deletions jsconfig.json

This file was deleted.

Loading