Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
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
diff --git a/node_modules/jest-runtime/build/index.js b/node_modules/jest-runtime/build/index.js | |
index 0c9dd8c..58109b5 100644 | |
--- a/node_modules/jest-runtime/build/index.js | |
+++ b/node_modules/jest-runtime/build/index.js | |
@@ -1189,7 +1189,38 @@ class Runtime { | |
return this._getMockedNativeModule(); | |
} | |
- return require(moduleName); | |
+ // return require(moduleName); |
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
module.exports = { | |
presets: [ | |
'@babel/preset-react', | |
[ | |
'@babel/preset-env', | |
{ | |
targets: { | |
node: 'current', | |
}, | |
}, |
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
const App = React.memo( | |
({ | |
node: { | |
items: { totalCount, ...items } | |
}, | |
relay | |
}) => { | |
const [fulltext, setFulltext] = useState('') | |
const fulltextDebounced = useDebounce(fulltext, 300) | |
const [{ sort, order }, updateSort] = useSort({ sort: 'name', order: 'asc' }) |
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
type XYChartData { | |
x: Float! | |
y: Float! | |
label: String | |
} | |
type BarChart { | |
title: String | |
data: [XYChartData!]! | |
} |
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
FROM alpine | |
RUN apk add --update --no-cache nodejs | |
RUN npm i -g yarn | |
ADD package.json yarn.lock /tmp/ | |
ADD .yarn-cache.tgz / | |
RUN cd /tmp && yarn | |
RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules |
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
t('global_datetime_formatter', { date: myDate }) | |
t('global_currency_formatter', { value: myValue }) |
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
import React from 'react'; | |
import { filter } from 'graphql-anywhere'; | |
import hoistNonReactStatic from 'hoist-non-react-statics'; | |
/* | |
* createFragmentContainer returns a component which expects props that match | |
* WrappedComponent's fragment names, and provides data masking | |
*/ | |
export default function createFragmentContainer(WrappedComponent) { |
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
/* @flow */ | |
import { | |
forOwn, | |
size, | |
get, | |
transform, | |
noop, | |
} from 'lodash'; |
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
type TypesDefinition = | |
| StringConstructor | |
| BooleanConstructor | |
| DateConstructor | |
type FieldDefinition = { | |
type: TypesDefinition, | |
required?: boolean, | |
default?: boolean, | |
} |
NewerOlder