Skip to content

Commit

Permalink
Version 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
potatosalad committed Jan 26, 2024
1 parent 56254da commit 9b02144
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 70 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md

This file was deleted.

15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## 1.0.2 (2024-01-26)

* Fixes
* Fix path value transformation to match [`PathToWirePath()` and `WirePathToPath()` in Argo 1.1](https://msolomon.github.io/argo/versions/1.1/spec#sec-Path-value-transformation).

## 1.0.1 (2024-01-22)

* Fixes
* Fix cases where `@include(if: $var)` and `@skip(if: $var)` affect the "omittable" setting of a field when dealing with `FragmentSpread` and `InlineFragment`.

## 1.0.0 (2024-01-03)

* Initial release.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,16 @@ endif
$(verbose) rm -rf $(ERLFMT_BUILD_DIR)

erlfmt: $(ERLFMT)
$(verbose) $(ERLFMT) --verbose --write --require-pragma --print-width=120 'apps/**/{src,include,test}/**/*.{hrl,erl,app.src}' 'apps/**/rebar.config' rebar.config
$(verbose) $(ERLFMT) --verbose --write --require-pragma --print-width=120 \
'apps/**/{src,include,test}/**/*.{hrl,erl,app.src}' \
'apps/**/{rebar.config,rebar.config.script}' \
'{rebar.config,rebar.config.script}'

erlfmt-check: $(ERLFMT)
$(verbose) $(ERLFMT) --check --require-pragma --print-width=120 'apps/**/{src,include,test}/**/*.{hrl,erl,app.src}' 'apps/**/rebar.config' rebar.config
$(verbose) $(ERLFMT) --check --require-pragma --print-width=120 \
'apps/**/{src,include,test}/**/*.{hrl,erl,app.src,app.src.script}' \
'apps/**/{rebar.config,rebar.config.script}' \
'{rebar.config,rebar.config.script}'

distclean-erlfmt:
$(gen_verbose) rm -rf $(ERLFMT)
Expand Down
3 changes: 3 additions & 0 deletions apps/argo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/CHANGELOG.md
/LICENSE.md
/README.md
10 changes: 0 additions & 10 deletions apps/argo/CHANGELOG.md

This file was deleted.

24 changes: 0 additions & 24 deletions apps/argo/LICENSE.md

This file was deleted.

27 changes: 0 additions & 27 deletions apps/argo/README.md

This file was deleted.

7 changes: 3 additions & 4 deletions apps/argo/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

{ex_doc, [
{source_url, <<"https://github.com/WhatsApp/erlang-argo">>},
{source_url_pattern, <<"https://github.com/WhatsApp/erlang-argo/blob/v1.0.1/apps/argo/%{path}#L%{line}">>},
{extras, [
<<"README.md">>,
<<"LICENSE.md">>,
<<"CHANGELOG.md">>,
<<"../../README.md">>,
<<"../../LICENSE.md">>,
<<"../../CHANGELOG.md">>,
<<"../../CODE_OF_CONDUCT.md">>,
<<"../../CONTRIBUTING.md">>
]},
Expand Down
23 changes: 23 additions & 0 deletions apps/argo/rebar.config.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%%% Copyright (c) Meta Platforms, Inc. and affiliates.
%%% Copyright (c) WhatsApp LLC
%%%
%%% This source code is licensed under the MIT license found in the
%%% LICENSE.md file in the root directory of this source tree.
%%% % @format

AppDir = filename:dirname(SCRIPT),
SourceDir = filename:join([AppDir, "src"]),
AppSrcFile = filename:join([SourceDir, "argo.app.src"]),

{ok, [{application, argo, Desc}]} = file:consult(AppSrcFile),
{vsn, Vsn} = lists:keyfind(vsn, 1, Desc),
SourceUrlPattern = erlang:iolist_to_binary(
io_lib:format("https://github.com/WhatsApp/erlang-argo/blob/v~ts/apps/argo/%{path}#L%{line}", [Vsn])
),

Config1 = CONFIG,
{value, {ex_doc, ExDocConfig1}, Config2} = lists:keytake(ex_doc, 1, Config1),
ExDocConfig2 = lists:keystore(source_url_pattern, 1, ExDocConfig1, {source_url_pattern, SourceUrlPattern}),
Config3 = lists:keystore(ex_doc, 1, Config2, {ex_doc, ExDocConfig2}),

Config3.
7 changes: 5 additions & 2 deletions apps/argo/src/argo.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%%% % @format
{application, argo, [
{description, "argo: Erlang implementation of Argo for GraphQL"},
{vsn, "1.0.1"},
{vsn, "1.0.2"},
{modules, []},
{registered, []},
%% NOTE: Remember to sync changes to `applications` to
Expand All @@ -34,7 +34,9 @@
"\\.swp$",
%% Lexer/Parser files
"argo_graphql_language_parser\\.erl$",
"argo_graphql_language_scanner\\.erl$"
"argo_graphql_language_scanner\\.erl$",
%% Hex.pm package related
"argo\\.app\\.src\\.script$"
]},
{files, [
"CHANGELOG*",
Expand All @@ -43,6 +45,7 @@
"mix.exs",
"README*",
"rebar.config",
"rebar.lock",
"src"
]},
{licenses, ["MIT"]},
Expand Down
20 changes: 20 additions & 0 deletions apps/argo/src/argo.app.src.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
%%%-----------------------------------------------------------------------------
%%% Copyright (c) Meta Platforms, Inc. and affiliates.
%%% Copyright (c) WhatsApp LLC
%%%
%%% This source code is licensed under the MIT license found in the
%%% LICENSE.md file in the root directory of this source tree.
%%% % @format

SourceDir = filename:dirname(SCRIPT),
AppDir = rebar_file_utils:normalized_path(filename:join([SourceDir, ".."])),
ProjectDir = rebar_file_utils:normalized_path(filename:join([AppDir, "..", ".."])),

FileNameList = ["CHANGELOG.md", "LICENSE.md", "README.md"],

Sources = [filename:join([ProjectDir, FileName]) || FileName <- FileNameList],
Dest = AppDir,
Options = [{dereference, true}],
ok = rebar_file_utils:cp_r(Sources, Dest, Options),

CONFIG.

0 comments on commit 9b02144

Please sign in to comment.