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

1.0.0 release #5

Merged
merged 10 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
env: {
browser: true,
es6: true,
'jest/globals': true,
},
extends: ['eslint:recommended', 'plugin:react/recommended'],
globals: {
Expand All @@ -16,9 +17,10 @@ module.exports = {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
plugins: ['@typescript-eslint', 'react', 'react-hooks', 'jest'],
rules: {
'no-unused-vars': 'off',
'no-undef': 0,
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': 'error',
'react/prop-types': 0,
'react-hooks/rules-of-hooks': 'error',
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup
run: npm install

- name: Test
run: npm run test

- name: Lint
run: npm run lint
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.0] - 2024-01-17

### Added

- Automated testing using Airtable block testing framework
- You can now save a table's configuration for re-use later
- Tables are chosen using a dropdown instead of selecting a table in the data view
- Over 20 new generator types for locations, lat long, and demographic information

### Changed

- Used [faker](https://www.npmjs.com/package/@faker-js/faker) to generate random data
- Rewrote extension in TypeScript

## [0.0.4] - 2024-01-17

### Fixed
Expand Down
119 changes: 77 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,99 @@ Add this extension [through the Airtable marketplace](https://airtable.com/marke

To start developing on this extension:

- Open your base, click **Extensions**, then **Add an extension**
- Open your base click **Extensions** then **Add an extension**
- Click the small plus sign (sometimes it says "Build a custom extension" next to it)
<img width="106" alt="image" src="https://user-images.githubusercontent.com/270536/191860246-6acdbdf0-a2c1-4b27-8ba1-cb7ee74870e8.png">
- Give your extension a name.
- Follow the commands for setting up Airtable Blocks CLI if you haven't already installed it. Click to the next step in Airtable.
- Copy the `block init` command, and change the `template` argument to this repo, so the command will look like:
- Copy the `block init` command and change the `template` argument to this repo so the command will look like:
`block init app[something]/blk[something] --template=https://github.com/kevee/airtable-extension-random-record-generator app_name`
- Move to your directory and run `block release` to deploy the extension to your base.

## Field type support

Supports the following field types and random generators. Examples included:

- **Single line text**
- Animal name, first: "Aaron"
- Animal name, last: "Ant"
- Animal name, full: "Aaron Ant"
- Human name, first: "Aaron"
- Human name, last: "Anderson"
- Human name, full: "Aaron Anderson"
- Lorem Ipsum, single sentence: "Lorem ipsum...."
- Address: "123 Main St."
- City: "New York"
- State, abbreviation: "CA"
- State, name: "California"
- **Multi-line text**
- Lorem Ipsum, single sentence or multi-paragraph
- **Email**
- Animal name email: "[email protected]"
- Human name email: "[email protected]"
- **Checkbox**
- Random check: Randomly checks the box
- **Number field**
- Random integer or float: 45, 34.222
- **Date**
- Random date: 2014-10-20
- Random date and time: 2021-05-06T15:23:00
## Random generators

- **Attachments**
- Random cat photo
- A sample PDF file
- **Single and multi-select**
- Random selection from the select options
- **Phone number**
- Random phone number
- **Linked record**
- Random single linked record
- Random multiple linked records
- PDF files
- Images of:
- Abstract
- Animals
- Business
- Cats
- City
- Fashion
- Food
- Nature
- People
- Sports
- Transport
- ** Checkbox**
- Randomly toggle a checkbox on or off
- **Date**
- Dates with a variety of options for before/after ranges
- Dates and times with a variety of options for before/after ranges
- **Duration**
- Random duration in seconds
- **Internet**
- Usernames
- Emoji
- Email addresses
- URLs
- IP addresses
- Usernames
- **Link to records**
- Single links to other records
- Multiple links to other records
- **Location**
- City
- Country
- Country code
- County
- Latitude
- Longitude
- Secondary address
- State (Full name or abbreviation)
- Street Address
- Street name
- Timezone
- Zip code
- **Lorem Ipsum**
- Words
- Sentences
- Paragraphs
- **Numbers**
- Numbers
- Numbers with a range
- Numbers with a decimal range
- Currencies
- **Percentage**
- Random percentage
- **People**
- Bio
- First Name
- Full Name
- Gender
- Job Title
- Job Type
- Last Name
- Sex
- **Phone**
- Phone numbers
- International phone numbers
- **Rating**
- Random rating
- **Select**
- Randomly select from a list of options

## Code of Conduct

This repository falls under [U.S. Digital Response’s Code of Conduct](./CODE_OF_CONDUCT.md), and we will hold all participants in issues, pull requests, discussions, and other spaces related to this project to that Code of Conduct. Please see [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) for the full code.
This repository falls under [U.S. Digital Response’s Code of Conduct](./CODE_OF_CONDUCT.md) and we will hold all participants in issues pull requests discussions and other spaces related to this project to that Code of Conduct. Please see [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) for the full code.

## License & Copyright

Copyright (C) 2022 U.S. Digital Response (USDR)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at:
Licensed under the Apache License Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at:

[`LICENSE`](./LICENSE) in this repository or http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing software distributed under the License is distributed on an "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied. See the License for the specific language governing permissions and limitations under the License.
19 changes: 19 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const path = require('path')

module.exports = {
presets: [
'@babel/preset-typescript',
'@babel/preset-react',
['@babel/preset-env', { targets: { node: 'current' } }],
],
plugins: [
[
'babel-plugin-module-resolver',
{
alias: {
_test: path.resolve(__dirname, 'test'),
},
},
],
],
}
Loading