Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #17 from toba/1.4.0-dev
Browse files Browse the repository at this point in the history
Merge 1.4.0 changes
  • Loading branch information
Jason-Abbott authored Jan 26, 2019
2 parents 50855cb + 17cf548 commit 851aebe
Show file tree
Hide file tree
Showing 26 changed files with 5,310 additions and 1,122 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
*.vsix
node_modules
.vscode-test
out
/dist
/test/**/*.d.ts
/test/**/*.js
/src/**/*.js
29 changes: 14 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
sudo: false

os:
- osx
- linux
language: node_js

before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
node_js:
- '10'

install:
- npm install
- npm run compile
branches:
only:
- master

script:
- npm test --silent
- yarn global add codecov
- yarn test
- codecov

sudo: false

cache:
yarn: true
17 changes: 10 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
"preLaunchTask": "Build and Watch"
"outFiles": ["${workspaceRoot}/dist/**/*.js"],
"preLaunchTask": "Build"
},
{
"name": "Integration Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test" ],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/test"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "Build and Watch"
"outFiles": ["${workspaceFolder}/test/**/*.js"],
"preLaunchTask": "Build Integration Tests"
}
]
}
}
57 changes: 28 additions & 29 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,60 @@
"label": "Publish",
"command": "vsce",
"dependsOn": "Build",
"args": [
"publish"
],
"args": ["publish"],
"group": "none",
"problemMatcher": []
},
{
"label": "Package",
"command": "vsce",
"args": [
"package"
],
"args": ["package"],
"group": "none",
"problemMatcher": []
},
{
"label": "Unit Test",
"options": {
"env": {
"TS_NODE_PROJECT": "${cwd}"
}
"label": "Test",
"command": "./node_modules/.bin/jest",
"args": ["--verbose"],
"presentation": {
"showReuseMessage": false,
"clear": true
},
"command": "node_modules/.bin/mocha --require ts-node/register ./src/**/*.test.ts",
"type": "shell",
"group": "test",
"problemMatcher": [
"$tsc"
]
"problemMatcher": []
},
{
"label": "Build and Watch",
"command": "./node_modules/.bin/tsc -watch -p tsconfig.json",
"label": "Build",
"group": "build",
"command": "./node_modules/.bin/tsc",
"args": ["-p", "tsconfig.json"],
"type": "shell",
"presentation": {
"echo": false,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"isBackground": true,
"problemMatcher": "$tsc-watch"
"problemMatcher": "$tsc"
},
{
"label": "Build",
"label": "Build Integration Tests",
"group": "build",
"command": "./node_modules/.bin/tsc -p tsconfig.json",
"command": "./node_modules/.bin/tsc",
"args": ["-p", "tsconfig.test.json"],
"type": "shell",
"problemMatcher": "$tsc"
},
{
"label": "Install VSCode Typings",
"group": "none",
"type": "shell",
"command": "node ./node_modules/vscode/bin/install",
"command": "node",
"args": ["./node_modules/vscode/bin/install"],
"problemMatcher": []
},
{
"label": "Install VSCode Extensions",
"group": "none",
"type": "shell",
"command": "yarn",
"args": ["global", "add", "vsce"],
"problemMatcher": []
}
]
}
}
13 changes: 8 additions & 5 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
src/**/*
images/**/*
node_modules
src/**/*
test/**/*
.gitignore
.travis.yml
.vscode/**/*
.vscode-test/**/*
jest.config.js
prettier.config.js
tsconfig.json
.gitignore
.travis.yml
node_modules
test/**/*
tslint.json
yarn.lock
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.4.0
- Merge PR from [Sam Stern](https://github.com/samtstern) to update the [index specification](https://github.com/firebase/firebase-tools/blob/master/src/firestore/indexes-spec.ts). Thank you Sam!
- Merge PR from [Konrad Linkowski](https://github.com/KonradLinkowski) to correct grammar note. Thank you Konrad!
- Update dependencies
- Fix tests
- Strict null checks

# 1.3.2
- Merge PR from [Arturo Guzman](https://github.com/guzart) to allow `uid` field in `request.auth`. Thank you Arturo!

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Toba Technology
Copyright (c) 2019 Toba Technology

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[![Market Badge](https://vsmarketplacebadge.apphb.com/version/toba.vsfire.svg)](https://marketplace.visualstudio.com/items?itemName=toba.vsfire)
[![Travis](https://travis-ci.org/toba/vsfire.svg?branch=master)](https://travis-ci.org/toba/vsfire#)
[![Installs](https://vsmarketplacebadge.apphb.com/installs/toba.vsfire.svg)](https://marketplace.visualstudio.com/items?itemName=toba.vsfire)
[![David](https://david-dm.org/toba/vsfire.svg)](https://david-dm.org/toba/vsfire)

# Firestore Security Rules and Indexes

Syntax highlighting, code completions and hover help for new [Firestore security rules](https://cloud.google.com/firestore/docs/reference/security/) and [index definitions](https://cloud.google.com/firestore/docs/reference/rest/v1beta1/projects.databases.indexes). The priority for [additional rules language features](https://code.visualstudio.com/docs/extensionAPI/language-support) in roughly the order I'll get to them, if ever, is …

- [x] Syntax Highlighting
- [x] [Code Completions](#code-completions)
- [x] [Hover Definitions](#hover-definitions)
- [ ] Snippets
- [ ] Signature Helpers
- [ ] Incremental Formatting
- [ ] Rule validation (moonshot)
- [x] Syntax Highlighting
- [x] [Code Completions](#code-completions)
- [x] [Hover Definitions](#hover-definitions)
- [ ] Snippets
- [ ] Signature Helpers
- [ ] Incremental Formatting
- [ ] Rule validation (moonshot)

### Rules

Expand All @@ -21,10 +21,11 @@ Syntax highlighting, code completions and hover help for new [Firestore security
![rules hovers](./images/rules-hovers.gif)

### Index Definitions

![index completions](./images/index-completions.gif)

![index hovers](./images/index-hovers.gif)

# Status

See the [repository milestones](https://github.com/toba/vsfire/milestones) for issues I expect to resolve in coming releases.
See the [repository milestones](https://github.com/toba/vsfire/milestones) for issues I expect to resolve in coming releases.
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const config = require('@toba/test/jest');
// Jest shouldn't try to run /test/ folder tests
config.testRegex = __dirname + '/src/.*\\.test\\.tsx?$';
module.exports = config;
134 changes: 71 additions & 63 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,73 @@
{
"name": "vsfire",
"displayName": "Firebase",
"description": "Firestore Security Rules syntax highlighting",
"version": "1.3.2",
"publisher": "toba",
"keywords": ["firebase", "firestore", "rules"],
"icon": "logo.png",
"repository": {
"type": "git",
"url": "https://github.com/toba/vsfire.git"
},
"bugs": {
"url": "https://github.com/toba/vsfire/issues"
},
"engines": {
"vscode": "^1.11.0"
},
"categories": ["Languages"],
"scripts": {
"compile": "tsc -p ./",
"pkgvars": "node ./node_modules/vscode/bin/install",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "node ./node_modules/vscode/bin/test"
},
"activationEvents": ["onLanguage:firerules"],
"main": "./out/src/extension",
"contributes": {
"languages": [
{
"id": "firerules",
"extensions": [".rules", ".rule"],
"aliases": ["Firebase Rules"],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "firerules",
"scopeName": "source.firerules",
"path": "./syntaxes/firerules.json"
}
],
"jsonValidation": [
{
"fileMatch": "*.indexes.json",
"url": "./syntaxes/index.schema.json"
}
]
},
"devDependencies": {
"@types/chai": "^4.0.4",
"@types/mocha": "^2.2.43",
"@types/node": "^8.5.0",
"chai": "^4.1.2",
"mocha": "^5.0.0",
"ts-node": "^4.1.0",
"tslint": "^5.9.0",
"tslint-consistent-codestyle": "^1.11.0",
"typescript": "^2.7.0"
},
"dependencies": {
"vscode": "^1.1.6"
}
"name": "vsfire",
"displayName": "Firebase",
"description": "Firestore Security Rules syntax highlighting",
"version": "1.4.0",
"publisher": "Toba",
"keywords": [
"firebase",
"firestore",
"rules"
],
"icon": "logo.png",
"repository": {
"type": "git",
"url": "https://github.com/toba/vsfire.git"
},
"bugs": {
"url": "https://github.com/toba/vsfire/issues"
},
"engines": {
"vscode": "^1.11.0"
},
"categories": [
"Programming Languages"
],
"scripts": {
"compile": "tsc -p ./",
"pkgvars": "node ./node_modules/vscode/bin/install",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "jest --coverage"
},
"activationEvents": [
"onLanguage:firerules"
],
"main": "./dist/extension",
"contributes": {
"languages": [
{
"id": "firerules",
"extensions": [
".rules",
".rule"
],
"aliases": [
"Firebase Rules"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "firerules",
"scopeName": "source.firerules",
"path": "./syntaxes/firerules.json"
}
],
"jsonValidation": [
{
"fileMatch": "*.indexes.json",
"url": "./syntaxes/index.schema.json"
}
]
},
"devDependencies": {
"@toba/develop": "^4.4.2",
"@toba/test": "^3.4.1",
"@types/node": "^10.0.0",
"ts-node": "^8.0.0"
},
"dependencies": {
"vscode": "^1.1.28"
}
}
1 change: 1 addition & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@toba/develop/prettier");
Loading

0 comments on commit 851aebe

Please sign in to comment.